Skip to main content

Update number configuration

Update number configuration

PATCH
https://api.agora.io/api/conversational-ai-agent/v2/phone-numbers/{phone_number}

Use this endpoint to update the configuration for a phone number.

Request

Path parameters

phone_number stringrequired

Telephone number in E.164 format. For example, +11234567890.

Request body

APPLICATION/JSON
Request Body
  • inbound_config objectnullable

    Update inbound call configuration. Passing null will clear the configuration.

    Show propertiesHide properties
    • pipeline_id stringnullable

      Pipeline ID.

  • outbound_config objectnullable

    Update outbound call configuration. Passing null will clear the configuration.

    Show propertiesHide properties
    • pipeline_id stringnullable

      Pipeline ID.

Response

  • If the returned status code is 200, the request was successful. The response body contains the result of the request.

    Response Body
    • provider string

      Possible values: byo, twilio

      Number provider:

      • byo: BYO (Bring Your Own)
      • twilio: Twilio
    • phone_number string

      A telephone number in E.164 format, used as a unique identifier.

    • label string

      A label used to identify the number.

    • inbound boolean

      Whether the number supports inbound calls.

    • outbound boolean

      Whether the number supports outbound calls.

    • associated_pipeline object

      The associated pipeline information. Returns null if no pipeline is associated.

      Show propertiesHide properties
      • pipeline_id string

        Pipeline ID.

      • pipeline_name string

        Pipeline name.

    • inbound_config object

      SIP inbound call configuration details. Returns null if not configured.

    • outbound_config object

      SIP outbound call configuration details. Returns null if not configured.

  • If the returned status code is not 200, the request failed. The response body includes the error code and description. Refer to status codes to understand the possible reasons for failure.

    Error Response
    • error_type string

      The type of error that occurred.

    • description string

      A detailed description of the error.

Authorization

This endpoint requires Basic Auth.

Request example


_13
curl --request PATCH \
_13
--url https://api.agora.io/api/conversational-ai-agent/v2/phone-numbers/:phone_number \
_13
--header 'Authorization: Basic <credentials>' \
_13
--header 'Content-Type: application/json' \
_13
--data '
_13
{
_13
"inbound_config": {
_13
"pipeline_id": "xxxxx"
_13
},
_13
"outbound_config": {
_13
"pipeline_id": "xxxxx"
_13
}
_13
}'

Response example


_11
{
_11
"provider": "byo",
_11
"phone_number": "+11234567890",
_11
"label": "Customer Support Line",
_11
"inbound": true,
_11
"outbound": true,
_11
"associated_pipeline": {
_11
"pipeline_id": "pipeline_id_12345",
_11
"pipeline_name": "New Support Bot"
_11
}
_11
}