Skip to main content
POST
/
v1
/
phone-numbers
/
{phone_number_id}
/
inbound-routing
curl --request POST \
  --url https://api.oneinbox.ai/v1/phone-numbers/{phone_number_id}/inbound-routing \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "agt_inbound456"
}
'
{
  "id": "<string>",
  "phone_number": "<string>",
  "friendly_name": "<string>",
  "provider": "<string>",
  "agent_id": "<string>",
  "inbound_trunk_id": "<string>",
  "outbound_trunk_id": "<string>",
  "dispatch_rule_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Use api_key from POST /v1/api-keys

Path Parameters

phone_number_id
string
required

Body

application/json
agent_id
string
required

Agent to handle inbound calls on this number

Example:

"agt_inbound456"

fallback
object

Fallback agent if the primary inbound agent is unavailable

voicemail_message
string

Message left when voicemail is detected

Example:

"Sorry we missed you. Please call back during business hours."

Response

201 - application/json

Created — inbound routing enabled

id
string
phone_number
string
friendly_name
string
provider
string
agent_id
string
status
enum<string>
Available options:
active,
inactive
inbound_trunk_id
string
outbound_trunk_id
string
dispatch_rule_id
string
created_at
string<date-time>
updated_at
string<date-time>