Guide
Errors
The one shape every error takes, what to do for each status, and every code a client operation can return, with how to fix it.
A call that fails returns an HTTP status and the same JSON body every time. Branch on the status first, then on code.
The error body
code is stable and machine-readable: it never changes meaning, so build on it. message is for a person. It often says exactly what to send instead (the layers a consumer may read, the tokens left and when they renew).
An error answer never carries a key or what you sent.
{
"error": {
"code": "LAYER_NOT_SUBSCRIBED",
"message": "Not subscribed to: fsa. This subject may read: companies_house, cqc."
}
}What to do, by status
- 400: the request cannot be answered as sent. Fix it before you send it again: the message names the field.
INVALID_REQUESTmeans it does not match the contract; the others (CONDITIONS_INVALID,NARROWING_REQUIREDand more) say what the operation itself refuses. - 401: no current key. Check the key was copied whole and has not been revoked or expired.
- 402
TOKENS_EXHAUSTED: not enough tokens for what was asked, which on a stats query means itssubjectorseries. Nothing was charged and nothing was served, and everything already bought stays readable. Wait for the month to renew, or move the consumer to a larger plan. - 403: this caller may not do this: the wrong kind of caller, a layer it is not subscribed to, a suspended consumer. Sending it again will not help.
- 404: no such operation, or nothing by that id for this caller.
- 409 and 422: in conflict with what is recorded, or a query that cannot be answered as asked: too many groups (
TOO_MANY_GROUPS), past its time (STATS_TIMEOUT) or its working room (STATS_TOO_LARGE), a report too large to keep (REPORT_TOO_LARGE), or a fifty-first report (TOO_MANY_REPORTS). Change the request. - 429
RATE_LIMITED: over the plan's rate. Wait the seconds inRetry-After, then try again. - 5xx: Atlas could not complete the call. Anything the call charged is given back before the error is sent, and the statement shows it as a refund. Try again shortly, with a backoff.
503 NOT_READYclears by itself.
HTTP/1.1 429 Too Many Requests
Retry-After: 1
x-ratelimit-limit: 10
x-ratelimit-remaining: 0
x-ratelimit-reset: 1
{
"error": {
"code": "RATE_LIMITED",
"message": "Over the rate for this tier (10 a second): try again in 1s."
}
}Retrying safely
Retry a 429 after Retry-After, and a 5xx with a growing delay. Do not retry a 4xx unchanged: the same request gets the same answer.
A retry never pays twice for what it has already bought: a history paid for, or a search row already served, is not charged again. A failed call takes nothing at all.
{
"error": {
"code": "TOKENS_EXHAUSTED",
"message": "Not enough tokens: this network map costs 75, 40 left until 2026-11-01T00:00:00.000Z."
}
}Every code
Every code a client operation can return, by status. Each operation in the API reference lists the codes it can return, with an example body for each.
| Code | Status | What it means | How to fix it |
|---|---|---|---|
CONDITIONS_INVALID |
400 | A condition the catalogue refuses: unknown field, wrong operator or value. | Read GET /v1/catalogue for the layers in scope: use a field it lists, one of the operators that field takes, and a value of its type (an option it lists, for a field with options). |
EXCLUDE_TOO_LARGE |
400 | More to leave out than one search takes: see the limits on exclude. |
Leave out fewer: at most 10,000 entity ids and 20 saved searches, and 100,000 entities in all once those searches are opened. |
INTEREST_CURSOR_INVALID |
400 | A feed cursor that is not this consumer's, not one Atlas issued, or past the end of its feed. | Send back an event's id or next, as the same consumer, unchanged. Lost it? Leave it out, or read a window with from. |
INTEREST_FIELD_INVALID |
400 | A watched field the layers in scope do not send. | Use a key the layers in scope send: GET /v1/layers/{layer}/schema lists each layer's. |
INTEREST_WINDOW_INVALID |
400 | A window that ends before it starts. | Send a to later than from. |
INVALID_JSON |
400 | The request body is not valid JSON. | Send a JSON body with Content-Type: application/json. |
INVALID_REQUEST |
400 | The path, query or body does not match the contract: a field missing, of the wrong type, out of range or not allowed. The message names the part and the first field at fault. | Correct the field the message names. The reference lists every field, its type and its limits. |
LAYER_NOT_AVAILABLE |
400 | A layer that is not available to this client. | Choose from GET /v1/layers: the live layers a consumer may be subscribed to. |
LICENCE_REFUSED |
400 | A field its licence keeps out of stats: an enrichment-only layer's (the ICO's) as a condition, grouping or measure; a name, an address or a postcode as a grouping; a field about a person as a grouping or measure. | Leave the field out: an enrichment-only field is never a condition, grouping or measure, and nothing is grouped by a name, an address, a postcode or a person. |
NARROWING_REQUIRED |
400 | No narrowing field with a positive operator. | Add a condition on one of the catalogue's narrowingFields with a positive operator (equals, in, contains, a range), such as a region, a rating or a local authority. |
PACK_NOT_FOUND |
400 | No layer pack by that key. | Choose pack keys from GET /v1/pricing, which lists the layer packs. |
SCOPE_UNAVAILABLE |
400 | A scope this operation does not take, such as a saved search in a saved report. | A saved report cannot keep a savedSearch scope, as a saved search expires after 90 days: save its conditions instead. Elsewhere, send the query to POST /v1/stats. |
SEARCH_CURSOR_INVALID |
400 | A cursor that is not a saved search's page, or not this consumer's, or a filter's cursor sent with another filter or saved search: run the search again. | Send the next value from the previous page of the same search (or the same filter), as the same consumer, unchanged. To start again, leave cursor out. |
STATS_INVALID |
400 | A grouping or a measure the catalogue cannot answer: unknown field, a measure its type does not take. | Read GET /v1/catalogue: group by an area or by a field holding a choice, a yes or no, a list or text, and measure each field in a way its type takes. |
TENANT_LIMIT_REACHED |
400 | More consumers than the plan allows: the plan includes a number and lets none be added. | The plan includes a set number of consumers and lets none be added: move to a larger plan with POST /v1/plan/upgrade. |
TIER_NOT_AVAILABLE |
400 | No such plan, or one not offered to this client. | Choose a plan from GET /v1/plans: it lists the plans your account may give. |
TIER_REQUIRED |
400 | A consumer made without a plan: a plan is required. | Name a plan when you make the consumer: GET /v1/plans lists them. |
TIER_RETIRED |
400 | A plan that is retired: not given to a new consumer or a change of plan. | Choose a current plan from GET /v1/plans. |
TOKEN_CAP_ABOVE_ALLOWANCE |
400 | A consumer's token cap above its tier's monthly allowance. | Set a cap at or below the plan's monthly allowance (GET /v1/plans), or leave it out. |
TOPUP_NOT_OFFERED |
400 | The consumer's plan offers no top-ups. | Move the consumer to a plan that offers top-ups (PUT /v1/consumers/{consumerId}/tier), or raise its plan. |
VALIDATION |
400 | A value of the right form that is still not one Atlas can read, such as a date written YYYY-MM-DD that is not a real day. | Send a real value: the message names the field. |
VIA_NOT_CONNECTED |
400 | A condition's via that does not connect: the search has no level condition, its level is not the one the relation starts from (organisation for premises, premises for operator), or the field does not live where the relation leads (the catalogue's levels), or is the level itself. |
Add a positive level condition naming the type the relation starts from (organisation for premises, premises for operator), and put via only on a field that lives where the relation leads: the catalogue's levels and relations say which. |
WATCH_ENTITY_NOT_IN_LAYERS |
400 | A watched entity with no current record in the watch's layers. | Add a layer the entity has a current record in, or leave this entity out: layers on an entity read says which it has. |
WATCH_NOT_LIVE |
400 | A watch Atlas cannot answer on these layers or fields. | Watch a layer that has entities, on fields of its records, or use a search instead. |
WEBHOOK_URL_NOT_ALLOWED |
400 | A webhook address that is not https, or that reaches a private, loopback or link-local address. | Use an https address on a public host, with no user name or password in it. |
CONSUMER_KEY_EXPIRED |
401 | The consumer key has passed its expiry. | Ask the client for a new key for the consumer. |
UNAUTHENTICATED |
401 | No key, or a key Atlas does not recognise: mistyped, cut short, rotated or revoked. | Send a current key as Authorization: Bearer <key>, copied whole. The client console shows which key is active. |
TOKENS_EXHAUSTED |
402 | Not enough tokens for what was asked. Nothing is charged or served; what was already bought stays readable. | Wait for the month to renew, buy more tokens, or move to a larger plan. Nothing was charged, and what costs nothing (held entities, saved searches) can still be read. |
CLIENT_SUSPENDED |
403 | A consumer key of a suspended client. While a client is suspended none of its keys work: its client key is refused as not current (UNAUTHENTICATED). |
Talk to us: a suspension is lifted by Atlas. |
CONNECTION_NOT_ALLOWED |
403 | An assistant’s connection presented on an operation it may not make: it reads through the MCP endpoint only. | An assistant’s connection reads through the MCP endpoint only: call the API with a client or consumer key instead. |
CONSUMER_CANNOT_MANAGE |
403 | A consumer called an operation only the client itself may make. | Call with the client key and no x-atlas-consumer header: only the client manages consumers and reads the bill. |
CONSUMER_KEY_ADDRESS_NOT_ALLOWED |
403 | The consumer key is limited to addresses the call did not come from. | Call from one of the addresses listed for the key, or ask the client to make a key that allows this one. |
CONSUMER_KEYS_NOT_ALLOWED |
403 | The client does not allow consumer keys: none is made, and one presented is refused. Call with the client key and x-atlas-consumer. | Call with the client key and name the consumer in x-atlas-consumer. Consumer keys are turned on per account: GET /v1/account says which applies. |
CONSUMER_NOT_FOUND |
403, 404 | No consumer of this client has the id named in the x-atlas-consumer header or in the path. | Name one of this client's own consumers in x-atlas-consumer: GET /v1/consumers lists them. |
CONSUMER_REQUIRED |
403 | A client (no consumer) called an operation that reads data: data is read as a consumer. | Data is read as a consumer: name one of the client's consumers in x-atlas-consumer, or call with that consumer's own key. |
CONSUMER_SUSPENDED |
403 | The consumer is suspended. | Resume the consumer (PUT /v1/consumers/{consumerId} with status: "active"), as the client. |
INTEREST_LAYER_NOT_ALLOWED |
403 | A layer whose licence allows no standing search (the ICO, HM Land Registry: enrichment only), or a reference layer. | Take the enrichment-only or reference layer out of layers. Read that layer on an entity you hold instead. |
INTEREST_PERSON_FIELD |
403 | A condition or watched field about a person: never a criterion or something watched. | Take the field out: a field about a person is never a condition or watched. Atlas's people data is read through POST /v1/people for an entity you hold. |
LAYER_NOT_SUBSCRIBED |
403 | A layer in the scope the subject is not subscribed to. The message lists what it may read. | Ask only for the layers the message lists, or send layers: ["subscribed"] for them all. The client subscribes a consumer to more with PUT /v1/consumers/{consumerId}/subscriptions. |
CONNECTION_NOT_FOUND |
404 | No connection of this client with that id. | Check the id against GET /v1/connections: a connection is this client’s own. |
CONNECTION_REQUEST_NOT_FOUND |
404 | No sign-in request with that id, or one already decided or lapsed. | Have the assistant start its sign-in again: a request is decided once and lapses after ten minutes. |
INTEREST_NOT_FOUND |
404 | No such interest of this consumer. | Use an id from GET /v1/interests for the same consumer. |
LINK_NOT_FOUND |
404 | No such link, or one that is no longer shown. | Use a linkId from a current possible match. One staff found wrong or suppressed is no longer shown and cannot be flagged. |
NOT_FOUND |
404 | Nothing to answer at this address: no such operation, or no such entity, consumer, key or other resource for this caller. | Check the path starts with /v1 and the id is one Atlas gave you. An entity id answers for good, so an old id is never the cause. |
REPORT_NOT_FOUND |
404 | A report that is not this consumer's, never was, or was deleted. | Use an id from GET /v1/reports for the same consumer: a deleted report, or another consumer's, is not found. |
SAVED_SEARCH_NOT_FOUND |
404 | A saved search that is not this consumer's, never was, or has expired (kept 90 days). | Use an id from GET /v1/searches for the same consumer. A saved search is kept 90 days: run the search again for a new one. |
WATCH_ENTITY_NOT_FOUND |
404 | A watched entity Atlas has never issued. | Use an id Atlas has answered with: from a search, a resolve or an entity read. |
WEBHOOK_NOT_FOUND |
404 | The consumer has no webhook. | Register one with POST /v1/interests/webhook. |
BILLING_NOT_SET_UP |
409 | Billing is not set up for the client: no billing email yet. | Set a billing email with PUT /v1/billing/account first. |
INTEREST_LIMIT_REACHED |
409 | The consumer has 50 interests already: delete one first. | Delete an interest you no longer need with DELETE /v1/interests/{interestId}, then make this one. |
LINK_ALREADY_REVIEWED |
409 | A "same" flag on a match already confirmed. | Nothing to do: staff have already confirmed the match. Flag it not_same if you believe it is wrong. |
WEBHOOK_PAUSED |
409 | A redelivery while the webhook is paused: register it again first. | Register the webhook again (POST /v1/interests/webhook), then ask for the window. The address must answer 2xx within 10 seconds. |
PAYLOAD_TOO_LARGE |
413 | The request body is over 8 MB. | Send less in one call: every list in a body has its own, much smaller, limit. |
NO_AREA |
422 | A scope's entity has no value for the area asked for (near), so it has no area to measure. |
Choose another area, or another entity: this one has no value for the area asked for. |
REPORT_TOO_LARGE |
422 | The query's answer could be too large to keep: ask for fewer groups or fewer distributions. | Ask for a lower limit, fewer distributions or no series, and save it again. |
STATS_TIMEOUT |
422 | The query ran past its time limit (10 seconds): narrow it, or ask for fewer measures. | Narrow the conditions, or ask for fewer measures, and run it again. |
STATS_TOO_LARGE |
422 | The query is too large to answer: narrow it, or ask for fewer measures. | Narrow the conditions, or ask for fewer measures, and run it again. |
TOO_BROAD |
422 | The search covers too much of a register, or ran out of time. | Narrow the search with another condition, or a tighter one, and run it again. POST /v1/search/count says how many a search would find, free. |
TOO_MANY_REPORTS |
422 | This consumer keeps 50 reports already: delete one first. | Delete a report you no longer need (DELETE /v1/reports/{reportId}), then save again. |
RATE_LIMITED |
429 | Over the tier's rate. | Wait the number of seconds in Retry-After, then try again. Spread calls out: x-ratelimit-remaining says how many are left. |
CONTRACT_MISMATCH |
500 | Atlas could not form a valid answer, so none was sent. Anything the call charged is given back. | Nothing on your side: tell us the time of the call and the operation. |
INTERNAL |
500 | Atlas could not answer. Anything the call charged is given back before the error is sent. | Try again shortly. If it persists, tell us the time of the call and the operation. |
TOO_MANY_GROUPS |
500, 422 | The groupings would make more groups than one query may: group more coarsely, or narrow. | Group more coarsely (a region rather than a local authority), or narrow the conditions. |
NOT_IMPLEMENTED |
501 | The operation is not available. | Do not call it. |
GEOGRAPHY_UNAVAILABLE |
503 | This area (ward, icb or country) is not available at the moment: group or scope by region or localAuthority. | Group or scope by region or localAuthority instead. |
NOT_CONFIGURED |
503 | This part of Atlas is not set up here: charging, where no payment provider is connected. | Talk to us. |
NOT_READY |
503 | Atlas has no data to answer from at the moment. | Try again shortly. |
VIA_UNAVAILABLE |
503 | A search with via cannot be answered at the moment; a search without via is unaffected. |
Run the search without via, or try again after the next release. |