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

# Update Phone Number

> Update label, inbound binding, or activation state of a phone number

Changing `inbound_workflow_id` re-syncs the inbound webhook with the provider; the response includes a `provider_sync` block with the result.

To remove an existing inbound binding, send `clear_inbound_workflow: true`. Sending `inbound_workflow_id: null` alone is treated as "no change".

A phone number can route inbound calls to one assistant at a time. Before moving an assigned number, ask the user to confirm that routing to the previous assistant will be removed. Send `confirm_reassignment: true` and `expected_inbound_workflow_id` set to that previous assistant's ID along with the new `inbound_workflow_id`.

An unconfirmed move or an assignment that changed since it was read returns **409 Conflict** without changing the number. Reload its current assignment and obtain confirmation again. Include `expected_inbound_workflow_id` when clearing routing as well, to avoid removing an assignment made from another page.


## OpenAPI

````yaml PUT /api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}
openapi: 3.1.0
info:
  title: Bandwidth Agent Builder API
  version: v1
  description: >-
    Manage agents, place calls, and retrieve conversation results in your
    workspace.
servers:
  - url: https://agents.labs.bandwidth.com
    description: Workspace API
security: []
paths:
  /api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}:
    put:
      tags:
        - telephony-configs
      summary: Update Phone Number
      description: Update label, inbound binding, or activation state of a phone number
      operationId: >-
        update_phone_number_api_v1_organizations_telephony_configs__config_id__phone_numbers__phone_number_id__put
      parameters:
        - name: config_id
          in: path
          required: true
          schema:
            type: integer
            title: Config Id
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: integer
            title: Phone Number Id
        - name: X-VOAI-ORGANIZATION-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Voai-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumberUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LabsAuth: []
        - LabsApiKey: []
components:
  schemas:
    PhoneNumberUpdateRequest:
      properties:
        label:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Label
        inbound_workflow_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Inbound Workflow Id
        clear_inbound_workflow:
          type: boolean
          title: Clear Inbound Workflow
          default: false
        confirm_reassignment:
          type: boolean
          title: Confirm Reassignment
          default: false
        expected_inbound_workflow_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expected Inbound Workflow Id
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        country_code:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: Country Code
        extra_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Metadata
      type: object
      title: PhoneNumberUpdateRequest
    PhoneNumberResponse:
      properties:
        id:
          type: integer
          title: Id
        telephony_configuration_id:
          type: integer
          title: Telephony Configuration Id
        address:
          type: string
          title: Address
        address_normalized:
          type: string
          title: Address Normalized
        address_type:
          type: string
          title: Address Type
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        inbound_workflow_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Inbound Workflow Id
        inbound_workflow_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Inbound Workflow Name
        is_active:
          type: boolean
          title: Is Active
        is_default_caller_id:
          type: boolean
          title: Is Default Caller Id
        extra_metadata:
          additionalProperties: true
          type: object
          title: Extra Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        provider_sync:
          anyOf:
            - $ref: '#/components/schemas/ProviderSyncStatus'
            - type: 'null'
      type: object
      required:
        - id
        - telephony_configuration_id
        - address
        - address_normalized
        - address_type
        - is_active
        - is_default_caller_id
        - extra_metadata
        - created_at
        - updated_at
      title: PhoneNumberResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProviderSyncStatus:
      properties:
        ok:
          type: boolean
          title: Ok
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - ok
      title: ProviderSyncStatus
    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:
    LabsAuth:
      type: http
      scheme: bearer
    LabsApiKey:
      type: apiKey
      in: header
      name: X-BW-LABS-AGENTS-API-KEY

````