Price before sending

Find out what a send will cost. Nothing is sent and nothing is charged.

POST/api/v1/sms/quote
Parameters
message
stringrequired
The body you intend to send, including any rendered placeholders.
recipients
string[]required
Up to 10,000 numbers.
type
string
TRANSACTIONAL (default), PROMOTIONAL or OTP. Affects which opt-outs apply.
Shell
curl -X POST https://api.jkasms.com/api/v1/sms/quote \
  -H "Authorization: Bearer $JKASMS_SECRET_KEY" \
  -H "X-JKASMS-Org-Id: $JKASMS_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Dear parent, school resumes on Monday.",
    "recipients": ["0241234567", "+233241234567", "0551234567"]
  }'
Response200
JSON
{
  "success": true,
  "data": {
    "recipients": 2,
    "invalid_recipients": 0,
    "suppressed_recipients": 0,
    "duplicates_removed": 1,
    "segments_per_message": 1,
    "total_segments": 2,
    "encoding": "GSM7",
    "total_cost": "0.12",
    "balance_after": "99.88",
    "sufficient_balance": true,
    "currency": "GHS",
    "paid_with": "credits",
    "credits_required": 2,
    "credits_available": 4814,
    "credits_after": 4812
  }
}

Note duplicates_removed: 1 — the first two numbers are the same subscriber written differently. You are charged once.

What a send costs

credits_required — one credit per segment. Sending spends SMS credits and nothing else; your wallet is never charged per message. See Wallet.

balance_after always equals your current wallet balance, and total_cost is an internal list value we record against the message — neither is charged. paid_with is always credits; it remains in the response so integrations written against the older dual-payment behaviour keep parsing.

Fields worth checking

  • encoding — UCS2 on a short message means a non-standard character slipped in. See Segments and pricing.
  • sufficient_balance — check this before sending rather than handling a 402 afterwards. It asks one question: do you hold enough credits? A funded wallet does not make a send affordable.
  • suppressed_recipients — how many opted out and will be skipped.

The quote runs the same pricing, normalisation, opt-out filtering and balance selection as the real send, so the two cannot disagree.