List queue resources
Returns a paginated list of queue resources for the account, with support for filtering by creation or update dates.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const queueListResponse of client.texml.accounts.queues.list('account_sid')) {
console.log(queueListResponse.account_sid);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.texml.accounts.queues.list(
account_sid="account_sid",
)
page = page.queues[0]
print(page.account_sid)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Texml.Accounts.Queues.List(
context.TODO(),
"account_sid",
telnyx.TexmlAccountQueueListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.texml.accounts.queues.QueueListPage;
import com.telnyx.sdk.models.texml.accounts.queues.QueueListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
QueueListPage page = client.texml().accounts().queues().list("account_sid");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.texml.accounts.queues.list("account_sid")
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->texml->accounts->queues->list(
'account_sid',
dateCreated: 'DateCreated',
dateUpdated: 'DateUpdated',
page: 0,
pageSize: 0,
pageToken: 'PageToken',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx texml:accounts:queues list \
--api-key 'My API Key' \
--account-sid account_sidcurl --request GET \
--url https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Queues \
--header 'Authorization: Bearer <token>'{
"queues": [],
"end": 0,
"first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1",
"next_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ",
"page": 0,
"page_size": 1,
"start": 0,
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1"
}{
"errors": [
{
"detail": "Resource not found"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The UUID of the Telnyx account that owns the resource, for example f5586561-8ff0-4291-a51b-c7dfe4139ff9. The account_sid path segment is kept for Twilio API compatibility, but the value is a Telnyx account UUID, not a Twilio AC... SID. It must match the account that owns the API key used to authenticate the request, otherwise the endpoint returns 404. The same value is sent as AccountSid in TeXML webhooks.
"f5586561-8ff0-4291-a51b-c7dfe4139ff9"
Query Parameters
The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken.
The number of records to be displayed on a page
Used to request the next page of results.
Filters conferences by the creation date. Expected format is YYYY-MM-DD. Also accepts inequality operators, e.g. DateCreated>=2023-05-22.
Filters conferences by the time they were last updated. Expected format is YYYY-MM-DD. Also accepts inequality operators, e.g. DateUpdated>=2023-05-22.
Response
Multiple queue resources.
Show child attributes
Show child attributes
The number of the last element on the page, zero-indexed.
19
/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1
"accepted"
/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ
"accepted"
Current page number, zero-indexed.
0
The number of items on the page
20
The number of the first element on the page, zero-indexed.
0
The URI of the current page.
"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1"
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const queueListResponse of client.texml.accounts.queues.list('account_sid')) {
console.log(queueListResponse.account_sid);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.texml.accounts.queues.list(
account_sid="account_sid",
)
page = page.queues[0]
print(page.account_sid)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Texml.Accounts.Queues.List(
context.TODO(),
"account_sid",
telnyx.TexmlAccountQueueListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.texml.accounts.queues.QueueListPage;
import com.telnyx.sdk.models.texml.accounts.queues.QueueListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
QueueListPage page = client.texml().accounts().queues().list("account_sid");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.texml.accounts.queues.list("account_sid")
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->texml->accounts->queues->list(
'account_sid',
dateCreated: 'DateCreated',
dateUpdated: 'DateUpdated',
page: 0,
pageSize: 0,
pageToken: 'PageToken',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx texml:accounts:queues list \
--api-key 'My API Key' \
--account-sid account_sidcurl --request GET \
--url https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Queues \
--header 'Authorization: Bearer <token>'{
"queues": [],
"end": 0,
"first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1",
"next_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ",
"page": 0,
"page_size": 1,
"start": 0,
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1"
}{
"errors": [
{
"detail": "Resource not found"
}
]
}