Send an SMS from a number this tenant holds
POST
/v1/messages
const url = 'https://api.vocapable.com/v1/messages';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"from_phone_number_id":"example","to_e164":"example","template_id":"example","body":"example","variables":{"additionalProperty":"example"},"origin_call_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
SmsSendRequest
object
Examplegenerated
{ "from_phone_number_id": "example", "to_e164": "example", "template_id": "example", "body": "example", "variables": { "additionalProperty": "example" }, "origin_call_id": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
MessageSummary
object
id
required
Id
string
direction
required
MessageDirection
string
to_e164
required
To E164
string
from_e164
required
From E164
string
status
required
MessageStatus
string
inbound_intent
required
Any of:
InboundIntent
Classification of an inbound SMS; STOP writes an internal DNC entry.
string
null
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>
ValidationErrorobject
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": {} } ]}