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

# Attach phone number



## OpenAPI

````yaml /openapi.yaml post /api/v1/agents/{id}/attach_phone_number
openapi: 3.0.3
info:
  title: Callaro API
  version: 1.0.0
  description: >-
    Public API for Callaro.ai, the enterprise Voice AI platform for outbound and
    inbound calling.


    This file is generated from the backend source of truth at
    `voice_saas_api/docs/openapi.yaml`.

    Internal-only routes are removed automatically during generation.
  license:
    name: Proprietary
    url: https://callaro.ai
servers:
  - url: https://api.callaro.ai
    description: Production
  - url: https://sandbox.api.callaro.ai
    description: Sandbox
security:
  - bearerAuth: []
  - tenantApiKey: []
  - partnerApiKey: []
tags:
  - name: Health
    description: Service health and readiness probes.
  - name: Auth
    description: Authentication and session bootstrap endpoints.
  - name: Dashboard
    description: Operational dashboard and summary endpoints.
  - name: Partners
    description: Partner management endpoints.
  - name: BillingEntities
    description: Billing entity configuration and lifecycle.
  - name: Tenants
    description: Tenant listing and management endpoints.
  - name: Agents
    description: Voice agent configuration and lifecycle.
  - name: TenantTools
    description: Tenant tool definitions and runtime helpers.
  - name: PhoneNumbers
    description: Phone number inventory and provider operations.
  - name: TelephonyConnections
    description: Telephony provider connection management.
  - name: VoiceSessions
    description: Call log, transcript, and recording resources.
  - name: CallTraces
    description: Call trace diagnostics and telemetry.
  - name: Usage
    description: Usage reporting and cost summary endpoints.
  - name: Users
    description: User profile and membership endpoints.
  - name: FilterableAttributes
    description: Metadata and filter capability endpoints.
  - name: Assets
    description: Asset upload and retrieval endpoints.
  - name: ApiKeys
    description: API key management endpoints.
  - name: Voices
    description: Voice catalog and voice usage endpoints.
  - name: Billing
    description: Billing and wallet operations.
  - name: Campaigns
    description: Campaign orchestration endpoints.
  - name: CampaignExports
    description: Campaign export job endpoints.
  - name: Contacts
    description: Contact lifecycle operations.
  - name: ContactImports
    description: Contact import job endpoints.
  - name: ContactExports
    description: Contact export job endpoints.
  - name: ContactSegments
    description: Contact segmentation endpoints.
  - name: Webhooks
    description: Webhook ingress and relay endpoints.
  - name: PartnerAPI
    description: Partner namespace endpoints for multi-tenant operations.
paths:
  /api/v1/agents/{id}/attach_phone_number:
    post:
      tags:
        - Agents
      summary: Attach phone number
      operationId: postAgentsIdAttachPhoneNumber
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - phone_number_id
              properties:
                phone_number_id:
                  type: string
      responses:
        '200':
          description: Attached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
        - tenantApiKey: []
components:
  schemas:
    SuccessEnvelope:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
          nullable: true
        message:
          type: string
          nullable: true
        meta:
          type: object
          additionalProperties: true
          nullable: true
        request_id:
          type: string
          nullable: true
    ErrorEnvelope:
      type: object
      required:
        - error
        - error_code
      properties:
        error:
          type: string
        error_code:
          type: string
        request_id:
          type: string
        details:
          type: object
          additionalProperties: true
        errors:
          description: Optional contract errors (array or object).
          oneOf:
            - type: array
              items:
                type: string
            - type: object
              additionalProperties: true
  responses:
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    tenantApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
    partnerApiKey:
      type: apiKey
      in: header
      name: X-Partner-Api-Key

````