Bulk sending via API
To send to many recipients simultaneously, use the bulk endpoint rather than calling the unit endpoint in a loop.
Endpoint```
POST /v1/messages/bulk
{
"from": "ENVOISMS",
"channel": "sms",
"message_type": "eco",
"recipients": [
{ "to": "+212661111111", "variables": { "prenom": "Yassine" } },
{ "to": "+212662222222", "variables": { "prenom": "Salma" } }
],
"template": "Bonjour {{prenom}}, profitez de -20% ce week-end !"
}
Up to several thousand recipients per request (see the exact limit in the technical documentation depending on your plan). For larger volumes, prefer sending via the Campaigns interface or a dedicated SMPP connection.
Tracking
Each recipient receives an individual message_id in the response, allowing granular status tracking via webhook or the /messages/{id} endpoint.