Queue a batch
Before you start
Set the send rate and a unique key for the batch. Follow the job ID after acceptance.
Required. Send the account API key in X-API-Key with messages:create and a verified phone. Never put the key in a browser or in git.
- POST /api/v2/messages/bulk with Idempotency-Key, messagesPerSecond from 1 to 50, and a messages array.
- Store id from the 202 response. status validating means checks are not finished and nothing has been sent.
- GET /api/v2/messages/bulk/{jobId} until status is queued, running, rejected, paused, completed, or cancelled.
- Use /items and /errors for detail. Pause, resume, cancel, and retry use the matching routes. Resume without balance returns 402.
cURL
curl --request POST 'https://raselsms.com/api/v2/messages/bulk' \ -H "X-API-Key: $RASEL_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: bulk-example-001' \ --data-binary @- <<'RASEL_JSON'{ "name": "Morning notices", "messagesPerSecond": 10, "messages": [ { "to": "+963912345678", "channel": "local_sms", "messageType": "free_text", "content": { "text": "Example notice from Rasel." } }, { "to": "+963987654321", "channel": "local_sms", "messageType": "free_text", "content": { "text": "Example notice from Rasel." } } ]}RASEL_JSONTest locally with a mock response first. Confirm the recipient and cost before sending a live request.