Skip to main content

Send Message

Send text or media messages to individual contacts or groups.

Endpoint: POST /v1/messages/send

Request Body

FieldTypeRequiredDescription
typeenumYesOne of: text, image, video.
contentstringYesMessage text OR URL/Base64 of the media.
recipientsarrayNo*Array of phone numbers in E.164 format (e.g. "12125551234").
groupIdsarrayNo*Array of Group IDs to send to.
captionstringNoCaption for media messages.
deviceIdstringNoSpecific device ID to send from. Defaults to your primary device.

* At least one of recipients or groupIds must be provided.

Example: Text Message

{
"type": "text",
"content": "Hello! Your appointment is confirmed.",
"recipients": ["12125551234", "12125555678"]
}

Example: Media Message to Group

{
"type": "image",
"content": "https://example.com/invoice.pdf",
"caption": "Here is your invoice",
"groupIds": ["64f8a123..."]
}

Response

{
"success": true,
"transactionId": "tx_12345...",
"status": "pending"
}