Messages
Estimate a batch
Prices a batch without sending it and checks it against your balance.
POST
Prices a batch without sending it and checks it against your balance.
bearerheader
AuthorizationBearer <JWT>Your secret API key: sk_live_… for live traffic or sk_test_… for testing.
application/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
length <= 480reference?stringYour own reference for the whole batch.
Length
length <= 100recipients*array<>Between 1 and 10,000 recipients.
Items
1 <= items <= 10000The estimate.
application/jsoncurl -X POST 'https://api.appstractone.com/v1/messages/batch/estimate' \ -H 'Content-Type: application/json' \ -d '{ "from": "MYSHOP", "recipients": [ { "to": "+233241234567" } ]}'Example Response
{ "accepted": 2, "rejected": 0, "segments": 2, "totalCost": { "amount": "0.08", "currency": "GHS" }, "balance": { "amount": "19.96", "currency": "GHS" }, "sufficient": true, "errors": []}