Skip to main content
PUT
/
api
/
numbers
/
{number}
/
agent
Update phone number assignment
curl --request PUT \
  --url https://api.upon-ai.com/api/numbers/{number}/agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountSid": "29e90072-fb58-4c6c-870a-43005115131e",
  "workspaceId": 1,
  "outboundAgentId": "agent_d3c2df14e163c7ca8ac5b1bf38",
  "outboundAgentVersion": 0,
  "inboundAgents": [
    {
      "agent_id": "agent_d3c2df14e163c7ca8ac5b1bf38",
      "agent_version": 0,
      "weight": 0.5
    },
    {
      "agent_id": "agent_1f864a29b7c2ab407103c88335",
      "agent_version": 0,
      "weight": 0.5
    }
  ],
  "inboundWebhookUrl": "https://app.uponai.com/inbound-dynamic-vars/1/uponaiworkspace-913",
  "isTimeRoutingEnabled": false
}
'
{
  "success": true,
  "message": "<string>",
  "numbers": [
    {
      "id": 123,
      "number": "<string>",
      "base_number": "<string>",
      "account_sid": "<string>",
      "workspace_id": 123,
      "agent_id": "<string>",
      "default_agent_id": "<string>",
      "inbound_agent_id": "<string>",
      "inbound_agents": [
        {
          "agent_id": "<string>",
          "agent_version": 123,
          "weight": 123
        }
      ],
      "outbound_agents": [
        {
          "agent_id": "<string>",
          "agent_version": 123,
          "weight": 123
        }
      ],
      "inbound_agent_version": 123,
      "outbound_agent_version": 123,
      "application_sid": "<string>",
      "phone_number_sid": "<string>",
      "inbound_webhook_url": "<string>",
      "is_time_routing_enabled": true,
      "platform_import_error": true,
      "platform_import_error_message": "<string>"
    }
  ],
  "assignment": {
    "account_sid": "<string>",
    "workspace_id": 123,
    "agent_id": "<string>",
    "inbound_agent_id": "<string>",
    "outbound_agents": [
      {
        "agent_id": "<string>",
        "agent_version": 123,
        "weight": 123
      }
    ],
    "inbound_agents": [
      {
        "agent_id": "<string>",
        "agent_version": 123,
        "weight": 123
      }
    ],
    "is_time_routing_enabled": true,
    "platform_import_error": true,
    "platform_import_error_message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Generate tokens from your profile settings at app.uponai.com.

Path Parameters

number
string
required

Phone number or extension identifier to update.

Body

application/json
accountSid
string
required
workspaceId
integer
required
outboundAgentId
string | null
outboundAgentVersion
integer
inboundAgents
object[]
inboundWebhookUrl
string<uri> | null
isTimeRoutingEnabled
boolean

Response

Updated phone number assignment.

success
boolean
message
string
numbers
object[]
assignment
object