API Doc

Everything you need to integrate with A2P Pro's messaging platform

Overview

The A2P Pro API allows you to send SMS messages programmatically through our platform. Our RESTful API is designed to be simple to use while providing powerful features for enterprise messaging needs.

Base URL

https://api.a2ppro.com/v1

Authentication

API Key in Authorization header

Response Format

JSON

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can obtain your API key from the A2P Pro Dashboard after creating an account.

Endpoints

POST

/messages

Send an SMS message to a single recipient or multiple recipients.

Request Parameters
Parameter Type Required Description
to string or array Yes Phone number(s) in E.164 format
from string Yes Sender ID or phone number
text string Yes Message content
callback_url string No URL for delivery receipts
Example Request
{
  "to": "+14155552671",
  "from": "A2P Pro",
  "text": "Your verification code is 123456",
  "callback_url": "https://example.com/callbacks/delivery"
}
Example Response
{
  "message_id": "m-abc123",
  "status": "sent",
  "to": "+14155552671",
  "from": "A2P Pro",
  "created_at": "2023-07-20T15:30:45Z"
}
GET

/messages/{message_id}

Check the status of a previously sent message.

Path Parameters
Parameter Type Required Description
message_id string Yes ID of the message to check
Example Response
{
  "message_id": "m-abc123",
  "status": "delivered",
  "to": "+14155552671",
  "from": "A2P Pro",
  "created_at": "2023-07-20T15:30:45Z",
  "delivered_at": "2023-07-20T15:30:52Z"
}

Error Codes

Status Code Error Code Description
400 invalid_request The request was invalid or improperly formatted
401 authentication_failed The API key provided was invalid or missing
403 forbidden You don't have permission to access this resource
404 not_found The requested resource was not found
429 rate_limit_exceeded You have exceeded your rate limit
500 server_error An error occurred on our servers

Client Libraries

We provide official client libraries for several programming languages to make integration easier:

JavaScript

npm install a2ppro-sdk
View on GitHub

Python

pip install a2ppro
View on GitHub

PHP

composer require a2ppro/a2ppro-php
View on GitHub

Webhooks

A2P Pro can send webhook notifications to your application when certain events occur, such as message delivery status updates.

Webhook Events

Event Description
message.sent Triggered when a message is sent
message.delivered Triggered when a message is delivered to the recipient
message.failed Triggered when a message fails to send