Verification API Errors: What Each Code Means and What to Do

When a TalismanLeads API call fails, the answer always has the same JSON shape, with an error code that never changes. Act on that code, not on the HTTP status alone and never on the message. Every code leads to one of five actions: fix the request, top up, wait and repeat with the same Idempotency-Key, order again with a new key, or contact support with the request id. Below are all 33 codes the API sends, grouped by status, then a decision table, a small handler in Python and Node.js, and what to log.
The error envelope#
Every refusal looks like this (an example):
{
"error": {
"code": "insufficient_balance",
"message": "Your balance is too low for this order. Top up, then repeat it with the same Idempotency-Key.",
"request_id": "req_3c8f1a9d2b7e4f60a1c5d8e9b2f47a10",
"docs_url": "https://docs.talismanleads.io/errors#insufficient_balance"
}
}codeis never renamed. Branch on it. New codes may be added, so decide an unknown one by its HTTP status.messageis for a person, always in English, and its wording may change. Log it; never parse it.request_idisreq_and 32 hex characters. Every answer, successful ones included, also carries it in aRequest-Idheader. Quote it to support.docs_urllinks to the code on the API documentation's Errors page.
The API's own refusals are always JSON, never an HTML page: an unknown address gets a 404 not_found envelope, a crash a 500 internal_error. An answer with no envelope at all (a network timeout, a gateway's 502 or 504 on a long order) may never have reached us. Treat it as an unknown outcome and repeat the same request.
Every error code, grouped by status#
No 4xx answer places an order or charges anything. One rule runs through the 400s: on POST /v1/orders, a request that got as far as reading your list has tied its Idempotency-Key to that exact request. Send the corrected list under the old key and you get idempotency_conflict. So after fixing a 400, order with a new key.
400: fix the request#
invalid_request: The API cannot read the request: the body is not JSON, the checker is missing or not inGET /v1/checkers, you sent bothentriesandupload_id(or neither),countryis not two letters,expected_chargeis not a dollar string such as"18.00", or alimitorcursoris bad. The message says which.idempotency_key_required:POST /v1/ordersneeds anIdempotency-Keyheader of 1 to 200 visible ASCII characters, no spaces. A UUID works.invalid_entries: The list is empty, or a line is not what the checker takes (inline entries are single lines of up to 320 characters). For phones, see the E.164 format.too_few_entries: The checker needs more entries per file;GET /v1/checkersgives itsminimum_entries.too_many_entries: Over 100,000 entries inline (usePOST /v1/uploads) or 10,000,000 in a file (split it).file_too_large: Over 200 MB. Split it.country_mismatch: Thecountryyou sent disagrees with most of the numbers.mixed_countries: A file holds one country's numbers. Split the list by country.upload_not_found: The upload is not yours, has not finished uploading, or is gone (uploads wait 24 hours). If you already ordered from it and lost the answer, repeat that order with its original key. Otherwise upload again and order with a new key.upload_changed: The file changed after it was priced. Nothing was placed. Upload again; new key.quote_expired: The order's price is too old. The API re-prices by itself, so this is rare. If you see it, repeat with the same key.
401: fix the key#
invalid_key: Missing, malformed or unknown. SendAuthorization: Bearer tl_live_...or anX-API-Keyheader. Do not loop: after too many wrong-key calls from one address in a minute, those calls get429 rate_limited.revoked_key: Revoked. Use another key.expired_key: Past its date (only keys made before November 8, 2026 expire). Make a new key and revoke the old one; see API Key Security: Creating, Storing and Rotating Your Keys.
402: top up#
insufficient_balance: Your balance is too low for this order. See the next section.
403: change the setup, or contact support#
missing_scope: The key is read only, and uploads, estimates and orders need more. Only keys made before November 8, 2026 can be read only. Make a new key.ip_not_allowed: The key is held to other IP addresses (older keys only). Call from an allowed address, or make a new key.checker_not_open: This checker is not open to your account right now, for example while paused. SeeGET /v1/checkers.key_blocked,account_blocked: Blocked. Contact support with the request id.api_access_off: API access is off for this account alone; the website still works. Contact support.access_denied: Your server's IP address is blocked. Contact support.
404, 409 and 413#
not_found(404): No such endpoint, or no such order on this account. Check the base addresshttps://api.talismanleads.io/v1and theord_...id.idempotency_conflict(409): The key was used with a different request. Unless you just corrected a 400, two orders are sharing a key: a bug. One new key per order.price_changed(409): The price differs from yourexpected_charge, or changed since the key was first sent. Nothing was placed. Estimate again, decide, and order with a new key.payload_too_large(413): The body is over 4 MB. UsePOST /v1/uploads.
429: wait#
rate_limited: Over a request limit. Wait the seconds inRetry-After, then repeat, with the same key on an order. Backing off properly is covered in API Rate Limits and 429 Errors: Backing Off With Retry-After.too_many_open_orders: Too many unfinished order parts. Wait theRetry-After(60 seconds), then repeat with the same key.too_many_uploads: Too many uploads waiting (20 files or 100 MB) or 500 made today. NoRetry-After: order from an upload you have, or try later.
500 and 503: repeat with the same key#
internal_error: Something failed on our side. On an order it may have gone through, so repeat with the same key: it never charges twice. Elsewhere, try again, and contact support with the request id if it continues.service_unavailable: The API cannot check your key, account or limits right now, so it refuses rather than guess. Wait a minute; same key.api_disabled: The API is switched off for everyone for now. Try later; same key.order_status_unknown: We could not confirm the order. Repeat with the same key to learn its true state. Still there after a few minutes? Contact support with the request id. A new key here would be a second order.
402 insufficient_balance: top up, then repeat with the same key#
HTTP itself only says 402 is "reserved for future use" (RFC 9110, section 15.5.3), so each API gives it a meaning. Here it means one thing: the order costs more than your balance plus any trial credit that can pay for this file. Only POST /v1/orders sends it; an estimate prices a list without looking at your balance.
Waiting will not fix a 402, so keep it out of your retry loop: stop the job and tell a person. Once the account is topped up (from $5; credits never expire), send the same request with the same Idempotency-Key. Nothing was placed the first time, so the order is placed now, once, at the price first quoted under that key. If the price changed in between, you get price_changed and order with a new key.
Most 402s can be caught first. GET /v1/account returns your balance; an estimate returns the charge and the trial_amount trial credit would pay. If balance plus trial_amount is below charge, top up before ordering. The full flow is in Quote, Order, Follow: How an Asynchronous Verification Job Works.
Retry or not: the decision table#
- Same request, same key, after a pause:
rate_limited,too_many_open_orders,internal_error,service_unavailable,api_disabled,order_status_unknown,quote_expired, and answers with no envelope. - Same key after you act:
insufficient_balance, once topped up. - New key after you change something: the other 400s,
price_changed,idempotency_conflict. - No retry until a person fixes it: the 401s and 403s,
not_found,payload_too_large,too_many_uploads.
Never make a new key because a request failed or timed out; only a new order gets one. Why, and how to store keys, is in Idempotency Keys: How to Retry an API Request Without Paying Twice.
A small error handler in Python and Node.js#
The function reads a failed answer, logs it, and returns the action and how long to wait. Your request loop repeats the request only for retry_same_key, with a cap on attempts.
import logging
log = logging.getLogger("talismanleads")
RETRY_SAME_KEY = {"rate_limited", "too_many_open_orders", "internal_error",
"service_unavailable", "api_disabled", "order_status_unknown",
"quote_expired"}
NEW_KEY = {"price_changed", "idempotency_conflict", "upload_changed"}
SUPPORT = {"key_blocked", "account_blocked", "api_access_off", "access_denied"}
def next_step(response, idempotency_key=None):
"""Return (action, seconds to wait) for a failed requests.Response."""
try:
error = response.json()["error"]
except (ValueError, KeyError, TypeError):
error = {} # no envelope: a gateway or network failure
code = error.get("code")
log.warning("TalismanLeads API %s %s request_id=%s key=%s: %s",
response.status_code, code,
error.get("request_id") or response.headers.get("Request-Id"),
idempotency_key, error.get("message"))
wait = response.headers.get("Retry-After", "")
wait = int(wait) if wait.isdigit() else 60
if code == "insufficient_balance":
return "top_up_then_retry_same_key", None
if code in NEW_KEY:
return "new_key", None
if code in SUPPORT:
return "contact_support", None
if code is None or code in RETRY_SAME_KEY or response.status_code >= 500 \
or (response.status_code == 429 and code != "too_many_uploads"):
return "retry_same_key", wait
return "fix_request", None # other 400s, 401s, 403s, 404, 413The same for Node.js 18 or later and a fetch response:
const RETRY_SAME_KEY = new Set(["rate_limited", "too_many_open_orders", "internal_error",
"service_unavailable", "api_disabled", "order_status_unknown", "quote_expired"]);
const NEW_KEY = new Set(["price_changed", "idempotency_conflict", "upload_changed"]);
const SUPPORT = new Set(["key_blocked", "account_blocked", "api_access_off", "access_denied"]);
// Returns { action, wait } for a failed answer. Reads the body, so call it once.
export async function nextStep(response, idempotencyKey = null) {
const body = await response.json().catch(() => null); // no envelope: gateway or network
const error = body?.error ?? {};
const code = error.code ?? null;
const requestId = error.request_id ?? response.headers.get("Request-Id");
console.warn(`TalismanLeads API ${response.status} ${code} request_id=${requestId} key=${idempotencyKey}: ${error.message}`);
const wait = Number(response.headers.get("Retry-After")) || 60;
if (code === "insufficient_balance") return { action: "top_up_then_retry_same_key", wait: null };
if (NEW_KEY.has(code)) return { action: "new_key", wait: null };
if (SUPPORT.has(code)) return { action: "contact_support", wait: null };
if (code === null || RETRY_SAME_KEY.has(code) || response.status >= 500 ||
(response.status === 429 && code !== "too_many_uploads")) {
return { action: "retry_same_key", wait };
}
return { action: "fix_request", wait: null }; // other 400s, 401s, 403s, 404, 413
}An unknown code falls back to its status: a 5xx or 429 is repeated, anything else waits for a person. upload_not_found goes to fix_request on purpose: only your own records know whether you already ordered from that upload. A network error with no response at all (a requests timeout, an AbortError in Node) takes the retry_same_key path. A full request loop is in Bulk Phone Number Lookup API: Python, Node.js and cURL Guide.
What to log#
One line per failed call, and the request id of every order, failed or not:
- The request id, from the body or the
Request-Idheader. Our side records each call's request id, endpoint, status, error code, duration and order id, never its body or your list, so the request id is how support finds your call. - Status, code, message, method and endpoint.
- Your Idempotency-Key, your own job reference and the
ord_...id once you have it, so a repeat can be matched to its first attempt. - The attempt number and
Retry-After, to spot a retry storm early. - Never the API key, and never the entries. Customers' phone numbers and emails do not belong in an error log.
Alert a person, not just the log, on insufficient_balance, any 401 or 403, idempotency_conflict (a key bug) and an order_status_unknown that lasts more than a few minutes.
Frequently asked questions#
What does a 402 insufficient_balance error mean on a verification API?#
On the TalismanLeads API, the order costs more than your balance plus usable trial credit. Nothing was placed or charged. Top up, then send the same request with the same Idempotency-Key.
Should I retry a 400 error?#
Not unchanged: the same request would fail again. Fix it, and send a corrected order with a new Idempotency-Key.
Why did I get idempotency_conflict when I retried?#
The key was first sent with a different request body: you corrected a refused order and kept its key, or two orders share a key. Use a new key for each distinct order.
Is it safe to retry a 500 or 503 on an order?#
Yes, with the same Idempotency-Key. The API places an order once per key, so a repeat returns the order if an earlier attempt placed it, and otherwise tries to place it now, once.
Where do I find the request id?#
In the request_id field of every error and the Request-Id header of every answer. Quote it when you contact support.
Every code is also on the API documentation's Errors page, which each error's docs_url links to.
Was this helpful?


