Send SMS via HTTP and curl
To send an SMS over HTTP, POST a JSON body with receiver and body to https://curl-sms.com/api/sms/send and authenticate with your API key as a Bearer token. Anything that speaks HTTP can do it.
The request
curl -X POST https://curl-sms.com/api/sms/send \
-H "Authorization: Bearer cs_test_…" \
-H "Content-Type: application/json" \
-d '{"receiver":"+4915123456789","body":"Hello from curl"}'
| Part | Value |
|---|---|
| Method and URL | POST https://curl-sms.com/api/sms/send |
| Auth | Authorization: Bearer cs_live_… or cs_test_… |
| Body | JSON with receiver (mobile number, ideally +49…) and body (text) |
| Optional | receivers (up to 100), send_at (RFC 3339), header Idempotency-Key |
The response
202 Accepted with the new SMS:
{ "id": "01JDQ8M3V6R1T5ZK2X9N4C7B0A", "status": "queued", "segments": 1, "price": "0.00", "error_code": null }
Errors come back as {"error":{"code":"…","message":"…"}} with a matching HTTP status, for example 401 unauthorized or 402 insufficient_balance. All codes are listed under error codes.
Check the status
curl https://curl-sms.com/api/sms/01JDQ8M3V6R1T5ZK2X9N4C7B0A \
-H "Authorization: Bearer cs_test_…"
Or skip polling and receive delivery reports via webhook.
Tips
- Keep the key out of the command line history:
export CURLSMS_KEY=cs_test_…and use$CURLSMS_KEY. - Retries: add
-H "Idempotency-Key: <unique id>". A retry with the same key and body returns the first response instead of sending again. - Length: 160 GSM-7 characters per part; emoji switch to Unicode with 70 per part.
POST /api/sms/estimatetells you parts and price without sending. - Rate limit: 10 requests per second per key, then
429withRetry-After.
Next: the quickstart, or the same request in Bash with proper JSON escaping.