Purchase Phone Number
Buy a phone number through OneInbox and wire it to an agent in one step.
OneInbox provisions the number on its own carrier account — the caller brings
no external provider account or credentials. Pass a specific phone_number
from GET /phone-numbers/search, or just filters to auto-pick one.
Authorizations
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
Buy a number through OneInbox. The carrier (Twilio today) is an internal implementation detail — the caller never supplies provider creds or trunk config; the number is bought on OneInbox's own account and wired automatically.
Either pass a specific phone_number from GET /phone-numbers/search, or leave
it out and give search filters (country / area_code / contains) to auto-pick
the first available match.
A specific number from /phone-numbers/search. Omit to auto-pick.
^\+[1-9]\d{1,14}$2Area code (US/CA only)
Digits/letters to match
Per-number routing override. Stored as JSONB so we can extend with business-hours and caller-id rules later without a schema change.
Response
Successful Response
Per-number routing override. Stored as JSONB so we can extend with business-hours and caller-id rules later without a schema change.