> 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/reseller-hub/api/v2/errors.md). Agents can also search and read this documentation through its [MCP server](https://docs.rtkdata.com/~gitbook/mcp).

# API v2 Error Catalogue: Every Code and What to Do

Every API v2 error code with its HTTP status, what it means, whether it uses up your Idempotency-Key and what to do.

Every refusal of [API v2](https://docs.rtkdata.com/reseller-hub/api/v2.md) has the same body: a `code` with exactly one HTTP status, a readable `message`, the `requestId` to quote to support and a `docUrl` pointing at this page. 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/api/v2/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 device's client id and secret do not match a device that is still claimed. Uses up the key: no.

## 402 Payment required

### account\_past\_due

Your account is behind on a bill far enough that this purchase is refused: new licenses and trials first, later conversions, extensions and seats. Everything else keeps working. `GET /v2/account/capabilities` says what is allowed right now. 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 a live resource: the team (`POST /v2/members/invites`, `PATCH /v2/members/{id}`) or the notification settings. 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 a portal 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 license of yours with this id in this environment. A license that runs on another caster than RTKdata's own is not visible in v2 either.

### customer\_not\_found

No customer of yours with this id. On the list, `?reference=` finds a customer by your own reference.

### 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.

### bill\_not\_found

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

### api\_key\_not\_found

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

### 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.

### extension\_request\_not\_found

No extension request of yours with this id.

### device\_not\_found

No device 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 (another body, route or license). 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`), the same keyed call is still running, or another call of yours for the same customer has to finish first. Wait for `Retry-After` 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.

### trial\_already\_used

An identifier of this customer (the reference, an email address it ever had, or the `entitlementKey`) already had a trial. Each end customer gets one trial. Sell a paid license instead. Uses up the key: yes.

### username\_taken

The `credentials.username` you chose on `POST /v2/licenses` is already in use. Pick another, 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 license's status: extending a trial, converting a paid license, adding seats to an expired one, suspending an ended one, and so on. The `message` says why, the [status table](https://docs.rtkdata.com/reseller-hub/api/v2.md#statuses) says what applies instead. Also answered for a customer that cannot be archived or deleted in its state, and for an extension request on a license that is not a running trial. Uses up the key: yes.

### reinstate\_required

A `convert` or `extend` 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. It clears when the access on that license is paid for; contact support if that is not the case. Uses up the key: yes.

### claim\_code\_used

The claim code was already spent by another device. Uses up the key: no.

### slots\_full

Every slot of the license is held by a device. Release one with `PATCH /v2/licenses/{id}/slots/{slotId}`, or buy seats. 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 a customer create whose email another active customer holds. Uses up the key: no.

## 410 Gone

### license\_removed

The license passed its reinstatement deadline and is `removed`. A returning customer gets a new license with new credentials. 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.

### login\_link\_cooldown

`POST /v2/customers/{id}/portal-invites` within the customer's cooldown: one login link per customer per five minutes, whoever asked for it. `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 credentials remain, 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.

### 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/reseller-hub/api/v2/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.
