Key Takeaways
- android sms gateway json api example: POST JSON to /api/v1/messages with Bearer auth. Docs win over any older send.php copy.
- Canonical send URL is https://app.sms-gateway.app/api/v1/messages.
- to[] is E.164. text is the body. type defaults to sms. Confirm extras in Developer Center.
- Idempotency-Key stops double OTP when the client retries a timeout.
- Priced by devices and SMS send volume. You use your own phone and operator SMS credit. Free 300 SMS lifetime is for canaries.
- A 201 from the API is not a DLR. The phone still has to radio the SMS.
Searchers for an android sms gateway json api example want a copy-paste send, not a second OpenAPI clone. This page teaches the shape. Live parameters stay in Developer Center. The phone still sends the SMS; we meter devices and volume.
Priced by devices and SMS send volume. You use your own phone and operator SMS credit.
If your client retries a timed-out POST without an Idempotency-Key, the user gets two codes and you pay the operator twice. That is not an API mystery. That is a missing header.
The live contract
- Host:
https://app.sms-gateway.app/api/v1 - Send:
POST /messages— JSON, not query-string keys - Auth:
Authorization: Bearer— no?key= - DLR lookup:
GET /messages/{id}; production prefers webhooks
OpenAPI: openapi.json. Do not invent api.sms-gateway.app or /api/send-sms.
JSON send example
Conceptual sample from the same source as PHP HTTPS samples. Confirm any new field in docs before you ship it.
curl -X POST "https://app.sms-gateway.app/api/v1/messages" \
-H "Authorization: Bearer $SMS_GATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 3f1b0c8a-9d2e-4c77-9f5a-2b6d1e0f4a83" \
-d '{"to":["+14155552671"],"text":"Your verification code is 481920","type":"sms"}'Fields that actually matter
| Field | Role | Common miss |
|---|---|---|
to | Array of E.164 destinations | Local format without +; a string instead of an array |
text | Body the SIM will send | Promo footer on an OTP; logging the body in Slack |
type | sms or mms | MMS without a fetchable attachment URL |
deviceIds | Optional pin to a handset | Failover pool empty because the spare was never paired |
Idempotency-Key | Header, not body | Omitted on client timeouts |
Idempotency-Key
Generate a key per user-visible send (login attempt, password reset). Reuse it on retry. Do not reuse it for a new code. Duplicate OTPs burn operator credit and lock the user out of their own inbox.
HTTP vs radio
401 is a key problem. 422 is a body problem. A queued 2xx still depends on pairing, battery, and airtime. Delivery events are webhooks, not a second JSON POST. Isolate OTP devices so a campaign cannot starve authentication.
This is not an SDK product
Language pages show REST samples. They are not a composer/NuGet “Complete SDK.” Keep secrets in env. API keys in env.
Checklist
- Bearer header; JSON body; E.164
to[]. - Idempotency-Key on user-visible OTP.
- Docs checked the same day you freeze the client.
- No send.php / query-key leftovers.
- Webhook signature verified before you trust DLR.
- Canary on a staff handset, then customers.
Next steps
Copy from docs, not from memory. Then pair a phone and watch device + volume plus operator airtime.
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy
- download the Android gateway appGet the APK




