Skip to content

Buy or connect a number on one of this tenant's telephony accounts

POST
/v1/phone-numbers
curl --request POST \
--url https://api.vocapable.com/v1/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "phone_e164": "example", "telephony_account_id": "example", "capabilities": [ "voice" ], "provider_sid": "example", "a2p_campaign_ref": "example", "daily_dial_cap": 1 }'
Idempotency-Key
Any of:
string

Unique key for this request, so a retry replays the original result instead of repeating the work. Stored for 24 hours; a replayed response carries Idempotent-Replay: true. A UUID is the documented shape.

Media typeapplication/json
PhoneNumberCreateRequest
object
phone_e164
required
Phone E164
string
/^\+[1-9]\d{7,14}$/
telephony_account_id
required
Telephony Account Id
string
capabilities
Capabilities
Array<string>
Allowed values: voice sms
provider_sid
Any of:
string
a2p_campaign_ref
Any of:
string
daily_dial_cap
Any of:
integer
>= 1

Successful Response

Media typeapplication/json
PhoneNumberSummary
object
id
required
Id
string
phone_e164
required
Phone E164
string
telephony_account_id
required
Telephony Account Id
string
provider_sid
Any of:
string
capabilities
Capabilities
Array<string>
Allowed values: voice sms
a2p_campaign_ref
Any of:
string
status
required
Status
string
Allowed values: provisioning active quarantined resting releasing released
assigned_at
Any of:
string format: date-time
daily_dial_cap
Any of:
integer
dials_today
required
Dials Today
integer
reputation_state
required
Reputation State
string
Allowed values: clean at_risk flagged burned
inbound_agent_id
Any of:
string
inbound_route_mode
Inbound Route Mode
string
default: agent
Allowed values: agent voicemail policy
inbound_voicemail_greeting
Any of:
string
created_at
required
Created At
string format: date-time
Example
{
"capabilities": [
"voice"
],
"status": "provisioning",
"reputation_state": "clean",
"inbound_route_mode": "agent"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}