Skip to main content
POST
/
v1
/
phone-numbers
Register (with inbound_routing override)
curl --request POST \
  --url https://api.oneinbox.ai/v1/phone-numbers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone_number": "+15739693824",
  "provider": "twilio",
  "agent_id": "<string>",
  "provider_config": {
    "trunk_address": "oneinbox-prod.pstn.twilio.com",
    "auth_username": "oneinbox",
    "auth_password": "<string>"
  },
  "friendly_name": "oneinbox-prod-1",
  "inbound_routing": {
    "agent_id": "<string>",
    "fallback": {
      "agent_id": "<string>"
    },
    "voicemail_message": "Sorry, we missed your call. Please call back during business hours."
  }
}
'
{
  "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"
}

Documentation Index

Fetch the complete documentation index at: https://docs.oneinbox.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use api_key from POST /v1/api-keys

Body

application/json
phone_number
string
required
Example:

"+15739693824"

provider
string
required

Your telephony provider. Any SIP-compatible carrier is supported (e.g. Twilio, Telnyx, Vonage, Bandwidth).

Example:

"twilio"

agent_id
string
required
provider_config
object
required

SIP trunk configuration from your provider's console.

friendly_name
string
Example:

"oneinbox-prod-1"

inbound_routing
object

Optional. Override how inbound calls to this number are routed. By default, calls route to agent_id.

Response

Created

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>