API documentation
Send SMS over a simple REST API, or connect at scale via SMPP and CMPP. Authenticate with a Bearer key, post a message, and stream delivery receipts straight to your stack.
Base URL https://api.a2ppro.com/v1 JSON over HTTPS
Introduction
The A2P Pro API lets you send SMS messages programmatically over direct carrier routes in 190+ countries. The REST API is JSON over HTTPS — predictable request bodies, predictable responses. For high-throughput integrations you can connect over standard SMPP or CMPP instead.
Base URL
https://api.a2ppro.com/v1
Authentication
Bearer API key in the Authorization header.
Format
JSON request and response bodies, UTF-8 encoded.
Authentication
Every request must include your API key as a Bearer token in the Authorization header. Keep your key secret and send it only over HTTPS.
Authorization: Bearer $A2P_API_KEY
Your API key is provisioned when your account is set up. Contact sales to get API access and your live credentials.
/v1/messages
Send a message
Send an SMS to one or more recipients. Provide the destination in E.164 format, a sender ID or number, and the message text. Long messages are automatically split into multiple segments.
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| to | string or array | Yes | Recipient phone number(s) in E.164 format. |
| from | string | Yes | Sender ID or phone number the message is sent from. |
| text | string | Yes | UTF-8 message content. |
| callback_url | string | No | URL to receive delivery receipt webhooks for this message. |
Example request
curl -X POST https://api.a2ppro.com/v1/messages \
-H "Authorization: Bearer $A2P_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155550123",
"from": "A2P Pro",
"text": "Your verification code is 7788"
}'
const res = await fetch("https://api.a2ppro.com/v1/messages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.A2P_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
to: "+14155550123",
from: "A2P Pro",
text: "Your verification code is 7788",
}),
});
const message = await res.json();
console.log(message.id, message.status);
import os, requests
res = requests.post(
"https://api.a2ppro.com/v1/messages",
headers={"Authorization": f"Bearer {os.environ['A2P_API_KEY']}"},
json={
"to": "+14155550123",
"from": "A2P Pro",
"text": "Your verification code is 7788",
},
)
message = res.json()
print(message["id"], message["status"])
Example response
{
"id": "m-abc123",
"status": "queued",
"to": "+14155550123",
"from": "A2P Pro",
"segments": 1,
"created_at": "2026-05-29T15:30:45Z"
}
The status field starts as queued, transitions to sent when handed to the carrier, and resolves to delivered or failed. The segments field reports how many SMS parts were used.
/v1/messages/{id}
Message status
Retrieve the current status of a previously sent message by its id. Useful for polling when you have not configured a webhook.
curl https://api.a2ppro.com/v1/messages/m-abc123 \
-H "Authorization: Bearer $A2P_API_KEY"
{
"id": "m-abc123",
"status": "delivered",
"to": "+14155550123",
"from": "A2P Pro",
"segments": 1,
"created_at": "2026-05-29T15:30:45Z",
"delivered_at": "2026-05-29T15:30:52Z"
}
Delivery receipts & webhooks
Set a callback_url on a message — or configure a default endpoint on your account — and A2P Pro will POST a JSON event each time a message changes state. Respond with 2xx to acknowledge; non-2xx responses are retried with backoff.
Webhook events
| Event | Description |
|---|---|
| message.sent | The message was accepted and handed to the carrier. |
| message.delivered | The carrier confirmed delivery to the recipient handset. |
| message.failed | The message could not be delivered; see the error code in the payload. |
Example payload
{
"event": "message.delivered",
"id": "m-abc123",
"status": "delivered",
"to": "+14155550123",
"delivered_at": "2026-05-29T15:30:52Z"
}
Error codes
Errors return a non-2xx HTTP status and a JSON body with a machine-readable code and a human-readable message.
| Code | Meaning | HTTP status |
|---|---|---|
| invalid_request | The request was invalid or improperly formatted. | 400 |
| authentication_failed | The API key was missing or invalid. | 401 |
| forbidden | You do not have permission to access this resource. | 403 |
| not_found | The requested resource was not found. | 404 |
| rate_limit_exceeded | You have exceeded your rate limit; retry after a short delay. | 429 |
| server_error | An unexpected error occurred on our servers. | 500 |
SMPP & CMPP connectivity
For high-throughput, low-latency traffic you can bind directly to our gateway over standard SMPP v3.4 or, for mainland China routes, CMPP v2.0/v3.0. Binds, throughput, and source addresses are provisioned per account.
SMPP v3.4
- Transmitter, receiver, and transceiver binds supported.
- Delivery receipts returned as standard
deliver_smPDUs. - Concatenated and Unicode (UCS-2) messages supported.
CMPP v2.0 / v3.0
- Direct connectivity for China mainland delivery.
- Status reports returned via
CMPP_DELIVER. - Pre-registered sender IDs and templates as required by local rules.
Need host, port, and bind credentials? Contact sales and we will provision your SMPP/CMPP connection.
Rate limits & throughput
The platform sustains 1,000+ messages per second, and per-account throughput is provisioned to match your committed volume. If you exceed your allotted rate the API responds with 429 rate_limit_exceeded — back off and retry. SMPP/CMPP binds enforce throughput as a window size on the gateway.
1,000+/s
Sustained throughput
99.99%
Platform uptime
190+
Countries reachable
Client libraries
Official SDKs wrap authentication and the REST endpoints so you can send a message in a few lines.
Node.js
npm install a2ppro-sdk
Python
pip install a2ppro
PHP
composer require a2ppro/a2ppro-php
Ready to start sending?
Get your API key and live credentials. Our team replies within one business day.