> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlurk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Every error has a status, a code and a sentence you can show.

| Status | Code | Means | What to do |
| - | - | - | - |
| 400 | `invalid_json` | The body isn't valid JSON. | Send a valid JSON body with the header `content-type: application/json`. |
| 401 | `invalid_key` | The credential is missing or was refused. | Check the key or sign-in with an owner or admin, who can manage project API keys under API keys and agent keys under Agents for the selected project. |
| 403 | `forbidden` | This credential can't call that endpoint. | This key or person is not allowed to do this. Use one with the right role, or ask an owner or admin; do not retry as it is. |
| 403 | `approval_required` | This needs a person, like going live. | A person has to approve this in the dashboard (an owner or admin). Do not retry and do not try to get around it: ask them. |
| 404 | `not_found` | No user, rule or view with that ID. | Check the ID or key, and that you are in the right project. Each project is separate. |
| 409 | `idempotency_conflict` | Same idempotency key, different body. | You used an idempotency key with a different request. Use a new key for a new request; reuse a key only to retry the same one. |
| 409 | `conflict` | The request names something that cannot take it now, such as a person merged into another (the message names the person kept). Nothing was changed. | Nothing was changed. The thing it names is in a state that does not allow this (such as a person merged into another). Do what the message says, then send it again. |
| 409 | `unblock_clock_reversed` | The project clock is before the person's block started. The block stays in place. | Try again in a moment, or advance the clock if this is a staging project. |
| 409 | `insufficient_balance` | A spend is for more than the person holds. Nothing was taken. | Nothing was changed. Check what the person holds and the unit's lowest balance, then send a smaller amount. |
| 409 | `reference_used` | A spend reused a `reference` already used on that unit. Nothing was taken. | That reference was already used, so this was probably done before. Use a new reference for a new thing; do not retry this one. |
| 422 | `validation_failed` | A field is invalid; `param` names it. | Nothing was changed. Fix what the message says is wrong (the field is named in `param` when there is one) and send the request again. |
| 429 | `rate_limited` | Too many requests; see `Retry-After`. | Wait for the `Retry-After` time, then retry with the same idempotency key. Spread requests out if this keeps happening. |
| 500 | `internal` | Something went wrong on our side. | Retry with the same idempotency key. If it keeps failing, contact support with the `request_id`. |
| 503 | `unavailable` | This isn't set up on this server yet. Try later or ask us. | This is not available right now (or not set up on this server yet). Retry in a moment with the same idempotency key, and ask us if it stays unavailable. |

```json theme={null}
{
  "error": {
    "status": 422,
    "code": "validation_failed",
    "message": "Lowercase words joined by dots, thing first: checkin.scanned",
    "param": "event",
    "next_step": "Nothing was changed. Fix what the message says is wrong (the field is named in `param` when there is one) and send the request again.",
    "request_id": "req_…",
    "doc_url": "https://docs.getlurk.com/errors#validation_failed"
  }
}
```

Every error also carries a `next_step`: one sentence on what to do about that kind of error, the same as the last column above. The SDKs expose it as `nextStep` (TypeScript) and `next_step` (Python), with `isRetryable` / `is_retryable` for whether sending the same request again, with the same idempotency key, can work.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.