A2P Messaging API · HTTP
A2P Messaging API quickstart
Send your first SMS over the A2P Messaging API in under five minutes. Grab a token, fire one HTTP request, and point a webhook at the DLR URL to see delivery.
On this page
The A2P Messaging API over HTTP needs three things: an account, an api_sms token and one POST request. This walkthrough takes you from zero to a delivered message. If you already know you need high throughput or API-driven campaigns, jump straight to Bulk sending — same token, one call, up to 100 messages per request.
Create an Instasent account
Sign up at instasent.com and complete onboarding.
Create a token
You create the token yourself. In the dashboard, open your A2P Messaging API project, select API tokens in the sidebar and click Create API token. The same action is the first step, Create a token, of the Get your API project ready checklist on the project home. Treat the token as a secret: never commit it to version control.
Send your first message
curl -X POST https://api.instasent.com/transactional/v1/sms \ -H "Authorization: Bearer $INSTASENT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from": "Instasent", "to": "+34600000000", "text": "Hello from Instasent" }'Check delivery
The response contains an
id. Point your webhook endpoint at the DLR URL in your project settings — Instasent willPOSTdelivery updates as the message progresses through the carrier network. See Receiving DLRs for payload details.
Sending many messages at once
For API-driven campaigns, notification fan-outs or any high-volume dispatch, switch from POST /sms to POST /sms/bulk — a single call that carries up to 100 messages, returns accepted and rejected items side by side, and queues the accepted ones on the platform for fastest-possible dispatch. The same api_sms token works.
curl -X POST https://api.instasent.com/transactional/v1/sms/bulk \
-H "Authorization: Bearer $INSTASENT_TOKEN" \
-H "Content-Type: application/json" \
-d '[
{ "from": "Instasent", "to": "+34600000001", "text": "Hello one" },
{ "from": "Instasent", "to": "+34600000002", "text": "Hello two" }
]'Full request and response shape, per-request limits, throughput model and partial-success handling live in Bulk sending.
What's next
- Senders and country coverage — which countries require registering the
from, what carries traffic that matches no registered sender, and what is billed when a message is blocked. - Bulk sending —
POST /sms/bulk, 100 messages per request, queue-based throughput. The endpoint to use for campaigns. - Authentication — token scopes, rotation, header vs. query-string.
- Rate limits — per-endpoint limits and how to read the
X-RateLimit-*headers. One bulk call counts as one request against the window. - Errors — status codes, error payload shape, retry guidance.
- Receiving DLRs — webhook payload and status list.
- Reference — every endpoint, every parameter.