> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List queue resources

> Lists queue resources.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/texml/queues.yml get /texml/Accounts/{account_sid}/Queues
openapi: 3.1.0
info:
  title: Telnyx TeXML Queues API
  version: 2.0.0
  description: API for managing TeXML Queues.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Command
    description: TeXML command operations
  - name: Callbacks
    description: Webhook callbacks for call events
paths:
  /texml/Accounts/{account_sid}/Queues:
    get:
      tags:
        - TeXML REST Commands
      summary: List queue resources
      description: Lists queue resources.
      operationId: GetTexmlQueues
      parameters:
        - $ref: '#/components/parameters/AccountSid'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/PageToken'
        - $ref: '#/components/parameters/DateCreated'
        - $ref: '#/components/parameters/DateUpdated'
      responses:
        '200':
          $ref: '#/components/responses/GetQueuesResponse'
        '404':
          $ref: '#/components/responses/call-scripting_NotFoundResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            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);
            }
        - lang: Python
          source: |-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Texml.Accounts.Queues.List(\n\t\tcontext.TODO(),\n\t\t\"account_sid\",\n\t\ttelnyx.TexmlAccountQueueListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: |-
            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");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.texml.accounts.queues.list("account_sid")

            puts(page)
        - lang: PHP
          source: >-
            <?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();
            }
        - lang: CLI
          source: |-
            telnyx texml:accounts:queues list \
              --api-key 'My API Key' \
              --account-sid account_sid
components:
  parameters:
    AccountSid:
      name: account_sid
      in: path
      required: true
      description: The id of the account the resource belongs to.
      schema:
        type: string
    Page:
      name: Page
      in: query
      required: false
      description: >-
        The number of the page to be displayed, zero-indexed, should be used in
        conjuction with PageToken.
      schema:
        type: integer
      example: 1
    PageSize:
      name: PageSize
      in: query
      required: false
      description: The number of records to be displayed on a page
      schema:
        type: integer
      example: 10
    PageToken:
      name: PageToken
      in: query
      required: false
      description: Used to request the next page of results.
      schema:
        type: string
    DateCreated:
      name: DateCreated
      in: query
      required: false
      description: >-
        Filters conferences by the creation date. Expected format is YYYY-MM-DD.
        Also accepts inequality operators, e.g. DateCreated>=2023-05-22.
      schema:
        type: string
      example: '>=2023-05-22'
    DateUpdated:
      name: DateUpdated
      in: query
      required: false
      description: >-
        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.
      schema:
        type: string
      example: '>=2023-05-22'
  responses:
    GetQueuesResponse:
      description: Multiple queue resources.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QueueResourceIndex'
    call-scripting_NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/call-scripting_ResourceNotFoundError'
  schemas:
    QueueResourceIndex:
      type: object
      title: Multiple queue resources
      example:
        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
      properties:
        queues:
          type: array
          items:
            $ref: '#/components/schemas/QueueResource'
        end:
          type: integer
          description: The number of the last element on the page, zero-indexed.
          example: 19
        first_page_uri:
          type: string
          description: >-
            /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1
          example: accepted
        next_page_uri:
          type: string
          description: >-
            /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ
          example: accepted
        page:
          type: integer
          description: Current page number, zero-indexed.
          example: 0
        page_size:
          type: integer
          description: The number of items on the page
          example: 20
        start:
          type: integer
          description: The number of the first element on the page, zero-indexed.
          example: 0
        uri:
          type: string
          description: The URI of the current page.
          example: >-
            /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Queues.json?Page=0&PageSize=1
    call-scripting_ResourceNotFoundError:
      type: object
      title: Resource not found
      example:
        errors:
          - detail: Resource not found
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
    QueueResource:
      type: object
      title: Queue resource
      example:
        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
      properties:
        account_sid:
          type: string
          description: The id of the account the resource belongs to.
          example: 4e71926f-8f13-450e-b91c-23c2ef786aa6
        average_wait_time:
          type: integer
          description: The average wait time in seconds for members in the queue.
          example: 30
        current_size:
          type: integer
          description: The current number of members in the queue.
          example: 3
        date_created:
          type: string
          description: The timestamp of when the resource was created.
          example: Fri, 27 Oct 2023 07:41:58 +0000
        date_updated:
          type: string
          description: The timestamp of when the resource was last updated.
          example: Fri, 27 Oct 2023 07:41:58 +0000
        max_size:
          type: integer
          description: The maximum size of the queue.
          example: 10
        sid:
          type: string
          description: The unique identifier of the queue.
          example: my-queue
        uri:
          type: string
          description: The relative URI for this queue.
          example: /Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Queues/my-queue.json
        subresource_uris:
          type: object
          description: A list of related resources identified by their relative URIs.
          example:
            members: >-
              /Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Queues/my-queue/Members.json
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````