Glossary
Short code: five and six digit messaging numbers
A short code is a 5 or 6 digit number used for bulk SMS such as alerts and codes. How they differ from normal phone numbers and why they fail validation.
Updated 2026-11-23
A short code is a number of five or six digits, sometimes up to eight depending on the country, that businesses use to send and receive text messages in bulk. Banks, delivery services and political campaigns use them for alerts and codes. They look like phone numbers but are not subscriber numbers, and they follow different rules.
How it works
A short code is leased from a registry run by the country's carriers or an industry body, and each operator must approve its use. The business gets a number that anyone on a supporting network can message, such as sending a keyword to 12345 to opt in.
| Property | Short code | Full number |
|---|---|---|
| Length | 5 to 6 digits, up to 8 in some countries | Up to 15 digits |
| Country calling code | None | Yes, see country calling code |
| Reach | One country, specific networks | Worldwide |
| Voice calls | Generally no | Yes |
| Use | Bulk, high throughput SMS | Any |
Short codes are provisioned per country. The same digits can belong to different businesses in different countries, and a code that works on one operator may be blocked on another. Approval often takes weeks and involves campaign review, so they are used by organisations that send a lot.
Messaging also uses other sender types: toll-free numbers, ordinary long numbers and alphanumeric sender names. Each has its own limits on speed, reach and registration.
Short codes also exist as dialing codes for operator services, such as 112 or 911 for emergencies. Those are a different thing: service numbers, not messaging senders. They are not valid targets for an SMS either.
Why it matters for validation
A signup form expects a person's number. If a user enters a five-digit short code, an emergency number or a company's alert number, the field accepts digits but the number cannot receive a verification SMS from you.
A numbering-plan check rejects them. With the phone API, a short code comes back as status: invalid with valid false, because it does not fit the subscriber numbering plan of the country, and e164 is null. That is the answer you want: ask the user for a full number.
Tips:
- Do not store short codes in a phone field.
- If your own business sends from a short code, keep the sender separate from user data.
- When testing, use real mobile numbers or the test mode rather than shortened ones.
See also phone number validation.
Related
Frequently asked questions
What is an SMS short code?
Can I call or text a short code from abroad?
Is a short code valid in E.164?
Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time