Guides
Phone numbers
Phone number formats accepted by the API: international, local DR Congo, normalization and validation.
The API accepts several formats and normalizes them to the international format without `+` (e.g. 243812345678). Spaces, dashes and parentheses are ignored. Responses always return the normalized format.
Accepted formats#
| Input | Rule | Result |
|---|---|---|
+243812345678, 00243812345678 | Country code given: kept (any country). | 243812345678 |
243812345678 | Already international. | 243812345678 |
33612345678 | Without +, 11 digits or more not starting with 0: already international, other country. | 33612345678 |
0812345678, 812345678 | Otherwise, local DR Congo format: the 243 country code is added. | 243812345678 |
Validation#
A normalized number must have 8 to 15 digits. An invalid number is refused with RECIPIENT_NOT_SENDABLE (reason: invalid_phone) on POST /sms, or INVALID_PHONE on POST /otp/send. POST /sms/estimate ignores invalid numbers without error.
For a short foreign number (10 digits or fewer), always use the +: without it, it would be read as a local DR Congo number.
Duplicates#
Duplicates in a list are merged after normalization: 0812345678 and 243812345678 are the same number; one SMS is sent and one credit is debited.
Package helpers#
Every SDK applies the same rules locally before the call, with a configurable default country code (defaultCountryCode, 243): PhoneNumber::normalize() (PHP), PhoneNumber.normalize() (Node.js), labyrinthe_connect.phone (Python), PhoneNumber.Normalize() (.NET), PhoneNumbers.normalize() (Java). Laravel adds the new PhoneNumber() validation rule.