Send transactional SMS
Transactional SMS provides solution for non-promotional sms using the recipients contact number instead of email address. It is used to send notifications and confirmations like making an online order.
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, you must 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 will automatically replace the alphanumeric SenderID if you do not add an opt-out [STOP CODE].
This endpoint uses the endpoint https://api.brevo.com/v3/transactionalSMS/send with the POST method. A sample cURL request is:
The params are mentioned below:
The response for a successful 201 request is shown here:
A 400 error code means you sent 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. You can send a request with the cURL request below:
There are some query params which are mentioned below.
After a successful request, the SMS activity response is shown below.
Get your SMS activity aggregated per day
This request uses the endpoint https://api.brevo.com/v3/transactionalSMS/statistics/reports with the GET method. You can send a request with the cURL request below.
You can also add more query params above in the --url header, the params are mentioned below in a table.
After a successful request, the response looks something like below.
Get all your SMS activity (unaggregated events)
This request uses the endpoint https://api.brevo.com/v3/transactionalSMS/statistics/events with the GET method. You can send a request with the cURL request below.
The query params for this endpoint are mentioned below.
After a successful request, the response looks something like below.