Tools

Analyze SMS text

POSThttps://api.smsedge.com/v1/text/analyze/

Returns the encoding, length and number of SMS parts of a text, and the URLs in it, before you send.

The text is cleaned first: line breaks become spaces and repeated spaces become one. The response shows the cleaned text.

  • encoding is GSM_7BIT, GSM_7BIT_EX (GSM-7 with extended characters such as { } [ ] € ~, which count as 2) or UTF16 (Unicode).
  • max_length is the character limit per part for this text: 160 for one GSM-7 part or 153 per part in a multipart message, 70 for one Unicode part or 67 per part in a multipart message.
  • messages_number is the number of parts you pay for.
  • url_detected and urls are present only when the text has a URL.

The endpoint does not send or charge. It also accepts GET.

Body params (form)

  • textstringrequired

    The SMS text to analyze.

Responses

  • 200Text analysis
  • 400text is missing or empty
  • 401The API key is missing, wrong or the account is blocked
curl -X POST "https://api.smsedge.com/v1/text/analyze/" \
  -H "X-API-KEY: YOUR_API_KEY" \
  --data-urlencode "text=Hello {{{name}}}, visit https://example.com/offer"
[
  {
    "success": true,
    "data": {
      "text": "Hello {{{name}}}, visit https://example.com/offer",
      "encoding": "GSM_7BIT_EX",
      "current_length": 55,
      "max_length": 160,
      "messages_number": 1,
      "url_detected": true,
      "urls": [
        "https://example.com/offer"
      ]
    },
    "errors": [],
    "response": {
      "code": 200,
      "description": "OK",
      "date": "2026-11-16 14:00:23"
    },
    "api": {
      "version": "v1",
      "module": "text",
      "function": "analyze"
    },
    "user": {
      "id": 736
    }
  }
]

All requests need your API key in the X-API-KEY header. See Authentication.