Skip to main content

Create a queue

POST 
/queues

Create a new call queue with the specified name and maximum size.

Request

Body

required

Queue creation request

    queue_name stringrequired

    Possible values: non-empty and <= 255 characters

    Name of the queue to create

    max_size QueueMaxSize (integer)

    Possible values: >= 1 and <= 300

    Default value: 300

    Maximum number of calls that can be in the queue at once

Responses

200: Successful response with details about a queue.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/queues' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"queue_name": "support",
"max_size": 100
}'

Response samples


{
"data": {
"record_type": "queue",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "support",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"current_size": 20,
"max_size": 50,
"average_wait_time_secs": 175
}
}