> ## 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.

# Update a queue resource

> Updates a queue resource.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/texml/queues.yml post /texml/Accounts/{account_sid}/Queues/{queue_sid}
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/{queue_sid}:
    post:
      tags:
        - TeXML REST Commands
      summary: Update a queue resource
      description: Updates a queue resource.
      operationId: UpdateTexmlQueue
      parameters:
        - $ref: '#/components/parameters/AccountSid'
        - $ref: '#/components/parameters/QueueSid'
      requestBody:
        description: Update Queue request object
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/call-scripting_UpdateQueueRequest'
      responses:
        '200':
          $ref: '#/components/responses/GetQueueResponse'
        '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
            });


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


            console.log(queue.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
            )
            queue = client.texml.accounts.queues.update(
                queue_sid="queue_sid",
                account_sid="account_sid",
            )
            print(queue.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\tqueue, err := client.Texml.Accounts.Queues.Update(\n\t\tcontext.TODO(),\n\t\t\"queue_sid\",\n\t\ttelnyx.TexmlAccountQueueUpdateParams{\n\t\t\tAccountSid: \"account_sid\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", queue.AccountSid)\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.QueueUpdateParams;

            import
            com.telnyx.sdk.models.texml.accounts.queues.QueueUpdateResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    QueueUpdateParams params = QueueUpdateParams.builder()
                        .accountSid("account_sid")
                        .queueSid("queue_sid")
                        .build();
                    QueueUpdateResponse queue = client.texml().accounts().queues().update(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            queue = telnyx.texml.accounts.queues.update("queue_sid",
            account_sid: "account_sid")


            puts(queue)
        - 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 {
              $queue = $client->texml->accounts->queues->update(
                'queue_sid', accountSid: 'account_sid', maxSize: 10
              );

              var_dump($queue);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx texml:accounts:queues update \
              --api-key 'My API Key' \
              --account-sid account_sid \
              --queue-sid queue_sid
components:
  parameters:
    AccountSid:
      name: account_sid
      in: path
      required: true
      description: The id of the account the resource belongs to.
      schema:
        type: string
    QueueSid:
      name: queue_sid
      in: path
      required: true
      description: The QueueSid that identifies the call queue.
      schema:
        type: string
  schemas:
    call-scripting_UpdateQueueRequest:
      type: object
      title: Update Queue Request
      properties:
        MaxSize:
          type: integer
          description: The maximum size of the queue.
          example: 10
      example:
        MaxSize: 10
    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
    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
  responses:
    GetQueueResponse:
      description: Queue resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QueueResource'
    call-scripting_NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/call-scripting_ResourceNotFoundError'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````