Send transactional SMS
Transactional SMS is a solution for non-promotional SMS using the recipient’s phone number instead of an email address. Use it to send notifications and confirmations, such as for online orders.
Requirements
Get your API key from your settings (SMTP & API).
If you are new to the API, read more about how the API works.
Send SMS message to a mobile number
If your SMS content includes a stop/opt-out code, the message is automatically switched to marketing type — you don’t need to (and shouldn’t) set type: "marketing" yourself to handle this. To send as transactional, simply don’t include a stop code in the content.
This endpoint is https://api.brevo.com/v3/transactionalSMS/send with the POST method. You can send either a content string directly, or a templateId with params to fill in a saved template — one of the two is required. A sample cURL request using content:
The params are listed below:
A successful 201 response:
A 400 error code indicates a bad request.
Get your SMS activity aggregated over a period of time
This request uses the endpoint https://api.brevo.com/v3/transactionalSMS/statistics/aggregatedReport with the GET method. Sample cURL request:
Query params:
A successful response:
Get your SMS activity aggregated per day
This request uses the endpoint https://api.brevo.com/v3/transactionalSMS/statistics/reports with the GET method. Sample cURL request:
Add more query params to the --url value. The params are listed below.
A successful response:
Get all your SMS activity (unaggregated events)
This request uses the endpoint https://api.brevo.com/v3/transactionalSMS/statistics/events with the GET method. Sample cURL request:
The query params for this endpoint are listed below.
A successful response: