# A2P Messaging API

Send messages straight from your code — built for developers and AI agents. A simple REST API (and SMPP) with delivery tracking and webhooks: SMS today, with RCS and WhatsApp coming soon. No audience to manage: bring your recipients and send.

**Language:** en
**Audience:** developer
**TLDR:** The A2P Messaging API sends messages from your code: SMS today, RCS and WhatsApp coming soon. One at a time (POST /sms) or in batches (POST /sms/bulk), with DLRs pushed to your webhook, two-way inbound, message history, traffic metrics, HLR lookups, balance and price profiles, over HTTP or SMPP. It is the Transactional API under its newer name: same endpoints, tokens and URLs. Use it when you manage your own recipient list; if Instasent should own the audience, use the platform.
**Search keywords:** a2p messaging api, a2p, transactional api, sms api, smpp, bulk sms, dlr, hlr lookup
**Docs index (every page):** https://docs.instasent.com/llms.txt
**This zone's index:** https://docs.instasent.com/a2p-messaging-api/llms-full.txt
**This page:** https://docs.instasent.com/a2p-messaging-api/overview/ (HTML) · https://docs.instasent.com/a2p-messaging-api/overview.md (Markdown)

- [Send your first SMS](/a2p-messaging-api/http/quickstart)
- [API Reference](/a2p-messaging-api/http/reference)

#### curl

```bash
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" }'
```

#### node

```js
await fetch("https://api.instasent.com/transactional/v1/sms", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.INSTASENT_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ from: "Instasent", to: "+34600000000", text: "Hello from Instasent" }),
});
```

#### python

```python
import os, requests

requests.post(
    "https://api.instasent.com/transactional/v1/sms",
    headers={"Authorization": f"Bearer {os.environ['INSTASENT_TOKEN']}"},
    json={"from": "Instasent", "to": "+34600000000", "text": "Hello from Instasent"},
)
```

#### ✦ Your AI

```text
Read https://docs.instasent.com/llms.txt and send a test SMS
with the Instasent A2P Messaging API. My token is in $INSTASENT_TOKEN.
```

> **Note**: Also known as the **Transactional API** or **SMS API**: same endpoints, same tokens, same URLs, nothing to migrate.

The A2P Messaging API is how your code sends messages through Instasent. It connects your application to carrier networks, delivering to handsets in 200+ countries, and covers everything around the send: single or batched sending, DLRs and inbound, message history, HLR lookups, price profiles and account balance. Today it sends **SMS**; **RCS and WhatsApp are coming soon**.

Two transports expose the same underlying pipeline. Pick the one that fits your stack — most teams start with HTTP and only move to SMPP when volume or session-state requirements justify it.

- [HTTP (REST)](/a2p-messaging-api/http/quickstart) - JSON over HTTPS. Best for application servers, serverless functions and anything that already speaks REST. Webhook-based DLRs.
- [SMPP](/a2p-messaging-api/smpp/integration) - Persistent TCP sessions, binary protocol. Best for wholesale SMS and high-throughput platforms (messaging providers, aggregators) that already operate an SMPP stack.

## What you can do

- **Send SMS, one at a time** — `POST /sms` for triggered traffic (OTPs, alerts, receipts, notifications).
- **Send SMS in bulk** — `POST /sms/bulk` takes a collection of messages in a single request. This is the endpoint for API-driven campaigns, marketing fan-outs and any high-volume dispatch. Customers including marketing agencies run entire campaigns on top of it.
- **Receive delivery reports** (DLRs) as carriers report status back through the chain, pushed to your webhook in real time.
- **Accept inbound messages** when the account has two-way enabled.
- **Query message history** and per-message status — `GET /sms`, `GET /sms/{id}`.
- **Read traffic metrics** — `GET /sms/metrics` returns volume, delivery outcomes and cost per UTC day or month, by country, network and token. See [SMS traffic metrics](/a2p-messaging-api/http/metrics).
- **Run HLR / number lookups** — `POST /lookup`, `GET /lookup/{id}` and `GET /lookup` to check handset presence and routing before sending.
- **Read account balance** — `GET /organization/account`.
- **Read price profiles** — `GET /sms/price-profile/me/countries` and `GET /lookup/price-profile/me/countries` for per-country pricing.

## When to use this API

Reach for A2P Messaging whenever your code needs to send — one message or many — without asking Instasent to manage the recipient audience. Typical workloads:

- **User-triggered messages** — OTPs, password resets, receipts, shipping notifications. One message per event, delivered in seconds, via `POST /sms`.
- **API-driven campaigns and bulk dispatch** — marketing sends, notification fan-outs, anything that fires many messages in one go. Use `POST /sms/bulk`.
- **Wholesale SMS over SMPP** — aggregators, messaging platforms and resellers pushing their own traffic through Instasent. [SMPP](/a2p-messaging-api/smpp/integration) gives carrier-grade throughput over persistent sessions; HTTP also works at moderate rates.
- **Pre-send validation and pricing** — HLR lookup and price profiles to route and cost-check before dispatch.

Coming from the [Legacy API](/a2p-messaging-api/legacy/overview)? This is its evolution: the same endpoint surface, modernised with DLR webhooks, per-project tokens, SMPP and the `api_sms` token model. New code goes here. And the dashboard uses the newer name, so what you create there is an *A2P Messaging API* token or project — the one a Transactional API integration already uses.

If you need Instasent to own the audience, personalization, segmentation and attribution, use the [Product API](/platform-api/product-api/guide) instead — it delegates delivery to this one but adds the customer-data layer on top. The A2P Messaging API is the right pick when the caller already manages its recipient list and just needs to send.

## What to read next

- [Channels](/a2p-messaging-api/channels/sms/senders) - SMS senders, destination countries and the wildcard route; RCS agents, coming soon.
- [HTTP Quickstart](/a2p-messaging-api/http/quickstart) - Send your first SMS over REST in under five minutes.
- [Bulk sending](/a2p-messaging-api/http/bulk) - Up to 100 messages per request, queue-based dispatch, the endpoint for API-driven campaigns.
- [HTTP Authentication](/a2p-messaging-api/http/authentication) - Token types, header vs. query string, rotation.
- [Receiving DLRs](/a2p-messaging-api/http/dlrs) - Webhook payload, status list, two-way inbound.
- [SMS traffic metrics](/a2p-messaging-api/http/metrics) - Volume, delivery outcomes and cost per day or month, by country, network and token.
- [Full API Reference](/a2p-messaging-api/http/reference) - Every endpoint, every parameter.

---

This is one page of the Instasent documentation. For the complete machine-readable index of every guide and API reference, fetch https://docs.instasent.com/llms.txt — start there for full context.
