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

# Assign Agent to Phone Number

> Assign or unassign an agent to a phone number



## OpenAPI

````yaml PATCH /settings/phone
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /settings/phone:
    patch:
      summary: Assign Agent to Phone Number
      description: Assign or unassign an agent to a phone number
      requestBody:
        description: Phone number assignment details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumberAssign'
      responses:
        '200':
          description: Phone number assignment updated successfully
        '400':
          description: >-
            Bad Request - Invalid phone_number_id or cannot assign to
            verified_caller_id
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions (requires level 4)
        '404':
          description: Phone number not found
      security:
        - CompanyApiKey: []
components:
  schemas:
    PhoneNumberAssign:
      type: object
      required:
        - phone_number_id
        - owner
      properties:
        phone_number_id:
          type: string
        owner:
          type: string
          enum:
            - company
            - agency
        agent:
          type: string
          nullable: true
          description: Agent ID or null to unassign
        sip_uri:
          type: string
          description: Optional SIP credential update
        sip_username:
          type: string
          description: Optional SIP credential update
        sip_password:
          type: string
          description: Optional SIP credential update
  securitySchemes:
    CompanyApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Company API Key

````