Character counter
Estimate an SMS before sending: number of segments, detected encoding, unit price and total cost, based on your account's rate.
URL
POST https://api.smspartner.fr/v1/sms/estimate
Rate limit: 30 requests / 30 seconds
Parameters
apiKey
text
Required. Content of the message to estimate. 10,000 characters maximum.
country
Optional. ISO 3166-1 alpha-2 country code (e.g. FR, BE) used to determine the rate. Default value: FR.
Example request
{
"apiKey": "xxx",
"text": "Thanks for your order, delivery expected tomorrow before noon!",
"country": "FR"
}Response
sms_count
Number of SMS segments needed to send the message.
encoding
Detected encoding: GSM-7 (standard alphabet) or UCS-2 (Unicode characters, e.g. emojis, extended accents).
cost_per_sms
Unit price per SMS segment, based on your account's rate.
total_cost
Estimated total cost (cost_per_sms × sms_count).
is_unicode_required
Present and set to true only when the encoding is UCS-2 (the message contains Unicode characters). Absent otherwise.
Errors
On error, the response has the form { "success": false, "message": "..." } with the corresponding HTTP status.
400
Invalid JSON, missing text parameter, text longer than 10,000 characters, or message exceeding 10 SMS.
401
apiKey missing or invalid.
429
Rate limit exceeded (30 requests / 30 seconds).
Last updated