readyDocs Open the appOpen the app

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_id from 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 active can send. provider_rejected and payment_declined can’t, as they are.
Possible values
statusMeaning
activeCan send.
pending_provisioning, pendingBeing set up. phone_number is 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_declined is 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/:id can still return it.
created_atstring
When the number was added, ISO 8601.
webhook_urlstring or null
The number’s own webhook, or null when 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 null while it has none. See Move a number to another campaign.
daily_capinteger | null
The most texts it sends in a day, or null for 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.
restingboolean
true while 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 null when 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_flaggedboolean
true when 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=true on 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 true to 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 with X-Sub-Account-Id. Each number then has account_id.
Who gets extra numbersOnly an agency (an account that has sub-accounts) gets extra numbers. A sub-account or any other account gets its own numbers, with account_id added. Any other value is ignored.
limitinteger · query
Page size, up to 500. Without limit and before_id you get every number in one answer. With either, the answer is paged newest id first and carries has_more and next_before_id.
before_idinteger · query
Send the next_before_id from the previous page to get the next one. Loop until has_more is false.

Returns a list of Phone number objects in data.

Returns
has_moreboolean
Only when you send limit or before_id. true when there’s another page.
next_before_idinteger
Only when you send limit or before_id. Send it as before_id for the next page. null on an empty page.
Errors
HTTPCodeWhen
500internal_errorRead 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_id from the purchase.

Returns a Phone number object in data.

Errors
HTTPCodeWhen
404number_not_foundNot 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.
countrystring
AU, CA or GB buys a number in Australia, Canada or United Kingdom where Ready has opened that country; one not open yet answers 400 country_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
HTTPCodeWhen
400area_code_invalidMissing, not 3 digits, or starts with 0 or 1.
400country_unavailableReady doesn’t sell numbers in that country yet.
402card_declinedCard refused. Also card_authentication_required.
402PURCHASE_BLOCKEDUnpaid bill or account review.
409area_code_unavailableNo stock; see alternatives.
409purchase_in_progressAnother purchase is running. Also campaign_number_limit (your registration is full, see Buy a number).
502checkout_unconfirmedDon’t retry: check GET /v1/numbers first.
503checkout_unavailableNothing 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 country you checked out with, for a number in Australia, Canada or United Kingdom.
payment_intent_idstringRequired
data.payment_intent_id from checkout. Each one provisions exactly one number.
Returns
phone_number_idinteger
The number’s id; store it. id is the same value. Poll it with GET /v1/numbers/:id, and send from the number with from.
instantboolean
true: the number is ready now and phone_number is real. false: Ready ordered it from the carrier; there’s no phone_number yet.
pending_provisioningboolean
true: being set up, usually within a few minutes; poll until active.
pending_campaign_approvalboolean
true: 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.

HTTPCodeWhen
400area_code_invalidMissing, not 3 digits, or starts with 0 or 1.
400payment_intent_requiredAlso payment_not_confirmed, payment_not_for_number, payment_not_taken, payment_not_expected.
400invalid_fieldA field has the wrong type.
400no_campaignYour account has no registration and Ready’s shared one isn’t available.
402PURCHASE_BLOCKEDAccount under review. An unpaid bill doesn’t block a buy already paid at checkout.
403payment_not_ownedAnother account’s payment.
409payment_intent_already_usedThis payment already bought one.
409campaign_number_limitYour registration already has the most numbers carriers allow on one. Release a number you no longer use, or contact support about a second registration.
409area_code_unavailableSold out between checkout and buy.
500buy_incompleteNot finished. Don’t buy again: check GET /v1/numbers.
502order_unconfirmedThe 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.
503provision_capReady has paused new numbers for now. Nothing was ordered.
503availability_check_unavailableReady couldn’t check where to add your number, so none was added. Retry in a minute.
503billing_check_unavailableRetry. 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_provisioningboolean
true: the order is in.
phone_number_idinteger
The same number id.
Errors
HTTPCodeWhen
400area_code_invalidNot a 3-digit US area code.
400no_campaignRegister your business first.
404NUMBER_NOT_FOUNDNo rejected number with this id on your account. A second call after a replacement was ordered also answers this.
409reprovision_not_availableThe number is for another country. Contact support.
409campaign_number_limitYour campaign already has the most numbers the carriers allow.
503provision_capReady has reached its number orders for today. Nothing was ordered; try again later.
503number_check_unavailableReady couldn’t check the number or your campaign. Nothing was ordered; try again in a minute.