JSON API » queues » queues/update

Updates an existing queue.

Input parameters

Requires authentication and the user role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of queue to update.Yes
allow_forwardsInteger1 to allow destinations to forward calls, 0 not to.NoCurrent value.
answerInteger1 to request destinations to auto-answer, 0 not to.NoCurrent value.
atypeStringDestination type when exiting the queue due to no destinations available.No"hangup"
anumberStringDestination number when exiting the queue due to no destinations available.NoEmpty string.
callbackInteger-1 to offer callback on pressing *, 0 not to, 1 or above to offer callback and validate number using class of service with this ID.NoCurrent value.
calleridStringCallerid to use on callback. Empty string for unknown.NoCurrent value.
descriptionStringDescription.NoCurrent value.
destinations_sameIntegerSet all destinations to the same values as dtype and dnumber.NoCurrent value.
dtypeStringDestination type when exiting the queue due to caller pressing *.No"hangup"
dnumberStringDestination number when exiting the queue due to caller pressing *.NoEmpty string.
eventsInteger1 to record queue events, 0 not to.NoCurrent value.
events_urlStringURL to send events to. Empty string for none.NoEmpty string.
htypeStringDestination type when exiting the queue due to hold time.No"hangup"
hnumberStringDestination number when exiting the queue due to hold time.NoEmpty string.
holdtimeIntegerMaximum hold time in seconds. -1 for no limit.NoCurrent value.
maximum_queuedIntegerMaximum queued calls. -1 for no limit.NoCurrent value.
missed_logoutIntegerNumber of missed calls to set destination to unavailable. 0 for never.NoCurrent value.
musicIntegerID of music class to play. 0 for default.NoCurrent value.
nameStringName.NoCurrent value.
ntypeStringDestination type when exiting the queue due to number of calls.No"hangup"
nnumberStringDestination number when exiting the queue due to number of calls.NoEmpty string.
no_destinationsInteger1 to exit queue if no destinations are available on entering the queue, 0 not to.NoCurrent value.
ownerIntegerID of owner. 0 for none.NoCurrent value.
panelInteger1 to show in control panel, 0 not to.NoCurrent value.
recordgroupIntegerID of record group. 0 for none.NoCurrent value.
play_intervalIntegerSeconds to play message and/or position in queue.NoCurrent value.
play_messageInteger1 to play message file, 0 not to.NoCurrent value.
play_positionInteger-1 to always play position in queue, 0 not to, 1 or above to play position for callers up to that position number.NoCurrent value.
play_waittimeInteger-1 to always play wait time in queue, 0 not to, 1 or above to play wait time for callers up to that number of seconds.NoCurrent value.
play_startInteger1 to play message and/or position on entering queue, 0 not to.NoCurrent value.
priorityIntegerPriority of queue from 1 to 10.NoCurrent value.
ringtimeIntegerSeconds to ring destinations for before return caller to queue.NoCurrent value.
screenInteger1 to screen calls and play callerid, 2 to ask callers to record name, 0 not to screen.NoCurrent value.
strategyStringRing strategy within a priority. "all", "least_recent", or "least_recent_all".NoCurrent value.
typeStringRing strategy for priorities. "circular", "linear", "smart_circular", or "smart_linear".NoCurrent value.
wrapuptimeIntegerSeconds to leave destination idle for before delivering next call.NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404The queue does not exist, or you do not have permission to update it.

Data returned

No data is returned.

Example: Changing the name

http://enswitch.example.com/api/json/queues/update/?auth_username=user;auth_password=password;id=123;name=example

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
4.1play_waittime parameter added.
3.14atype, anumber, destinations_same, events_url, htype, hnumber, ntype, and nnumber input parameters added. callback input parameter changed to -1 for always and to specify class of service ID. play_position input parameter changed to -1 for always and to specify highest position.
3.13Function added.