lookup

Create a phone number lookup

Returns the number's serving and issuing networks, porting state, country, and line type. The baseline fields are included in each lookup. Request additional type blocks for classification, presence, roaming, SIM-swap, porting-history, or credibility data. Each block reports its own status; only blocks with an ok status incur an additional charge.

This form keeps the number out of the URL. The URL form performs the same lookup but cannot use an idempotency key. With this form, reuse an Idempotency-Key to return the stored result without another lookup or charge.

post/v1/lookup/phone-number

Request

  • Base URL: https://us1.platform.bird.com
  • URL: https://us1.platform.bird.com/v1/lookup/phone-number
  • Auth: one of:
    • HTTP bearer
    • API key in cookie bird_session

Headers

Idempotency-Keystring

Client-supplied key. On operations supporting request deduplication, a retained response is replayed for duplicate requests with the same key within the idempotency window (3 hours by default). This protection requires a workspace, organization, or staff-account scope. User-only and unscoped unauthenticated operations, streams, and operations with a separate replay contract do not use this response replay.

On a supported operation, if idempotency protection is unavailable before execution, the API returns 503 IdempotencyUnavailable (E01033) without executing this attempt. Retry with backoff using the same key and request. An operation that takes effect before its response is retained can still execute again on retry.

Two distinct 409 errors signal misuse:

  • request_in_progress (E01004): The same key is currently being processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  • idempotency_key_reuse (E01005): The same key has already completed against a different request body or method. Generate a new key.

Recommended key format is <event-type>/<entity-id> (for example welcome-user/usr_abc123).

X-Workspace-Idstring

Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.

X-Organization-Idstring

Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

Request body

phone_numberstring required

The phone number to look up, in international format: the country calling code, then the national number. The leading + is optional, and 00 works in its place, so +31612345678, 31612345678 and 0031612345678 are all the same number. A number written for dialling inside one country, with no country code, is rejected rather than guessed at.

typeLookupProperty[]

Properties to add to the base lookup. Omit this field or send an empty array to request only the base lookup.

Each delivered property is billed in addition to the base lookup. A property that could not be answered is returned with its status and is not billed.

Example request

{
  "phone_number": "+31612345678",
  "type": [
    "classification",
    "presence"
  ]
}

Response

Available network and number-intelligence information.

phone_numberstring required

The number that was looked up, in E.164 format.

country_codestring

ISO 3166-1 alpha-2 country code.

flagsLookupFlag[] required

Notable characteristics of the number. Empty when none apply.

line_type'mobile' | 'fixed_line' | 'voip' | 'toll_free' | 'premium_rate' | 'satellite' | 'pager' | 'payphone' | 'm2m' | 'service' | 'other' | 'unknown' required

What kind of line the number is, as reported by the carrier platform.

This is included in every base lookup, regardless of which properties you request.

  • unknown: the carrier platform holds no classification for the range.
  • other: it holds a classification with no equivalent here.
  • m2m: a range reserved for machine-to-machine traffic, belonging to no individual subscriber.

For the allocated service of the range at finer precision, request the classification property. That answers from a different source, with its own wider vocabulary, and is reported separately so you can always tell the two apart.

Example response

{
  "phone_number": "+441904123456",
  "country_code": "GB",
  "network_info": {
    "carrier_name": "BT",
    "mcc": "234",
    "mnc": "00"
  },
  "original_network_info": null,
  "flags": [],
  "line_type": "service",
  "classification": {
    "status": "ok",
    "value": "premium_rate"
  },
  "score": {
    "status": "ok",
    "value": 48
  },
  "presence": {
    "status": "ok",
    "reachable": true
  },
  "roaming": {
    "status": "unavailable"
  }
}

Changes

No recorded changes to this operation across all 3 revisions of this API.