# 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.

**Language:** en
**Audience:** developer
**TLDR:** Send an SMS with POST https://api.instasent.com/transactional/v1/sms, header Authorization: Bearer <api_sms token>, and a JSON body containing from, to, and text. The response returns an id; point your DLR webhook at it to track delivery.
**Docs index (every page):** https://staging-instasent-docs-nextjs.oscar-284.workers.dev/llms.txt
**This zone's index:** https://staging-instasent-docs-nextjs.oscar-284.workers.dev/a2p-messaging-api/llms-full.txt
**This page:** https://staging-instasent-docs-nextjs.oscar-284.workers.dev/a2p-messaging-api/http/quickstart/ (HTML) · https://staging-instasent-docs-nextjs.oscar-284.workers.dev/a2p-messaging-api/http/quickstart.md (Markdown)

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](/a2p-messaging-api/http/bulk) — same token, one call, up to 100 messages per request.

#### 1. Create an Instasent account

Sign up at [instasent.com](https://instasent.com) and complete onboarding.

#### 2. 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.

#### 3. Send your first message

#### 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
const res = 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",
  }),
});
const sms = await res.json();
```

#### python

```python
import os, requests

res = 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",
    },
)
sms = res.json()
```

#### 4. Check delivery

The response contains an `id`. Point your webhook endpoint at the DLR URL
in your project settings — Instasent will `POST` delivery updates as the
message progresses through the carrier network. See
[Receiving DLRs](/a2p-messaging-api/http/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.

```bash
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](/a2p-messaging-api/http/bulk).

> **Note**: **About that `from`.** It is a sender, and some countries require it to be registered
> before an operator accepts it as yours — Spain also requires your company to be listed
> in the CNMC's provider registry. Sending without that doesn't fail loudly: the message
> goes out best-effort and is billed either way. Before you route real traffic into a
> regulated market, read
> [Senders and country coverage](/a2p-messaging-api/senders).

## What's next

- **[Senders and country coverage](/a2p-messaging-api/senders)** — 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](/a2p-messaging-api/http/bulk)** — `POST /sms/bulk`, 100 messages per request, queue-based throughput. The endpoint to use for campaigns.
- **[Authentication](/a2p-messaging-api/http/authentication)** — token scopes, rotation, header vs. query-string.
- **[Rate limits](/a2p-messaging-api/http/rate-limits)** — per-endpoint limits and how to read the `X-RateLimit-*` headers. One bulk call counts as one request against the window.
- **[Errors](/a2p-messaging-api/http/errors)** — status codes, error payload shape, retry guidance.
- **[Receiving DLRs](/a2p-messaging-api/http/dlrs)** — webhook payload and status list.
- **[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://staging-instasent-docs-nextjs.oscar-284.workers.dev/llms.txt — start there for full context.
