Skip to main content
POST
/
messages
/
phone-number
Send a message to a phone number using a template
curl --request POST \
  --url https://api.example.com/messages/phone-number \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "phoneNumber": "+1234567890",
  "templateId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
'
{
  "messageId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "queued",
  "channel": "whatsapp",
  "contactId": "7c11e821-c839-4c3d-8a89-1f78b71a0c38"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Message details including customer ID, phone number, and template ID

Request model for sending a message to a phone number using a template

customerId
string<uuid>
required

Unique identifier of the customer

phoneNumber
string
required

Phone number in E.164 format

templateId
string<uuid>
required

Unique identifier of the message template

Response

Message successfully queued for delivery

messageId
string<uuid>
status
enum<string>
Available options:
queued,
sending,
delivered
channel
enum<string>
Available options:
sms,
whatsapp
contactId
string<uuid>

ID of the created or existing contact