Developer Quickstart

Your first lookup in five minutes

Telebase has one endpoint. You pass a phone number in E.164 format, include your Bearer token, and get back carrier, country, number type, number validity and a SIM swap field in a single JSON response. No SDK, no webhooks, no configuration. This page walks from sign-up to a working query in under five minutes.

Before you start

Sign up at app.telebase.io/login. A new account gets sandbox access straight away. Create your own API key in the dashboard; sandbox keys start with tb_test_ and live keys with tb_live_. For live access, click Request production access in the dashboard and we approve it.

Step 1: make your first request

Replace tb_test_xxxxxxxxxxxxxxxxxxxxxxxx with your sandbox key. A sandbox key answers three free test numbers: +447700900001 (SWAPPED), +447700900002 (NO_SWAP) and +447700900003 (UNKNOWN). It rejects any other number. Send the number in E.164 format, with the leading + URL-encoded as %2B. National formats such as 07700 900001 are rejected.

Shell (curl)
curl -s 'https://app.telebase.io/v1/lookup?phone=%2B447700900002' \
  -H 'Authorization: Bearer tb_test_xxxxxxxxxxxxxxxxxxxxxxxx'

That is the complete request. No body, no extra headers, no query parameters beyond phone.

Step 2: read the response

200 Response
{
  "phoneNumber": "+447700900002",
  "active": true,
  "carrier": "Telebase Test Carrier",
  "country": "GB",
  "numberType": "mobile",
  "simSwap": "NO_SWAP",
  "simSwapAt": "2026-09-22T09:16:03.003Z",
  "simSwapPeriod": "PT240H",
  "_meta": { "environment": "test", "activeSource": "SYNTHETIC" },
  "chargedCents": 0,
  "currency": "EUR"
}

Understanding the fields

Response field reference

The one gotcha: URL-encoding the +

Send phone numbers in E.164 format, which means a leading + followed by the country code and number with no spaces or dashes. When you pass the number as a query string parameter, the + must be URL-encoded as %2B. A raw + in a URL is interpreted as a space, which will cause a lookup failure or an unexpected result.

Correct
?phone=%2B447700900002
Incorrect (+ treated as space)
?phone=+447700900002

If you are constructing the URL in code, use your language's URL encoding function rather than building the string manually. Use the free E.164 formatter to convert any number instantly, or see the phone number validation guide for more on E.164 formatting, or MSISDN, IMSI and ICCID explained for how the E.164 number you send relates to the identifiers stored on the subscriber's SIM.

What a non-200 response looks like

A 401 means your key is missing, invalid, blocked or disabled, or the account needs production access. Check that the Authorization header reads exactly Bearer tb_test_... with a space between Bearer and the key, and no extra characters.

A 400 means the phone number failed validation. Common causes: missing country code, raw + rather than %2B, or a number that is too short or too long to be valid E.164.

A 402 (insufficient_funds) means your prepaid balance is too low. Request a top-up from Billing in the dashboard. Do not retry failed or timed-out requests automatically: a repeated request is a new lookup and can be charged again, so check the Check Log in the dashboard first.

Every error response has the same JSON body, with a machine-readable error code, a readable message and chargedCents, which is always 0 for errors:

{"error":"missing_api_key","message":"Provide a Bearer API key.","chargedCents":0}

A 200 with "active": null is not an error. It means the provider could not confirm the number's format, and _meta.activeSource will be UNKNOWN.

What to build next

The most common integration point for fraud and KYC teams is immediately after a user submits their phone number at onboarding or login. The check is synchronous and designed to run inline in your onboarding flow. The provider can take up to 30 seconds to answer, so allow for that before the next step renders.

The full machine-readable API guide is at telebase.io/skills-md and covers authentication, the complete response schema, error codes and a curl example.

The OpenAPI 3.1 specification is at telebase.io/openapi.yaml. Import it into Postman, Insomnia or a code generator, or give it to an agent as a tool definition.

SIM swap detection is in every response.

The simSwap field is present in your first lookup response today. Telebase detects recent SIM swaps with a single API call. The field returns SWAPPED, NO_SWAP or UNKNOWN.

Get sandbox access