> For the complete documentation index, see [llms.txt](https://docs.rtkdata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rtkdata.com/enterprise-portal/api/api-guide/api-errors.md). Agents can also search and read this documentation through its [MCP server](https://docs.rtkdata.com/~gitbook/mcp).

# Enterprise API v2 Error Catalogue: Every Code

Every API v2 error an Enterprise account can receive, with its HTTP status, whether it uses up your Idempotency-Key and what to do.

Every refusal of the [Enterprise API](https://docs.rtkdata.com/enterprise-portal/api/api-guide.md) has the same body: a `code` with exactly one HTTP status, a readable `message`, the `requestId` to quote to support and a `docUrl`. A `422` also lists the invalid `fields`.

```json
{
  "code": "validation_failed",
  "message": "Send exactly one of months, days or expiresAt",
  "requestId": "req_01J9W6H4K3M2N1P0QRSTUVWXYZ",
  "docUrl": "https://docs.rtkdata.com/enterprise-portal/api/api-guide/api-errors#validation_failed",
  "fields": [{ "path": "months", "code": "custom", "message": "Send exactly one of months, days or expiresAt" }]
}
```

Decide what to do from the `code`, never from the `message`. **Uses up the key** says whether a keyed call that ended in this refusal has spent its `Idempotency-Key`: if yes, the same answer is replayed and a different action needs a new key; if no, send the identical request again once you fixed it or the condition cleared. Some refusals carry `Retry-After` in seconds.

***

## 400 Bad request

### invalid\_request

Malformed JSON, a missing required header such as `Idempotency-Key`, or a request the server could not read. Uses up the key: no.

## 401 Missing or invalid key

### invalid\_api\_key

No bearer token, or a key that is unknown, revoked or expired. Both environments answer this, so a test key sent to a live id looks the same as a typo. Uses up the key: no.

### invalid\_client

`POST /v2/oauth/token`: the client id and secret do not match hardware that is still claimed. Uses up the key: no.

## 402 Payment required

### account\_past\_due

Your account is far enough behind on a bill that this purchase is refused. Everything else keeps working. `GET /v2/account/capabilities` says what is allowed right now, [Billing](https://docs.rtkdata.com/enterprise-portal/billing.md) explains the stages. Settle the bill; the identical request succeeds once your standing is restored. Uses up the key: no.

## 403 Not allowed

### insufficient\_scope

The key lacks the scope this call needs. Create a key with the scope, or add it with `PATCH /v2/api-keys/{id}` from a key that holds `keys:manage` and the scope itself. Uses up the key: no.

### api\_disabled

The API is switched off for your account. Contact <support@rtkdata.com>. Uses up the key: no.

### test\_only

A sandbox helper under `/v2/test/*` was called with a live key. Uses up the key: no.

### live\_only

A test key tried to change something that exists only live: the team, the notification settings, or a profile change request. A test key may read them. Uses up the key: no.

### ip\_not\_allowed

The key carries an IP allowlist and the call came from outside it. The refusal shows under **Needs attention** in the portal. Uses up the key: no.

### forbidden

A refusal that fits no other code, for example an account that is read only. Uses up the key: no.

## 404 Not found

An unknown id, an id of another account, or an id from the other environment: the API does not tell these apart. Uses up the key: no, for every code in this group.

### license\_not\_found

No device or fleet of yours with this id in this environment.

### contingent\_not\_found

No stream contingent of yours with this id.

### product\_not\_found

No product of your account with this id. `GET /v2/account/products` lists them.

### tag\_not\_found

No tag with this id in the key's environment.

### bulk\_operation\_not\_found

No bulk order of yours with this id.

### bill\_not\_found

No bill with this id. A test key has no bills and answers this for every id.

### sales\_quote\_not\_found

No quote from RTKdata with this id on your account.

### ticket\_not\_found

No support ticket of yours with this id.

### document\_not\_found

No document shared with your account under this id.

### profile\_change\_request\_not\_found

No profile change request of yours with this id.

### event\_not\_found

No event with this id in your feed.

### webhook\_not\_found

No webhook endpoint with this id in the key's environment.

### delivery\_not\_found

No delivery with this id on that endpoint.

### api\_key\_not\_found

No key with this id in the calling key's environment.

### api\_request\_not\_found

No call with this id in your request log.

### session\_not\_found

No session of yours with this id within the window the caster is asked for.

### notification\_not\_found

No notification with this id in your inbox. A test key's inbox is empty.

### member\_not\_found

No member, joined or invited, with this id.

### device\_not\_found

No claimed hardware of yours with this id.

### slot\_not\_found

The license has no slot with this id.

### claim\_code\_not\_found

The claim code is unknown, expired or was replaced by a newer one; the API does not tell these apart. Mint a new one with `POST /v2/licenses/{id}/claim-code`.

### not\_found

A resource that fits no other code was not found.

## 409 Conflict

### idempotency\_key\_reused

The same `Idempotency-Key` was already used for a different request. The key stays with the request that used it first. Send the new request under a new key. Uses up the key: not applicable.

### idempotency\_key\_legacy

The key was used before your account moved to the current platform and cannot be replayed. Read the license; if the action is still needed, send it under a new key. Uses up the key: no.

### operation\_in\_progress

Another change to this license is still running or unresolved (the license shows it as `pendingOperation`), or the same keyed call is still running. Wait for `Retry-After` and repeat the identical request. Uses up the key: no.

### not\_available\_for\_account

The call does not apply to an Enterprise account, or your contract rules it out: starting a trial yourself, a credential type your account may not hold, buying outside your agreed products, or a route about customer records. `GET /v2/account/capabilities` tells your software up front what is possible. Uses up the key: no.

### setup\_incomplete

Your account has not finished its setup in the portal yet, so purchases are refused. `GET /v2/account/setup` says what is missing. Finish it in the portal and repeat the identical request. Uses up the key: no.

### billing\_limit\_reached

Live purchases only: your purchases not yet on a bill, together with this one, would exceed what one bill can carry. Nothing was changed; the identical request succeeds after your next bill. Uses up the key: no.

### username\_taken

The `credentials.username` you chose is already in use. Pick another, ask `GET /v2/licenses/next-username` for a free one, or omit `credentials` to get a generated login. Uses up the key: yes.

### member\_already\_exists

The address already has a membership or an open invite. Uses up the key: yes.

### invalid\_state

The call does not apply in the current state: extending a license that cannot be extended, unarchiving a fleet with no streams, moving more streams than a fleet holds, suspending an ended login, and so on. The `message` says why, the [status table](https://docs.rtkdata.com/enterprise-portal/api/api-guide.md#statuses) says what applies instead. Uses up the key: yes.

### reinstate\_required

A purchase on a license you ended, without `reinstate: true`. Decide whether the license should come back; if so, send the purchase again with `reinstate: true` under a new key. Uses up the key: yes.

### hold\_by\_rtkdata

You tried to reactivate a license that only RTKdata's hold keeps suspended. Only RTKdata clears it; contact support. Uses up the key: yes.

### tag\_name\_taken

A tag with this name exists already; names are compared regardless of case and spacing. Pick another name and send it under a new key. Uses up the key: yes.

### tag\_limit\_reached

The environment already has 200 tags. Delete one you no longer use. Uses up the key: no.

### claim\_code\_used

The claim code was already spent by other hardware. Uses up the key: no.

### slots\_full

Every slot of the license is taken. Release one with `PATCH /v2/licenses/{id}/slots/{slotId}`, or give the fleet more streams. Uses up the key: no.

### pdf\_not\_ready

The bill's PDF is still being rendered. Try again in a moment. Uses up the key: no.

### conflict

A conflict that fits no other code, for example asking about a bill that already has an open inquiry. Uses up the key: no.

## 410 Gone

### license\_removed

The license passed its reinstatement deadline and is `removed`. Create a new device or fleet, it gets a new login. Uses up the key: yes.

### cursor\_expired

The list cursor has expired. Start the list again without a cursor. Uses up the key: no.

### event\_history\_expired

Your feed position is older than the 90 days of events we keep. The body carries `resumeAfterPosition`; resume from there and reconcile what you missed from the read endpoints. Uses up the key: no.

## 422 Invalid fields

### validation\_failed

A field is invalid, unknown or out of range, or two fields that exclude each other were sent. `fields` lists each problem with its `path`. Fix the request and send it again. Uses up the key: no.

## 429 Too many requests

### rate\_limited

The key's sliding window is used up (60 requests per minute unless the key has a higher tier). Wait for `Retry-After`; `RateLimit-Remaining` and `RateLimit-Reset` on every answer let you stay below the limit. Uses up the key: no.

### invite\_cooldown

`POST /v2/members/{id}/resend` within a minute of the last send. `Retry-After` says when the next one can go. Uses up the key: no.

## 500 Server error

### internal\_error

Something failed on our side. Retry with the same key after a short pause; if it persists, contact support with the `requestId`. Uses up the key: no.

## 502 Upstream error

### provisioning\_failed

A create conclusively failed at the caster: no usable login remains, nothing was bought or billed, and the license reads `failed`. The body carries `licenseId` and `operationId`. Make a new create with a new key. Uses up the key: yes.

## 503 Unavailable

### outcome\_unknown

The result of your call could not be confirmed yet. The call is still open: repeat the identical request with the same key until it answers. Uses up the key: no.

### caster\_unavailable

The caster could not be reached, nothing was changed. Wait for `Retry-After` and repeat the identical request. Uses up the key: no.

### stripe\_unavailable

A quote's document or a renewal quote could not be read from the payment provider. Try again in a moment. Uses up the key: no.

### coverage\_unavailable

`GET /v2/coverage` before the coverage map could be loaded. An unknown answer is never "not covered"; try again. Uses up the key: no.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rtkdata.com/enterprise-portal/api/api-guide/api-errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
