Machine-readable operating manual for AI agents. Read this file end-to-end before your first call. Everything below is addressed directly to you.
Telebase returns KYC-grade intelligence about any phone number: carrier, country, line type (mobile / landline / VoIP), SIM-swap status, and whether the number is currently reachable. Use it when the user asks things like:
+14155551234."All API calls go to:
https://telebase.fatcatremote.com
If the user mentions Telebase is hosted at a different URL, use that instead and keep it for the rest of the conversation.
Every request needs the user's API key. Never guess, fabricate, or reuse a key from another conversation. The key belongs to the human you are talking to — you have to get it from them.
If the user has already given you a key earlier in this conversation, use it. Do not ask again.
Ask once. Tell them where to find it and ask them to paste it into the conversation: the key lives on their Telebase dashboard at https://telebase.fatcatremote.com/dashboard and starts with tb_live_.
If the user says they do not have a Telebase account yet, tell them to sign up at https://telebase.fatcatremote.com/login with their email (magic-link auth, no password). A new account is auto-provisioned with a $5.00 starting balance and one API key.
A real key starts with tb_live_ followed by a URL-safe random string. If the pasted value does not start with tb_live_, assume it is wrong and ask the user to re-copy it from the dashboard before making a call.
…abcd.Given a phone number the user wants to look up, do this in order:
Telebase accepts only E.164 format: a leading +, the country code, and the subscriber number — all digits, 8 to 16 characters total.
+14155551234 +442079425000 +381611234567
If the user gave you something looser, convert it yourself when you can confidently infer the country code. Do not guess the country code. If you cannot confidently produce E.164, ask the user to confirm the country before calling.
+In the query string, write the + as %2B. The raw + gets interpreted as a space by most HTTP clients and breaks the request.
GET https://telebase.fatcatremote.com/api/lookup?phone=%2B14155551234 Authorization: Bearer <the key the user gave you>
On 200 OK you get a JSON object. Read these fields in order:
active — true means reachable on the carrier network. false means not reachable. null means the carrier could not tell._meta.activeSource — "LINE_STATUS" is a strong signal; "VALID" is a fallback format-validity check, weaker. If "VALID", soften your wording: "looks reachable based on format" rather than "is active".carrier, country, numberType — present them plainly. Number type values: mobile, landline, fixedVoip, nonFixedVoip, tollFree, voicemail.simSwap is one of three values: "SWAPPED", "NO_SWAP", or "UNKNOWN"."SWAPPED", warn the user — the SIM tied to this number has been swapped and is a red flag for verification or payments. simSwapAt tells you how recent. If "UNKNOWN", say "no SIM-swap data available" — never say "no SIM swap detected". If "NO_SWAP", the carrier confirmed no swap on record.
Present results in plain language, not as raw JSON, unless the user explicitly asked for JSON.
Every error response looks like {"error": "<stable_code>"} with an HTTP status code. Match on the error code — do not try to parse free-form messages.
| Status | Code | What to do |
|---|---|---|
| 401 | missing_api_key / invalid_api_key |
Do not retry. Tell the user the key was rejected, remind them where to find the current one, and ask for a fresh copy. |
| 400 | missing_phone |
Your code did not include the phone query param. Fix and retry silently — do not tell the user, this is your bug. |
| 400 | invalid_phone_format |
The number you sent is not valid E.164. Re-normalise, or ask the user to confirm the country and full number. |
| 402 | insufficient_balance |
User has run out of funds. Response includes required and balance as integer cents — convert to dollars before quoting. Direct them to email hello@telebase.io to top up. Do not retry. |
| 422 | phone_not_found |
Format was valid but the number does not exist on any carrier's records. Tell the user and do not retry with the same number. |
| 500 | internal_error |
Transient. Retry up to 2 more times with exponential backoff (~1s, then ~3s). If all three attempts fail, surface to the user. |
| 502 | upstream_failure |
Same as 500 — retry twice with backoff, then surface to the user. |
401 or 422 and need the user's help to recover.500/502 — retry silently up to 2 times before bothering the user.active: false prominently — those are the signals users usually care about._meta.activeSource is "VALID", qualify: "Telebase could only confirm the number looks well-formed for its country, not that it is actively reachable."null, say the data is not available — do not guess.All numeric amounts in API responses are integer cents (USD). When you speak to the user, render them as dollars (e.g. 497 → "$4.97").
200 lookup costs 3 cents (US$0.03).4xx before the carrier is reached) and upstream failures (502) are not charged.https://telebase.fatcatremote.com/dashboard — the balance card is on the overview page.| Part | Name | Required | Description |
|---|---|---|---|
| Header | Authorization | Yes | Bearer <api-key>. Scheme is case-insensitive. |
| Query | phone | Yes | E.164. Leading + URL-encoded as %2B. 8–16 characters total. |
{
"phoneNumber": "+14159929960",
"active": true,
"carrier": "AT&T Wireless",
"country": "US",
"numberType": "mobile",
"simSwap": "NO_SWAP",
"simSwapAt": null,
"_meta": {
"activeSource": "LINE_STATUS"
}
}
| Field | Type | Meaning |
|---|---|---|
phoneNumber | string | The number, normalised to E.164. |
active | boolean | null | Whether the number is currently reachable on the carrier network. |
carrier | string | null | The network operator name. |
country | string | null | ISO 3166-1 alpha-2 country code. |
numberType | string | null | One of: mobile, landline, fixedVoip, nonFixedVoip, tollFree, voicemail. |
simSwap | string | null | "SWAPPED", "NO_SWAP", or "UNKNOWN". |
simSwapAt | string | null | ISO 8601 timestamp of the most recent SIM swap, if known. |
_meta.activeSource | string | "LINE_STATUS" (strong) or "VALID" (weaker format check). |
{ "error": "<stable_code>" }
# 402 also includes balance info:
{ "error": "insufficient_balance", "required": 3, "balance": 2 }
curl -s \ 'https://telebase.fatcatremote.com/api/lookup?phone=%2B14159929960' \ -H 'Authorization: Bearer tb_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'