# Errors

> Every error code the Naruska CRM API returns, what it means and what to do.

Every error from the API is a problem details object (RFC 9457) with the content type `application/problem+json`. The `code` is stable: build on it, not on the wording.

```json
{
  "type": "https://docs.naruskacrm.com/errors/quota_exceeded",
  "title": "Monthly limit reached",
  "status": 429,
  "code": "quota_exceeded",
  "detail": "The monthly api.requests limit of 25000 is used up. It resets at 2026-12-01T00:00:00Z; an admin can check usage.",
  "metric": "api.requests",
  "limit": 25000,
  "reset": "2026-12-01T00:00:00Z"
}
```

- `type` links to the code's page here. It always names the public docs address, whichever environment answered.
- `detail` explains this occurrence in English. Some codes add fields of their own, listed on their page.
- A `429` or `503` can be retried: wait for `Retry-After` when it is sent. A `4xx` other than `429` won't succeed unchanged.
- The service-account token endpoint (`POST /oauth/token`) answers in the OAuth format instead (RFC 6749: `error` and `error_description`).

## Codes

| Code | Status | Meaning |
| --- | --- | --- |
| [`already_invited`](/errors/already_invited.md) | 409 | Already invited |
| [`already_member`](/errors/already_member.md) | 409 | Already a user |
| [`cap_reached`](/errors/cap_reached.md) | 429 | Plan limit reached |
| [`category_in_use`](/errors/category_in_use.md) | 409 | Category in use |
| [`category_required`](/errors/category_required.md) | 409 | Category required |
| [`conflict`](/errors/conflict.md) | 409 | Conflict |
| [`default_required`](/errors/default_required.md) | 409 | Default required |
| [`endpoint_not_active`](/errors/endpoint_not_active.md) | 409 | Endpoint not active |
| [`file_too_large`](/errors/file_too_large.md) | 413 | File too large |
| [`forbidden`](/errors/forbidden.md) | 403 | Forbidden |
| [`has_opportunities`](/errors/has_opportunities.md) | 409 | Opportunities still there |
| [`idempotency_key_reused`](/errors/idempotency_key_reused.md) | 422 | Idempotency key reused |
| [`insufficient_scope`](/errors/insufficient_scope.md) | 403 | Insufficient scope |
| [`internal_error`](/errors/internal_error.md) | 500 | Internal error |
| [`invalid_file_url`](/errors/invalid_file_url.md) | 422 | File URL not allowed |
| [`invalid_option`](/errors/invalid_option.md) | 422 | Invalid option |
| [`invalid_reference`](/errors/invalid_reference.md) | 422 | Invalid reference |
| [`invalid_state`](/errors/invalid_state.md) | 409 | Invalid state |
| [`invalid_token`](/errors/invalid_token.md) | 401 | Invalid token |
| [`invalid_webhook_url`](/errors/invalid_webhook_url.md) | 422 | Webhook URL refused |
| [`last_admin`](/errors/last_admin.md) | 409 | Last admin |
| [`last_link`](/errors/last_link.md) | 409 | Last link |
| [`length_required`](/errors/length_required.md) | 411 | Length required |
| [`no_active_company`](/errors/no_active_company.md) | 403 | No active company |
| [`not_a_file`](/errors/not_a_file.md) | 409 | Not a file |
| [`not_found`](/errors/not_found.md) | 404 | Not found |
| [`not_redeliverable`](/errors/not_redeliverable.md) | 409 | Not redeliverable |
| [`nothing_to_undo`](/errors/nothing_to_undo.md) | 404 | Nothing to undo |
| [`quota_exceeded`](/errors/quota_exceeded.md) | 429 | Monthly limit reached |
| [`rate_limited`](/errors/rate_limited.md) | 429 | Too many requests |
| [`required_field`](/errors/required_field.md) | 422 | Required field missing |
| [`self_deactivation`](/errors/self_deactivation.md) | 409 | Can't deactivate yourself |
| [`session_required`](/errors/session_required.md) | 403 | Signed-in session required |
| [`timeout`](/errors/timeout.md) | 503 | Timed out |
| [`token_expired`](/errors/token_expired.md) | 401 | Link expired |
| [`token_revoked`](/errors/token_revoked.md) | 401 | Token revoked |
| [`too_many`](/errors/too_many.md) | 422 | Too many contacts |
| [`unauthenticated`](/errors/unauthenticated.md) | 401 | Authentication required |
| [`undo_conflict`](/errors/undo_conflict.md) | 409 | Later changes block the undo |
| [`undo_merge`](/errors/undo_merge.md) | 409 | Merges cannot be undone |
| [`undo_not_supported`](/errors/undo_not_supported.md) | 422 | Cannot be undone |
| [`undo_window_expired`](/errors/undo_window_expired.md) | 409 | Too old to undo |
| [`upload_incomplete`](/errors/upload_incomplete.md) | 422 | Upload incomplete |
| [`upload_not_in_plan`](/errors/upload_not_in_plan.md) | 403 | Not in your plan |
| [`usage_unavailable`](/errors/usage_unavailable.md) | 503 | Usage unavailable |
| [`user_deactivated`](/errors/user_deactivated.md) | 401 | User deactivated |
| [`validation_failed`](/errors/validation_failed.md) | 422 | Validation failed |
