Check a Cameroonian number
Format, E.164 normalization and operator: enough to clean up a contact file.
No sign-up, no usage limit.
This calculation is exactly the one the API returns before every send.
The rule, in one line
A Cameroonian mobile number is nine digits long and starts with 6, preceded by the +237 country code in international form. Landlines start with 2 and are not accepted for sending. Everything else — spaces, hyphens, brackets, a 00237 prefix — is presentation, not the number.
What the API accepts, and what it turns down
The tool above is deliberately more forgiving than the API: it also strips hyphens, dots and brackets, because address books are full of them. The API only strips spaces.
| Input | API | Why |
|---|---|---|
| +237690000000 | Accepted | E.164 form, the one the API always returns. |
| 237690000000 | Accepted | Country code without the plus sign, on exactly twelve digits. |
| 690000000 | Accepted | National form: nine digits starting with 6. |
| +237 690 00 00 00 | Accepted | Spaces are ignored by the API. |
| 690-00-00-00 | Rejected | Hyphens are not stripped by the API: clean them before the call. |
| 00237690000000 | Rejected | The 00 international prefix is not recognised; use +237. |
| 233421234 | Rejected | Landline: the API only accepts mobile numbers. |
A rejected number gets an explicit answer, and no debit:
HTTP/1.1 400 Bad Request
{
"code": "INVALID_NUMBER",
"message": "Numéro invalide : formats acceptés +2376XXXXXXXX, 2376XXXXXXXX, 6XXXXXXXX"
}The call concerned is POST https://api.sms.gworldship.com/v1/sms; the number is checked before the balance, so an invalid number costs nothing. Error messages come back in French, error codes are stable and machine-readable — match on code, never on message.
Cleaning up a contact file
The same rule fits in a few lines, ready to run over a whole column before any import. It returns the E.164 form, the only one worth storing: it is what the API returns, and what to deduplicate on.
/** Cameroonian number in E.164, or null if it is not a mobile. */
function toE164(raw) {
const cleaned = String(raw).replace(/[\s.\-()]/g, '');
const national = cleaned.startsWith('+237')
? cleaned.slice(4)
: cleaned.startsWith('237') && cleaned.length === 12
? cleaned.slice(3)
: cleaned;
return /^6\d{8}$/.test(national) ? '+237' + national : null;
}
// Deduplicate on the E.164 form: the same contact often shows up twice,
// once as "690000000" and once as "+237690000000".What a format check does not guarantee
A well-formed number is not a reachable number. It may match no active line, or a handset that has been off for weeks. The only proof of arrival is the DELIVERED status reported by the carrier after the send; a message ending in FAILED is automatically refunded in credits.
Carrier detection reads an allocated range: it says nothing about a line having changed hands. For a campaign, sending and reading the statuses beats trying to validate everything upfront.
Frequently asked questions
Can a landline receive an SMS?
The API only accepts mobile numbers, meaning nine digits starting with 6. A landline is rejected with the INVALID_NUMBER code, before any debit.
Do I have to write the +237 country code?
No, the nine digits are enough. Whatever form you send, the API response always carries the number normalised to E.164 — that is the one to store.
How do I know the number really exists?
No format check can tell you: a number can be perfectly well formed and match no active line. Only the DELIVERED status of a message actually sent proves it, and a failed message is refunded in credits.
One account is enough to send your first message: instant API key, 100 XAF of free credit.
Try the API