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.
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.
bearerAuthorizationBearer <JWT>Your secret API key: sk_live_… for live traffic or sk_test_… for testing.
idempotency-key*stringIdempotency-Key?stringapplication/json- body
to*stringRecipient phone number. Ghana numbers can be local (0241234567) or international (+233241234567).
length <= 32from*stringAn approved sender ID on your account, 3 to 11 letters or digits.
text*stringMessage text, up to 480 characters including spaces. Long messages are split into segments and billed per segment.
length <= 480reference?stringYour own reference, returned in responses and webhooks. Up to 100 characters.
length <= 100The message was accepted.
application/jsoncurl -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."
}'{
"id": "msg_01M6MJSBV7KXZGYK5TZGGA0P6R",
"to": "+233241234567",
"status": "queued",
"encoding": "GSM-7",
"segments": 1,
"cost": {
"amount": "0.04",
"currency": "GHS"
},
"reference": "order-1042",
"test": false
}