Skip to main content
POST
Register Phone Number

Authorizations

Authorization
string
header
required

Your API key sent as a Bearer credential — Authorization: Bearer <api_key>, where <api_key> starts with oi_sk_ (create one via POST /v1/api-keys). Although the field is labelled 'token', paste your API key here. A dashboard JWT is also accepted on this header for the same endpoints.

Body

application/json
phone_number
string
required
Pattern: ^\+[1-9]\d{1,14}$
provider
enum<string>
required
Available options:
twilio,
telnyx
agent_id
string<uuid>
required
friendly_name
string | null
provider_config
SipProviderConfig · object

SIP digest credentials for outbound trunk auth.

Same three fields for Twilio and Telnyx — they both speak SIP and need a username/password pair plus the trunk address. The values differ per provider:

twilio: trunk_address: '.pstn.twilio.com' auth_username: Twilio Elastic SIP Trunk credential username auth_password: matching password (never logged, stripped from DB)

telnyx: trunk_address: 'sip.telnyx.com' (or your region-specific edge) auth_username: Telnyx SIP connection auth username auth_password: matching password

All fields are OPTIONAL at the schema layer because the service falls back to env vars ({PROVIDER}_TRUNK_ADDRESS, {PROVIDER}_SIP_USERNAME, {PROVIDER}_SIP_PASSWORD) when omitted. The service raises 400 SIP_TRUNK_PROVISION_FAILED if neither path provides all three.

extra="allow" preserves forward-compat — future provider-specific knobs (e.g. Twilio's messaging_service_sid) can be added by callers without us bumping the API.

inbound_routing
InboundRouting · object | null

Per-number routing override. Stored as JSONB so we can extend with business-hours and caller-id rules later without a schema change.

credential_id
string<uuid> | null

Response

Successful Response

id
string
required
phone_number
string
required
friendly_name
string | null
required
provider
string
required
agent_id
string
required
status
string
required
inbound_trunk_id
string | null
required
outbound_trunk_id
string | null
required
dispatch_rule_id
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
inbound_routing
InboundRouting · object | null

Per-number routing override. Stored as JSONB so we can extend with business-hours and caller-id rules later without a schema change.

sms_capable
boolean | null