Message encoding

If a message body only contains ASCII characters when sending and receiving messages, then a message segment may contain up to 160 characters. However, if the message body contains one or more non-ASCII characters then the message segment may contain up to only 70 characters. To find the type of encoding used in a message, use the Look Up a Message Detail Record endpoint API to look up an MDR. The MDR contains a message_encoding field indicating the type of encoding used for that message, described in the following table:

Message Encoding Encoding Characters Per Segment
0 UTF-8 160
8 UCS-2 70

In the following MDR example, the message_encoding field is set to 0, indicating that UTF-8 encoding was used; therefore, 160 characters per segment are allowed:

{    "data": {
        "attributes": {
            "body": "Hey, nice marmot!",
            "direction": "outbound",
            "timestamp": "2016-04-14T21:10:27.366645+00:00",
            "amount_nanodollars": 4000000,
            "from": "12062092844",
            "message_encoding": 0,
            "type": "messages",
            "has_mms": false,
            "to": "19515557918",
            "amount_display": "$0.0040",
            "callback_url": null,
            "message_type": "long-code"
        },
        "type": "message",
        "id": "mdr1-a83257f4f9c04a4089daeeb050af99cd"
    }
}

            
Message Cost

The cost of the message is determined by the number of characters in the message body divided by either 160 or 70, depending on the encoding type. For example, if the message body were 80 characters long and encoded as message_encoding: 8, then you would be charged for two (2) SMS texts (80 character length/70 character segment limitation).

Message concatenation

For outbound messages, Flowroute does not limit the length of a message body. However, if the mobile carrier has a message length limitation, the message might be truncated. Flowroute will automatically break the message down into appropriately sized segments and add concatenation headers to those messages. As long as the message is sent to a carrier that supports concatenation headers, the message will be delivered to the mobile phone as one continuous message. If the carrier does not support concatenation headers, the message will be received in multiple parts.

For inbound messages Flowroute will reassemble the message and deliver it to the endpoint as one continuous message if concatenation headers are received. You will still be charged per message segment; however, the message will appear both at the endpoint and in the MDR as one long message. If concatenation headers are not received, each message segment is delivered separately along with a unique message ID for each received segment.

Carrier Support for Concatenation Headers

At this time Sprint and T-Mobile are the only US mobile carriers that we are aware of that do not support concatenation headers.