Send a batch
Sends up to 10,000 messages from one sender ID in a single request. Each recipient can have its own text. Invalid recipients are reported in errors and are not charged.
Sends up to 10,000 messages from one sender ID in a single request. Each recipient can have its own text. Invalid recipients are reported in errors and are not charged.
bearerAuthorizationBearer <JWT>Your secret API key: sk_live_… for live traffic or sk_test_… for testing.
idempotency-key*stringIdempotency-Key?stringapplication/json- body
from*stringAn approved sender ID on your account, 3 to 11 letters or digits.
text?stringText sent to every recipient that has no text of its own. Up to 480 characters including spaces.
length <= 480reference?stringYour own reference for the whole batch.
length <= 100recipients*array<>Between 1 and 10,000 recipients.
1 <= items <= 10000The batch was accepted.
application/jsoncurl -X POST 'https://api.appstractone.com/v1/messages/batch' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"from": "MYSHOP",
"recipients": [
{
"to": "+233241234567"
}
]
}'{
"batchId": "bat_01M6MJSBW6TNFXDJ48HMRQXBPJ",
"status": "completed",
"test": true,
"accepted": 2,
"rejected": 0,
"segments": 2,
"cost": {
"amount": "0.08",
"currency": "GHS"
},
"messages": [
{
"id": "msg_01M6MJSBW6TNFXDJ48HMRQXBPK",
"to": "+233241234567",
"status": "delivered",
"encoding": "GSM-7",
"segments": 1,
"cost": {
"amount": "0.04",
"currency": "GHS"
},
"reference": null,
"test": true
},
{
"id": "msg_01M6MJSBW6TNFXDJ48HMRQXBPM",
"to": "+233201234567",
"status": "delivered",
"encoding": "GSM-7",
"segments": 1,
"cost": {
"amount": "0.04",
"currency": "GHS"
},
"reference": null,
"test": true
}
],
"errors": []
}Send a message POST
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.
Estimate message cost POST
Shows how many segments a message will use and what it will cost, without sending it.