readyDocs Open the appOpen the app

Area codes

Pick the area code before you buy a number: check it has stock, or let Ready suggest one.

#Check an area code

Whether you can buy a number in an area code.

Parameters

area_codestring · queryRequired
A 3-digit US or Canada area code. A code that isn’t 3 digits, or starts with 0 or 1, answers 400.
Returns
availableboolean
true means you can buy a number in that area code now. An area code that doesn’t exist, or that neither Ready nor the carrier has stock in, answers false.
readyboolean
Only when available is true. true: Ready has a number ready to hand over. false: the number is ordered from the carrier when you buy and is set up in a few minutes.
numbers[]object[]
Always empty, kept so existing code that reads it keeps working. You can’t pick a number; Ready assigns one in that area code when you buy.
alternatives[]object[]
When out of stock: up to 5 nearby area codes, each { area_code, state, ready }. ready: true means a number there can be ready right away.
Errors
HTTPCodeWhen
400area_code_invalidMissing, not 3 digits, or starts with 0 or 1.
500no codeReady couldn’t check its stock or the carrier’s just now. This doesn’t mean the area code is sold out. Try again in a minute.

#Suggest an area code

The local area code for a ZIP code. Without one, Ready uses the ZIP code of your registered business.

Query parameters

zipstring · query
A US ZIP code. Only its first 5 digits are read.
Returns
data.suggestedboolean | null
true with an area code, or null when there’s no ZIP code or no area code for it. data.reason then says which.
data.area_codestring
The suggested area code. Check it with Check an area code before you buy.
Errors
HTTPCodeWhen
500no codeReady couldn’t read your business ZIP code. Send zip, or try again.

#Area codes of your contacts

Area codes ranked by how many of your contacts have a number there, so you can buy a number local to most of them.

Returns
data.area_codes[]object[]
Each { area_code, contacts }, most contacts first.
Errors
HTTPCodeWhen
500no codeReady couldn’t count your contacts just now. Try again.