Phone numbers
List, buy and release your numbers, and forward their calls. Each number is billed monthly at your price, first month up front, no setup fee: see Billing. Buying needs a card on file (Settings → Billing).
#The Phone number object
idinteger- The number’s id, the
phone_number_idfrom the purchase. phone_numberstring- The number, like
+14155550100. While it’s being set up it’s a placeholder like"Pending (415)", not a phone number. statusstring- Only
activecan send.provider_rejectedandpayment_declinedcan’t, as they are.Possible values
status Meaning activeCan send. pending_provisioning,pendingBeing set up. phone_numberis a placeholder like"Pending (415)", not a phone number.provider_rejected,payment_declinedFailed. Stop polling. For provider_rejected, pick a new area code with Replace a rejected number;payment_declinedis set up again once your card is charged.billing_suspended,suspendedCan’t send. billing_suspended: the number’s monthly charge lapsed. Email support to bring it back; adding a new card alone won’t.suspended: held for a review. It stays this way until the review clears, so email support.released,inactive,retired,cancelled,canceledNo longer in use. deletedReleased. Hidden from the list; GET /v1/numbers/:idcan still return it. created_atstring- When the number was added, ISO 8601.
webhook_urlstring or null- The number’s own webhook, or
nullwhen it uses your account webhook. See Set a number’s webhook. namestring | null- The number’s label. Set it with Rename a number.
forward_to_numberstring | null- Where its calls ring, or
null. See Forward calls. campaign_idstring | null- The carrier id of the campaign it sends under, or
nullwhile it has none. See Move a number to another campaign. daily_capinteger | null- The most texts it sends in a day, or
nullfor no cap. See Set a number’s daily cap. use_for_texting,use_for_callingboolean- Whether Ready picks it for texts and offers it as a caller ID. See Use a number for texting or calling.
restingbooleantruewhile it’s resting: Ready doesn’t pick it as a sender. See Rest a number.rested_untilstring | null- When the rest ends, ISO 8601, or
nullwhen it isn’t resting. A rest until you resume shows a date years away. spamobject- Spam signals for the number.
Child attributes
spam.sms_flaggedboolean- Flagged by web spam reports.
spam.sms_reportsinteger- How many web spam reports.
spam.sms_checked_atstring | null- When the reports were last checked.
spam.caller_flaggedbooleantruewhen carriers label the number Spam Likely.spam.caller_flagged_atstring | null- When carriers labelled it.
account_idinteger- The account that holds the number. Only with
include_sub_accounts=trueon List numbers.
#List numbers
Every number on the account, newest first, including pending and failed ones, so check status. Send limit to page it.
Parameters
include_sub_accountsstring · query- Send
trueto also list the numbers of your own other business accounts and of sub-accounts you pay for (billing agency). For an independent sub-account, call withX-Sub-Account-Id. Each number then hasaccount_id.Who gets extra numbers
Only an agency (an account that has sub-accounts) gets extra numbers. A sub-account or any other account gets its own numbers, withaccount_idadded. Any other value is ignored. limitinteger · query- Page size, up to 500. Without
limitandbefore_idyou get every number in one answer. With either, the answer is paged newest id first and carrieshas_moreandnext_before_id. before_idinteger · query- Send the
next_before_idfrom the previous page to get the next one. Loop untilhas_moreisfalse.
Returns a list of Phone number objects in data.
Returns
has_moreboolean- Only when you send
limitorbefore_id.truewhen there’s another page. next_before_idinteger- Only when you send
limitorbefore_id. Send it asbefore_idfor the next page.nullon an empty page.
Errors
| HTTP | Code | When |
|---|---|---|
| 500 | internal_error | Read failed. Safe to retry. |
#Get a number
One number. Poll this after a purchase until it’s ready, and stop if it becomes provider_rejected or payment_declined. If a buy answer was lost, read the number here before you buy again. It answers for any number your key could release, so a team member’s key also reads the numbers held by the account owner it works for. After you release a number this returns status: "deleted" or a 404.
Parameters
idinteger · pathRequired- The
phone_number_idfrom the purchase.
Returns a Phone number object in data.
Errors
| HTTP | Code | When |
|---|---|---|
| 404 | number_not_found | Not on this account. |
#Start a number purchase
Check an area code, start a purchase, then buy with its payment_intent_id. This pays the first month on your saved card and returns the payment to buy with. Checkouts share a ceiling of 700 a minute. Needs the manage_phones permission.
Parameters
Idempotency-Keystring · header- Recommended. Retry safely without paying twice. A retry with the same key gets the first answer back, even if the body changed.
area_codestring- Required for a US number. The 3-digit area code to buy in. Leave it out when you send
country. countrystringAU,CAorGBbuys a number in Australia, Canada or United Kingdom where Ready has opened that country; one not open yet answers400country_unavailable. We pick the number, so there’s no area code. Leave it out for a US number.
Returns
data.payment_intent_idstring- Pass it to Buy a number.
data.charged, data.authorizedboolean- Checkout either charges or holds the first month. If the number can’t be provisioned, the hold is released or the charge refunded.
data.card_brand, data.card_last4string- The card used.
data.client_secret, data.has_cardstring, boolean- Instead of the above when there’s no card on file, or the card needs confirming. The API can’t finish that payment: add a card in Settings → Billing and call again.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | area_code_invalid | Missing, not 3 digits, or starts with 0 or 1. |
| 400 | country_unavailable | Ready doesn’t sell numbers in that country yet. |
| 402 | card_declined | Card refused. Also card_authentication_required. |
| 402 | PURCHASE_BLOCKED | Unpaid bill or account review. |
| 409 | area_code_unavailable | No stock; see alternatives. |
| 409 | purchase_in_progress | Another purchase is running. Also campaign_number_limit (your registration is full, see Buy a number). |
| 502 | checkout_unconfirmed | Don’t retry: check GET /v1/numbers first. |
| 503 | checkout_unavailable | Nothing charged. Also availability_check_unavailable, cap_check_unavailable, billing_check_unavailable, billing_account_unavailable, number_price_unavailable, payments_unavailable. |
#Buy a number
Provisions the number you paid for at checkout. Buys share a ceiling of 140 a minute. Needs the manage_phones permission.
Parameters
Idempotency-Keystring · header- Recommended. Retry safely. Use a new key for each new purchase.
area_codestring- Required for a US number. The area code you checked out with. The number comes from this one. Leave it out for an overseas number.
countrystring- The same
countryyou checked out with, for a number in Australia, Canada or United Kingdom. payment_intent_idstringRequireddata.payment_intent_idfrom checkout. Each one provisions exactly one number.
Returns
phone_number_idinteger- The number’s id; store it.
idis the same value. Poll it withGET /v1/numbers/:id, and send from the number withfrom. instantbooleantrue: the number is ready now andphone_numberis real.false: Ready ordered it from the carrier; there’s nophone_numberyet.pending_provisioningbooleantrue: being set up, usually within a few minutes; poll untilactive.pending_campaign_approvalbooleantrue: your own registration isn’t approved yet.can_send_nowboolean- On an instant buy.
false: the number can’t text until your registration is approved (usually 2 to 7 days). A number on Ready’s shared registration can text now. replaced_phone_id, noteinteger | null, string- The number replaced, if any (instant buy only), and a sentence on what happens next.
Errors
A refusal after you paid carries charge_returned. true: your payment was returned. false: Ready couldn’t confirm it was returned, so contact support before you buy again, or you could pay twice. It’s left out when you weren’t charged.
| HTTP | Code | When |
|---|---|---|
| 400 | area_code_invalid | Missing, not 3 digits, or starts with 0 or 1. |
| 400 | payment_intent_required | Also payment_not_confirmed, payment_not_for_number, payment_not_taken, payment_not_expected. |
| 400 | invalid_field | A field has the wrong type. |
| 400 | no_campaign | Your account has no registration and Ready’s shared one isn’t available. |
| 402 | PURCHASE_BLOCKED | Account under review. An unpaid bill doesn’t block a buy already paid at checkout. |
| 403 | payment_not_owned | Another account’s payment. |
| 409 | payment_intent_already_used | This payment already bought one. |
| 409 | campaign_number_limit | Your registration already has the most numbers carriers allow on one. Release a number you no longer use, or contact support about a second registration. |
| 409 | area_code_unavailable | Sold out between checkout and buy. |
| 500 | buy_incomplete | Not finished. Don’t buy again: check GET /v1/numbers. |
| 502 | order_unconfirmed | The carrier didn’t confirm the order, so it may have gone through. Don’t buy again: check GET /v1/numbers, then contact support. Your payment was kept, not returned. |
| 503 | provision_cap | Ready has paused new numbers for now. Nothing was ordered. |
| 503 | availability_check_unavailable | Ready couldn’t check where to add your number, so none was added. Retry in a minute. |
| 503 | billing_check_unavailable | Retry. Also payments_unavailable. |
#Replace a rejected number
Orders a new number in another area code for a number the carrier rejected (status provider_rejected). There’s no charge: you paid when you bought it. The number keeps its id and goes back to pending_provisioning; poll Get a number until it’s active. US numbers only. Needs the manage_phones permission.
Path parameters
idintegerRequired- The number id.
Body parameters
area_codestringRequired- A 3-digit US area code. Check it first with Check an area code.
Returns
pending_provisioningbooleantrue: the order is in.phone_number_idinteger- The same number id.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | area_code_invalid | Not a 3-digit US area code. |
| 400 | no_campaign | Register your business first. |
| 404 | NUMBER_NOT_FOUND | No rejected number with this id on your account. A second call after a replacement was ordered also answers this. |
| 409 | reprovision_not_available | The number is for another country. Contact support. |
| 409 | campaign_number_limit | Your campaign already has the most numbers the carriers allow. |
| 503 | provision_cap | Ready has reached its number orders for today. Nothing was ordered; try again later. |
| 503 | number_check_unavailable | Ready couldn’t check the number or your campaign. Nothing was ordered; try again in a minute. |
See also: the guide to doing this in the app.