Skip to content

Send an SMS from a number this tenant holds

POST
/v1/messages
curl --request POST \
--url https://api.vocapable.com/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "from_phone_number_id": "example", "to_e164": "example", "template_id": "example", "body": "example", "variables": { "additionalProperty": "example" }, "origin_call_id": "example" }'
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
SmsSendRequest
object
from_phone_number_id
required
From Phone Number Id
string
to_e164
required
To E164
string
/^\+[1-9]\d{1,14}$/
template_id
Any of:
string
body
Any of:
string
>= 1 characters
variables
Variables
object
key
additional properties
Any of:
string
origin_call_id
Any of:
string
Examplegenerated
{
"from_phone_number_id": "example",
"to_e164": "example",
"template_id": "example",
"body": "example",
"variables": {
"additionalProperty": "example"
},
"origin_call_id": "example"
}

Successful Response

Media typeapplication/json
MessageSummary
object
id
required
Id
string
direction
required
MessageDirection
string
Allowed values: outbound inbound
phone_number_id
required
Any of:
string
contact_id
required
Any of:
string
to_e164
required
To E164
string
from_e164
required
From E164
string
template_id
required
Any of:
string
body_rendered
required
Any of:
string
status
required
MessageStatus
string
Allowed values: queued sent delivered failed received
provider_sid
required
Any of:
string
origin_call_id
required
Any of:
string
inbound_intent
required
Any of:
InboundIntent

Classification of an inbound SMS; STOP writes an internal DNC entry.

string
Allowed values: stop help other
segments
required
Segments
integer
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
Example
{
"direction": "outbound",
"status": "queued",
"inbound_intent": "stop"
}

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": {}
}
]
}