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

# Update Phone Number

> Update phone number configuration.

Supports partial updates:
- enable_outbound: Enable/disable outbound calling
- status: Change status (active, inactive, suspended)
- provider_config: Update provider-specific configuration
- metadata: Update metadata

**Note:** Changing core SIP settings (trunk IDs, dispatch rules) requires 
deleting and re-registering the phone number.

**LiveKit Sync:** Status changes are reflected in LiveKit metadata, 
but dispatch rules remain active. To fully remove from LiveKit, use DELETE.



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json patch /agents/{agent_id}/phone-numbers/{phone_number}
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/{agent_id}/phone-numbers/{phone_number}:
    patch:
      tags:
        - agent-phone-numbers
      summary: Update Phone Number
      description: >-
        Update phone number configuration.


        Supports partial updates:

        - enable_outbound: Enable/disable outbound calling

        - status: Change status (active, inactive, suspended)

        - provider_config: Update provider-specific configuration

        - metadata: Update metadata


        **Note:** Changing core SIP settings (trunk IDs, dispatch rules)
        requires 

        deleting and re-registering the phone number.


        **LiveKit Sync:** Status changes are reflected in LiveKit metadata, 

        but dispatch rules remain active. To fully remove from LiveKit, use
        DELETE.
      operationId: update_phone_number_agents__agent_id__phone_numbers__phone_number__patch
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: phone_number
          in: path
          required: true
          schema:
            type: string
            title: Phone Number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumberUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PhoneNumberUpdate:
      properties:
        enable_outbound:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable Outbound
        status:
          anyOf:
            - type: string
              pattern: ^(active|inactive|suspended)$
            - type: 'null'
          title: Status
        provider_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Provider Config
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
      type: object
      title: PhoneNumberUpdate
      description: Schema for updating phone number configuration.
    PhoneNumberResponse:
      properties:
        agent_id:
          type: string
          title: Agent Id
        phone_number:
          type: string
          title: Phone Number
        provider:
          type: string
          title: Provider
        sip_uri:
          type: string
          title: Sip Uri
        dispatch_rule_id:
          type: string
          title: Dispatch Rule Id
        outbound_enabled:
          type: boolean
          title: Outbound Enabled
        outbound_trunk_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Outbound Trunk Id
          description: LiveKit outbound trunk ID if outbound is enabled
        outbound_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Outbound Address
          description: SIP address used for outbound calls (e.g., sip.telnyx.com)
        status:
          type: string
          title: Status
        created_at:
          type: string
          title: Created At
        instructions:
          additionalProperties: true
          type: object
          title: Instructions
        provider_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Provider Config
        room_pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Room Pattern
          description: LiveKit room naming pattern for this agent's calls
        livekit_sip_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Livekit Sip Domain
          description: LiveKit SIP domain for this deployment
        inbound_addresses:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Inbound Addresses
          description: LiveKit inbound SIP server addresses
        supported_providers:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Supported Providers
          description: List of supported SIP providers with default addresses
      type: object
      required:
        - agent_id
        - phone_number
        - provider
        - sip_uri
        - dispatch_rule_id
        - outbound_enabled
        - status
        - created_at
        - instructions
      title: PhoneNumberResponse
      description: Response for phone number registration.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````