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

# Assign Phone Number

> Assigns a phone number for a specific agent by their ID.



## OpenAPI

````yaml /api-reference/openapi.json put /api/agents/{agent_id}/phone-number
openapi: 3.1.0
info:
  title: Ello.AI API
  description: API for managing agents and calls in Ello.AI
  version: 1.0.0
servers:
  - url: https://api.getello.ai/
security: []
paths:
  /api/agents/{agent_id}/phone-number:
    put:
      tags:
        - Agents
      summary: Assign Phone Number
      description: Assigns a phone number for a specific agent by their ID.
      parameters:
        - name: agent_id
          in: path
          required: true
          description: >-
            Unique identifier of the agent to assign or update the phone number
            for.
          schema:
            type: string
            example: 786786778hj
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              example: {}
              properties:
                phone_number:
                  type: string
                  description: The phone number to be assigned or updated for the agent.
                  example: '786786709'
              required:
                - phone_number
      responses:
        '200':
          description: Phone number assigned or updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Phone number assigned successfully
                  data:
                    type: object
                    example:
                      agent_id: 786786778hj
                      phone_number: '786786709'
                      assignment_status: success
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Unexpected error
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Authentication token is missing or invalid
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Error while updating agent phone number
      security:
        - apiKey: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````