Calculate SMS credits for a number and message

posthttps://api.expiryedge.com/v1/calculateSMSCost
Public - no API key60/min
Request
curl -X POST 'https://api.expiryedge.com/v1/calculateSMSCost' \
  -H "Content-Type: application/json" \
  -d '{
  "phone_number": "+14155550123",
  "message": "Reminder: Northwind Dental business license expires on 2026-10-15."
}'
Response
{
  "success": true,
  "data": {
    "phone_number": "+14155550123",
    "country": "US",
    "country_name": "United States",
    "message_length": 68,
    "segments": 1,
    "credits_per_segment": 1,
    "total_credits": 1,
    "has_unicode": false
  }
}

Resolves the destination country tier from phone_number and counts segments in message (160 GSM / 70 Unicode chars). Only POST is accepted.

Body parameters

application/json
  • phone_numberstringrequired
    E.164 phone number.
  • messagestring
    Message text. Defaults to an empty string.

Returns

200
Credit calculation.
  • successboolean
  • dataobject

Errors

400
The request is missing required fields or contains invalid values.
405
The endpoint does not accept this HTTP method.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.