Send message to phone number
Sends a message to a phone number using a template. The phone number doesn't need to be a pre-existing contact. The message can be sent via SMS or WhatsApp. Optionally specify a webhook URL to receive delivery status updates. The customer ID is extracted from the authentication token.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
curl -X POST "https://api.sent.dm/v2/messages/phone" \ -H "Content-Type: application/json" \ -d '{ "phoneNumber": "+1234567890", "templateId": "7ba7b820-9dad-11d1-80b4-00c04fd430c8", "templateVariables": { "name": "John Doe", "order_id": "12345" } }'{
"statusCode": 400,
"message": "One or more errors occurred!",
"errors": {
"property1": [
"string"
],
"property2": [
"string"
]
}
}Send message to contact POST
Sends a message to a specific contact using a template. The message can be sent via SMS or WhatsApp depending on the contact's capabilities. Optionally specify a webhook URL to receive delivery status updates. The customer ID is extracted from the authentication token.
Send quick message with default template (rate limited to 5 per day) POST
Sends a message to a phone number using the default template. This endpoint is rate limited to 5 messages per customer per day. The customer ID is extracted from the authentication token.