Messages
Send a single text or attachment message
Queues an outbound iMessage/SMS to the specified phone number.
Supports optional media attachments via public URLs, and arbitrary metadata for correlation.
For safe retries, provide an Idempotency-Key header. If the same key is used twice, the original message will be returned with 200; otherwise a new message is queued with 202.
post/v1/api/messages
Headers
Idempotency-Keystring
Optional key to ensure idempotent message creation. If the same key is used twice, the original message will be returned.
Request body
Example request
{
"to": "+15551234567",
"text": "Hello world!",
"attachments": [
"https://example.com/image.png"
]
}Response
Message already exists (idempotency key match).
Example response
{
"message_id": "Qm8FhbH3P7R",
"status": "queued"
}