SMS
Before you start
Check local SMS availability for the destination. Look up your approved SMS sender when using a custom sender.
Required. Send the account API key in the X-API-Key header. Never expose the key in a public browser or git repository.
- Create an API key in developer settings and store it on the server only.
- JSON is limited to 8MiB; use multipart for media files up to 100MiB, subject to smaller provider limits. Oversized requests return413.
- POST /api/v2/messages/send with to, channel=local_sms, and content.text.
- Read success and status. Save requestId and any available tracking ID. A queued result is awaiting dispatch.
cURL
curl --request POST 'https://raselsms.com/api/v2/messages/send' \ -H "X-API-Key: $RASEL_API_KEY" \ -H 'Content-Type: application/json' \ --data-binary @- <<'RASEL_JSON'{ "to": "+963912345678", "channel": "local_sms", "messageType": "free_text", "content": { "text": "Hello, this is a test message from Rasel." }}RASEL_JSONTest locally with a mock response first. Confirm the recipient and cost before sending a live request.