Messages

Send a message

Sends one SMS. The message is queued and you are charged immediately; track delivery with webhooks or by fetching the message. With a test key, nothing is sent and the message is marked delivered.

POST
/v1/messages

Sends one SMS. The message is queued and you are charged immediately; track delivery with webhooks or by fetching the message. With a test key, nothing is sent and the message is marked delivered.

Authorization

bearer
headerAuthorizationBearer <JWT>

Your secret API key: sk_live_… for live traffic or sk_test_… for testing.

Header Parameters

idempotency-key*string
Idempotency-Key?string

Request Body

application/json
  1. body
to*string

Recipient phone number. Ghana numbers can be local (0241234567) or international (+233241234567).

Lengthlength <= 32
from*string

An approved sender ID on your account, 3 to 11 letters or digits.

text*string

Message text, up to 480 characters including spaces. Long messages are split into segments and billed per segment.

Lengthlength <= 480
reference?string

Your own reference, returned in responses and webhooks. Up to 100 characters.

Lengthlength <= 100

Response Body

The message was accepted.

application/json
Example Request
curl -X POST 'https://api.appstractone.com/v1/messages' \
  -H 'idempotency-key: string' \
  -H 'Content-Type: application/json' \
  -d '{
  "to": "+233241234567",
  "from": "MYSHOP",
  "text": "Your order #1042 is on its way."
}'
Example Response
{
  "id": "msg_01M6MJSBV7KXZGYK5TZGGA0P6R",
  "to": "+233241234567",
  "status": "queued",
  "encoding": "GSM-7",
  "segments": 1,
  "cost": {
    "amount": "0.04",
    "currency": "GHS"
  },
  "reference": "order-1042",
  "test": false
}