Submit Size for a 160-Character SMS via HTTP SMS API

The submit size in bytes for sending a 160-character SMS message through an HTTP SMS API is approximately 640–840 bytes. This includes the SMS payload, HTTP request components, and network overhead. Below is a detailed breakdown:

1. SMS Message Size

  • Character Encoding: A standard SMS uses the GSM-7 character set, supporting 160 characters. Each character is encoded in 7 bits, but the message is packed into a 140-byte (1120-bit) payload due to SMS protocol constraints.
  • Calculation: 160 characters × 7 bits = 1120 bits = 140 bytes.
  • Note: If non-GSM-7 characters (e.g., emojis) are used, the message switches to UCS-2 encoding (2 bytes per character, max 70 characters). Since the query specifies 160 characters, GSM-7 is assumed.

2. HTTP Request Overhead

The HTTP POST request includes headers and a body with parameters like to, from, and message.

  • Headers: Typical headers include Authorization, Content-Type, and Host. Example:
  • POST /sms.do HTTP/1.1
    Host: api.smsapi.com
    Authorization: Bearer token_api_oauth
    Content-Type: application/x-www-form-urlencoded
    Content-Length: <length>
            
  • Header Size: Approximately 200–300 bytes, depending on token length and URL.
  • Body: Example body (e.g., SMSAPI format):
  • to=4412334445566&from=Test&message=<160-character-message>&format=json
            
  • Body Breakdown:
    • to=4412334445566: ~15 bytes (12-digit phone number).
    • from=Test: ~9 bytes (short sender ID).
    • message=<160-character-message>: ~160 bytes (GSM-7 characters in UTF-8).
    • format=json: ~11 bytes.
    • Total Body: ~200 bytes (including separators).
  • Total HTTP Request: Headers (~200–300 bytes) + Body (~200 bytes) = 400–500 bytes.

3. Network and Protocol Overhead

  • TCP/IP: Adds ~20 bytes (TCP) + ~20 bytes (IP) per packet, typically 1–2 packets (~40–80 bytes).
  • TLS: HTTPS adds ~50–100 bytes for encryption overhead (handshake, record headers).
  • Total: ~100–200 bytes.

4. Total Submit Size

  • SMS Payload: 140 bytes.
  • HTTP Request: 400–500 bytes.
  • Network/TLS: 100–200 bytes.
  • Total: 140 + 400–500 + 100–200 = 640–840 bytes.

5. Considerations

  • API Variations: Different APIs (e.g., Twilio, MessageBird) may have unique parameters, slightly altering the size.
  • Single Segment: A 160-character SMS fits in one segment, so no concatenation headers are needed.
  • Compression: Rarely used for small requests like SMS submissions.

Final Answer

The submit size for a 160-character SMS via an HTTP SMS API is approximately 640–840 bytes. For precise values, check the specific API’s request format and network configuration.

More information