API for counting SMS messages needed to send a text

API to determine total SMS messages needed for a given text, version 2.0

 

Got a text message to send via SMS? This API will tell you how many SMS messages are needed in order to deliver your text message

 

🔐 Step 1: Get Your Api Key

Before anything else, you’ll need an Api key to authenticate your requests.
Already have one? Great! Copy it to your clipboard.
Need one? You can generate it by heading over to Settings → Api Keys → Create New Api Key.

 

📨 Step 2: Add Your Api Key to the Request Header

When you’re ready to make your request, add your Api key into the header like this:

x-api-key: xxxx-xxxx-xxxx-xxxx
📋 Copy

 

🚀 Step 3: Send a POST Request to this endpoint

You’ll be sending a POST request to:

https://app.messengeros.com/external/2.0/template/sms/characters-count
📋 Copy

This is where the magic happens ✨

 

🧱 Step 4: Build your Payload

Here’s the format your JSON payload should follow:
{
    "content": "enter your text message here"
}                                        
📋 Copy

✅ Step 5: Get your data

If everything looks good and your JSON is valid, the Api will respond with:

{
    "characterCount": xxx, // the total number of characters sent in your "content" key
    "isUnicode": true|false, // if false - no special characters added, if true - special characters added that will increase the number of SMSes needed
    "messagesCount": 1 // total SMSes needed (based on character count and unicode format of the text)
}

That’s it! 🎉

Need help or want to test it out? Let us know, we’re always here to support.

© MessengerOS