Sign inGet Started

Get an available phone number

GET
/v1/numbers/available/{number}
// A number a carrier supplies is only on sale while the carrier still has it,
// so a 404 here means someone else took it.
const candidate = await bird.numbers.available.get("+447700900201");
console.log(candidate.country_code, candidate.capabilities);
Reactie200
{
  "country_code": "US",
  "number_type": "mobile",
  "capabilities": [
    "sms"
  ],
  "ownership_address_scope": "anywhere",
  "ownership_requirements": {
    "kind": "operation",
    "description": "See what this country requires to prove you own this number",
    "operation": "getWorkspaceComplianceRequirements",
    "params": {
      "subject_kind": "number",
      "country_code": "US",
      "program": "mobile"
    }
  },
  "pricing": {
    "setup_price": {
      "amount": "0.00995",
      "currency_code": "USD"
    },
    "recurring_price": {
      "amount": "0.00995",
      "currency_code": "USD"
    },
    "recurring_period": {
      "unit": "month",
      "count": 1
    },
    "intervals_per_charge": 12
  }
}

Returns a single phone number available for purchase, whether it is already in inventory or can be acquired for you. Numbers supplied through a carrier remain available only while the carrier has them, so a number listed a moment ago may already be gone. A 404 means the number is currently unavailable for sale.

Parameters

numberstring

Phone number in E.164 format. The leading + is optional.

Response Payload

number
string
verplicht

Phone number in E.164 format.

country_code
string
verplicht

ISO 3166-1 alpha-2 country code.

number_type
string
verplicht

Physical type of this phone number.

Possible values (may grow over time): mobile, local, national, short_code, short_code_fteu, toll_free

capabilities
array of string
verplicht

Capabilities supported by this number.

ownership_registration_required
boolean
verplicht

Whether ownership paperwork must be approved before outbound SMS and voice use. Customer availability accounts for organization exemptions; admin supplier searches report the general country and number-type requirement. You can acquire the number, including Bird stock, and submit paperwork afterward. Any pricing.setup_price is charged at assignment for Bird stock and usually on delivery for a carrier number, plus any tax. The recurring charge, net of tax pricing.recurring_price multiplied by pricing.intervals_per_charge, is taken with any tax at assignment and at each renewal, even while approval is pending; assignment may follow completion of a pending supplier order.

ownership_address_scope
string

Where the carrier requires the business address on this number's ownership registration to be. Present only when the carrier itself registers the number before it carries traffic, as anywhere when it restricts no address; omitted otherwise. An address that does not meet the rule is refused after purchase, and only an address that meets it can fix the registration. If the paperwork is not approved by the registration deadline, the number is removed: any setup fee is credited back, and the first recurring charge is not refunded.

  • anywhere: any business address.
  • country: a business address in the number's country.
  • number_area: a business address inside the number's own area code, for example in Amsterdam for an Amsterdam (020) number. ownership_address_area_name names the area when it is known.

Possible values (may grow over time): anywhere, country, number_area

ownership_address_area_name
string

Name of the area this local number belongs to, for example Amsterdam: the area a number_area ownership_address_scope refers to. Text for display; the address is not checked against it before purchase. Omitted when the number has no number_area rule or the area is not known.

ownership_requirements
object

Where to read what this number's ownership paperwork asks for, before you buy it. Call the named operation with params to get the form for the number's country and number type: every field, the documents it takes and its guidance, unanswered. That read needs compliance read access, which this search does not. Present when a form is published for the number's country and number type, including when ownership_registration_required is false because your organization is exempt from the paperwork. Omitted when no form is published, when the form could not be looked up for this response, and on admin supplier searches.

Onderliggende attributen tonen
ownership_requirements.kind
string
verplicht

What you do about this step.

  • operation: call the operation named in operation, then read again.
  • external: act somewhere this API does not reach, then read again.
  • wait: nothing is asked of you, so read again later.
  • terminal: nothing you do resolves this, so stop retrying.

Tolerate a value you do not recognize: show the description and offer no action.

Possible values (may grow over time): operation, external, wait, terminal

ownership_requirements.description
string
verplicht

A short, human-readable label for the step, suitable for display.

ownership_requirements.operation
string

The operationId to call. Present only when kind is operation. The operation's own schema says how to call it; this says only which one, and what to address it with.

ownership_requirements.params
object

The parameters that address the operation, by name: {"sender_id": "…"} for an operation on /v1/sms/senders/{sender_id}/requirements. A parameter the operation takes in its query string is given the same way, so an operation addressed as ?subject_id= carries {"subject_id": "…"}. Every parameter the call needs is here, whether its value came from the thing you were acting on or is fixed for this step, so you can make the call from this object alone. Present only when kind is operation and the operation names a subject. A request body, when the operation takes one, is described by the operation's own schema and never appears here.

ownership_requirements.url
string

A URL to open. Present only when kind is external, and only when the step has one. An external step whose description says to go and do something with no URL to open is normal.

pricing
object

What your organization pays for this number. Omitted on admin supplier searches, which have no organization to price for.

Onderliggende attributen tonen

Ga verder met de documentatie, handleidingen en voorbeelden voor dit onderwerp.