> ## 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 Mobile Voice Connection

> Update the settings of a specific mobile voice connection.



## OpenAPI

````yaml /openapi/source/external/mobile_voice_connections/mobile_voice_connections.json patch /v2/mobile_voice_connections/{id}
openapi: 3.1.0
info:
  version: 2.0.0
  x-latency-category: responsive
  x-endpoint-cost: light
  title: Telnyx API
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Mobile Voice Connections
    description: Mobile voice connection operations
paths:
  /v2/mobile_voice_connections/{id}:
    patch:
      tags:
        - Mobile Voice Connections
      summary: Update a Mobile Voice Connection
      description: Update the settings of a specific mobile voice connection.
      operationId: updateMobileVoiceConnection
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the mobile voice connection
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileVoiceConnectionUpdate'
            example:
              active: false
              connection_name: string
              webhook_api_version: '1'
              webhook_timeout_secs: 0
              tags:
                - string
              outbound:
                channel_limit: 0
                outbound_voice_profile_id: string
              inbound:
                channel_limit: 0
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MobileVoiceConnection'
        '404':
          description: Resource not found
        '409':
          description: >-
            Conflict. Another update to this connection is still in progress.
            Wait and retry the request later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
              example:
                errors:
                  - detail: >-
                      A previous update to this connection is still in progress.
                      Please try again later.
        '422':
          description: Unprocessable Entity
      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 mobileVoiceConnection = await
            client.mobileVoiceConnections.update('id');


            console.log(mobileVoiceConnection.data);
        - 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
            )
            mobile_voice_connection = client.mobile_voice_connections.update(
                id="id",
            )
            print(mobile_voice_connection.data)
        - 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\tmobileVoiceConnection, err := client.MobileVoiceConnections.Update(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\ttelnyx.MobileVoiceConnectionUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", mobileVoiceConnection.Data)\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.mobilevoiceconnections.MobileVoiceConnectionUpdateParams;

            import
            com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateResponse;


            public final class Main {
                private Main() {}

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

                    MobileVoiceConnectionUpdateResponse mobileVoiceConnection = client.mobileVoiceConnections().update("id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            mobile_voice_connection =
            telnyx.mobile_voice_connections.update("id")


            puts(mobile_voice_connection)
        - 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 {
              $mobileVoiceConnection = $client->mobileVoiceConnections->update(
                'id',
                active: true,
                connectionName: 'connection_name',
                inbound: ['channelLimit' => 0],
                outbound: [
                  'channelLimit' => 0,
                  'outboundVoiceProfileID' => 'outbound_voice_profile_id',
                ],
                tags: ['string'],
                webhookAPIVersion: '1',
                webhookEventFailoverURL: 'webhook_event_failover_url',
                webhookEventURL: 'webhook_event_url',
                webhookTimeoutSecs: 0,
              );

              var_dump($mobileVoiceConnection);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx mobile-voice-connections update \
              --api-key 'My API Key' \
              --id id
components:
  schemas:
    MobileVoiceConnectionUpdate:
      type: object
      required: []
      properties:
        active:
          type: boolean
        connection_name:
          type: string
        webhook_event_url:
          type:
            - string
            - 'null'
        webhook_event_failover_url:
          type:
            - string
            - 'null'
        webhook_api_version:
          type: string
          enum:
            - '1'
            - '2'
        webhook_timeout_secs:
          type: integer
        tags:
          type: array
          items:
            type: string
        outbound:
          type: object
          properties:
            channel_limit:
              type: integer
            outbound_voice_profile_id:
              type: string
        inbound:
          type: object
          properties:
            channel_limit:
              type: integer
    MobileVoiceConnection:
      type: object
      properties:
        id:
          type: string
          description: Identifies the resource.
          readOnly: true
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: mobile_voice_connection
          enum:
            - mobile_voice_connection
          readOnly: true
        active:
          type: boolean
          description: Indicates if the connection is active.
        connection_name:
          type: string
          description: The name of the connection.
        tags:
          type: array
          items:
            type: string
          description: A list of tags associated with the connection.
        webhook_event_url:
          type:
            - string
            - 'null'
          description: The URL where webhooks are sent.
        webhook_event_failover_url:
          type:
            - string
            - 'null'
          description: The failover URL where webhooks are sent.
        webhook_api_version:
          type:
            - string
            - 'null'
          description: The API version for webhooks.
          enum:
            - '1'
            - '2'
        webhook_timeout_secs:
          type:
            - integer
            - 'null'
          description: The timeout for webhooks in seconds.
        outbound:
          type: object
          properties:
            channel_limit:
              type:
                - integer
                - 'null'
            outbound_voice_profile_id:
              type:
                - string
                - 'null'
        inbound:
          type: object
          properties:
            channel_limit:
              type:
                - integer
                - 'null'
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````