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
Additional info for type and content params
type param: to ensure the [STOP CODE] is correctly substituted, specify the type as “marketing” when using the transactional SMS API endpoint. If your SMS content includes [STOP CODE], select the type as “marketing.”
content param when type is marketing: on some routes, the short code automatically replaces the alphanumeric SenderID if you do not add an opt-out [STOP CODE].
This endpoint is https://api.brevo.com/v3/transactionalSMS/send with the POST method. A sample cURL request:
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: