Skip to main content
POST
/
texml
/
Accounts
/
{account_sid}
/
Queues
/
{queue_sid}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const queue = await client.texml.accounts.queues.update('queue_sid', {
  account_sid: 'account_sid',
});

console.log(queue.account_sid);
{
  "account_sid": "4e71926f-8f13-450e-b91c-23c2ef786aa6",
  "average_wait_time": 30,
  "current_size": 3,
  "date_created": "Fri, 27 Oct 2023 07:41:58 +0000",
  "date_updated": "Fri, 27 Oct 2023 07:41:58 +0000",
  "max_size": 10,
  "sid": "my-queue",
  "uri": "/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Queues/my-queue.json",
  "subresource_uris": {
    "members": "/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Queues/my-queue/Members.json"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_sid
string
required

The id of the account the resource belongs to.

queue_sid
string
required

The QueueSid that identifies the call queue.

Body

application/x-www-form-urlencoded

Update Queue request object

MaxSize
integer

The maximum size of the queue.

Example:

10

Response

Queue resource.

account_sid
string

The id of the account the resource belongs to.

Example:

"4e71926f-8f13-450e-b91c-23c2ef786aa6"

average_wait_time
integer

The average wait time in seconds for members in the queue.

Example:

30

current_size
integer

The current number of members in the queue.

Example:

3

date_created
string

The timestamp of when the resource was created.

Example:

"Fri, 27 Oct 2023 07:41:58 +0000"

date_updated
string

The timestamp of when the resource was last updated.

Example:

"Fri, 27 Oct 2023 07:41:58 +0000"

max_size
integer

The maximum size of the queue.

Example:

10

sid
string

The unique identifier of the queue.

Example:

"my-queue"

uri
string

The relative URI for this queue.

Example:

"/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Queues/my-queue.json"

subresource_uris
object

A list of related resources identified by their relative URIs.

Example:
{
"members": "/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Queues/my-queue/Members.json"
}