SSoftLinkSMSDocs

Phone numbers

Which number formats we accept, and how we normalise them.

Send numbers in any common format. We validate each one with Google's libphonenumber, the library behind Android's dialler, and store it in international E.164 form.

You sendWe store
+254712345678+254712345678
254712345678+254712345678
0712345678+254712345678
0712 345 678+254712345678
+1 415 555 2671+14155552671

Numbers without a + country code are read as Kenyan. For any other country, include the + and country code.

What gets rejected

  • Numbers that can't be parsed, or are the wrong length for their country.
  • Numbers that can't receive SMS, such as landlines.

If any recipient is rejected, the whole request fails with 400 and nothing is sent or charged:

{
  "error": {
    "code": "invalid",
    "message": "Invalid phone number format: 0712,+254 20 1234567",
    "details": {
      "non_field_errors": ["Invalid phone number format: 0712,+254 20 1234567"]
    }
  }
}

Validate numbers when your users enter them, not at send time. libphonenumber has ports for most languages; matching our check up front means sends don't fail on a bad row.

Duplicates

Duplicates are removed after normalisation, so 0712345678 and +254712345678 in one request become one message.

Outside Kenya

International numbers pass validation, but delivery and price depend on the destination network. Talk to support@softlinksms.co.ke before sending internationally.

On this page