Skip to content

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.

Frequently asked questions

What is an SMS short code?
A short code is a number of five or six digits, in some countries up to eight, used by businesses to send and receive text messages at scale, for example for alerts, promotions and one-time codes. It is not a full phone number: it has no country calling code and works only inside the countries and networks where it was provisioned.
Can I call or text a short code from abroad?
Usually not. Short codes are local to a country and often to specific operators. They cannot be reached with an international number, and a message to one from a roaming phone may fail. If your service needs international reach, use a full number or an alphanumeric sender instead.
Is a short code valid in E.164?
No. E.164 describes full international numbers with a country calling code. A short code has no such code and is not a subscriber number. A phone validator will reject it as invalid, which is the right answer when a form field expects a person's phone number.

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