Send message
POST/api/v1/subaccounts/:subAccountId/messages
This endpoint is used to send Messaging Apps messages individually (1 request per message). It is ideal to send single personalized messages for use-cases like notifications or alerting for example.
For WhatsApp: When sending a 'text' type message, we will try to match it with registered WhatsApp templates under your account If matching is successful, the message will be submitted as a template to WhatsApp, if not as a normal message
To bypass the template matching and send template only, you can select type 'template' In this case, you need to provide template name, language and parameters
WhatsApp Call Permission Request: You can request permission to call a customer using either:
- Interactive message: Set type to 'interactive' with interactive.type as 'call_permission_request'. The body field is optional.
- Template message: Set type to 'template' with your approved Call Permission Request template name and language.
WhatsApp Request Contact Info: You can request a customer to share their contact information using either:
- Interactive message: Set type to 'interactive' with interactive.type as 'request_contact_info'. The body field is optional.
- Template message: Set type to 'template' with your approved Request Contact Info template name and language.
WhatsApp Business-Scoped User ID (BSUID):
You can address a recipient using their channelUserId (BSUID) instead of, or alongside, their phone number (msisdn). Format: <COUNTRY-CODE>.<alphanumeric> where the country code is an uppercase ISO 3166-1 alpha-2 code (e.g. US.13491208655302741918). If both are provided, msisdn takes precedence.
More examples on how this endpoint can be used are available here: Usage examples
Request
Responses
- 200
- 400
- 401
- 500
Success response
Bad request error response
Request was not authenticated response
Internal server error