JSON API » queues » queues/create

Creates a new queue.

Input parameters

Requires authentication and the administrator role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
nameStringName.Yes
allow_forwardsInteger1 to allow destinations to forward calls, 0 not to.No0
answerInteger1 to request destinations to auto-answer, 0 not to.No0
callbackInteger1 to offer callback on pressing *, 0 not.No0
calleridStringCallerid to use on callback. Empty string for unknown.NoEmpty string.
customerIntegerID of customer to create in.NoCustomer of authentication user.
descriptionStringDescription.NoEmpty string.
dtypeStringDestination type when exiting the queue.No"hangup"
dnumberStringDestination number when exiting the queue.NoEmpty string.
eventsInteger1 to record queue events, 0 not to.No0
holdtimeIntegerMaximum hold time in seconds. -1 for no limit.No-1
maximum_queuedIntegerMaximum queued calls. -1 for no limit.No-1
missed_logoutIntegerNumber of missed calls to set destination to unavailable. 0 for never.No0
musicIntegerID of music class to play. 0 for default.No0
no_destinationsInteger1 to exit queue if no destinations are available on entering the queue, 0 not to.No1
ownerIntegerID of owner. 0 for none.No0
panelInteger1 to show in control panel, 0 not to.No0
recordgroupIntegerID of record group. 0 for none.No0
play_intervalIntegerSeconds to play message and/or position in queue.No60
play_messageInteger1 to play message file, 0 not to.No0
play_positionInteger1 to play position in queue, 0 not to.No0
play_startInteger1 to play message and/or position on entering queue, 0 not to.No0
priorityIntegerPriority of queue from 1 to 10.No1
ringtimeIntegerSeconds to ring destinations for before return caller to queue.No15
screenInteger1 to screen calls and play callerid, 2 to ask callers to record name, 0 not to screen.No0
strategyStringRing strategy within a priority. "all", "least_recent", or "least_recent_all".No"least_recent"
typeStringRing strategy for priorities. "circular", "linear", "smart_circular", or "smart_linear".No"linear"
wrapuptimeIntegerSeconds to leave destination idle for before delivering next call.No0
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
200Success.
201Input passed validation. Only returned if validation=1.
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.

Data returned

The ID of the created queue.

Example: With required parameters

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

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123 } }

Change history

VersionChanges
3.13Function added.