---
title: "Machine-readable error registry — every wire-reachable error_code with retryable, bilingual fix hints, docs_url and category"
method: GET
path: "/api/v1/errors"
tags: ["Discovery"]
---

# Machine-readable error registry — every wire-reachable error_code with retryable, bilingual fix hints, docs_url and category

`GET /api/v1/errors`

## Request

- Base URL: `https://www.apier.no`
- URL: `https://www.apier.no/api/v1/errors`
- Auth: none required

Public, zero-auth error registry — call this ONCE at startup to load a complete recovery policy, instead of discovering the error vocabulary one failure at a time. Returns every `error_code` any Apier surface can serialise (209 today; the closed `ErrorCode` enum), each with `retryable` (is an identical retry after a short backoff worth attempting?), `fix_hint_en` / `fix_hint_nb` (one-line imperative remediation in English and bokmål), `docs_url` (the code's anchor on /docs/errors) and `category` (one of the closed `ErrorCategory` buckets for coarse routing). SINGLE SOURCE OF TRUTH: the rows are the runtime error catalog — the SAME table `errorResponse` reads when it stamps those fields onto a live 4xx/5xx envelope — so a value looked up here always equals the value the envelope carries, and the /docs/errors page is generated from the same table. Sorted by code, deterministic for a given deploy: `data_freshness` / `last_verified` are pinned to the catalog's own change stamp, and the strong ETag honours If-None-Match → 304. Category A discovery surface: no API key, soft per-IP rate limit, `Cache-Control: public, max-age=300`. Complements POST /api/v1/explain, which expands the subset of codes that carry a full Compliance Explainer template into a bilingual `explanation` object.

## Response `200`

The complete error registry. Byte-stable for an unchanged catalog: the ETag is computed over the stable envelope (per-call wire markers like response_timestamp / response_hash excluded — the convention every cached read endpoint shares).

- object
  - `success` true, required
  - `data` object, required
    - `schema_version` string, required: Version of THIS response's shape (versioned machine interface, append-only fields).
    - `count` integer, required: Number of rows in `errors` — equals the `ErrorCode` enum length.
    - `categories` ErrorCategory[], required: The closed category set, in canonical order.
    - `retryable_contract` string, required: Human/agent-readable statement of what `retryable` means, repeated here so a cold agent never has to guess.
    - `errors` object[], required: One row per catalogued code, sorted by `code`.
      - `code` 'ACCOUNT_DELETION_FAILED' | 'AGENT_LOOP_DETECTED' | 'ALREADY_SUBSCRIBED' | 'ALTINN_ACK_UNPARSEABLE' | 'ALTINN_DELEGATION_MISSING' | 'ALTINN_DOWN' | 'ALTINN_LIVE_SUBMITTER_NOT_IMPLEMENTED' | 'ALTINN_NOT_CONFIGURED' | 'ALTINN_NOT_IMPLEMENTED' | 'ALTINN_SANDBOX_SUBMIT_NOT_IMPLEMENTED' | 'ALTINN_UPSTREAM_ERROR' | 'ALTINN_UPSTREAM_UNAVAILABLE' | 'API_KEY_NOT_FOUND' | 'API_KEY_NO_SCOPES' | 'API_KEY_RESERVED_SCOPE' | 'APPROVAL_TOKEN_EXPIRED' | 'APPROVAL_TOKEN_INVALID' | 'APPROVAL_TOKEN_MISMATCH' | 'APPROVAL_TOKEN_REQUIRED' | 'APPROVAL_TOKEN_USED' | 'AUDIT_QUERY_FAILED' | 'AUTH_CONSUMER_INACTIVE' | 'AUTH_CONSUMER_INVALID_TIER' | 'AUTH_EXPIRED' | 'AUTH_EXPIRED_KEY' | 'AUTH_EXPIRED_TOKEN' | 'AUTH_INSUFFICIENT_ROLE' | 'AUTH_INVALID_KEY' | 'AUTH_KEY_REVOKED' | 'AUTH_LOOKUP_FAILED' | 'AUTH_MALFORMED' | 'AUTH_MISSING' | 'AUTH_MISSING_DELEGATION' | 'AUTH_NO_DELEGATION' | 'BILLING_CHECKOUT_FAILED' | 'BILLING_NOT_CONFIGURED' | 'BILLING_NOT_LIVE' | 'BILLING_PORTAL_FAILED' | 'BRREG_DOWN' | 'BRREG_PROFILE_INTERNAL' | 'CERTIFICATE_SIGNING_UNAVAILABLE' | 'CHANGES_QUERY_FAILED' | 'COMPANIES_INSERT_FAILED' | 'COMPANIES_LOOKUP_FAILED' | 'COMPANY_CONTEXT_FAILED' | 'COMPANY_DEADLINES_FAILED' | 'COMPANY_LOOKUP_FAILED' | 'COMPANY_NOT_FOUND' | 'COMPANY_OBLIGATIONS_FAILED' | 'COMPANY_SUMMARY_FAILED' | 'CONCURRENT_WRITE_IN_FLIGHT' | 'CONSUMER_NOT_FOUND' | 'CREDIT_BALANCE_UNAVAILABLE' | 'CREDIT_CHECK_UNAVAILABLE' | 'CRON_RETENTION_FAILED' | 'CRON_STATUS_CHECK_FAILED' | 'CRON_STATUS_CHECK_TABLES_NOT_READY' | 'CRON_VISIBILITY_ROLLUP_FAILED' | 'CURSOR_INVALID' | 'DEADLINE_ADJUSTMENT_FAILED' | 'DEADLINE_LOOKUP_FAILED' | 'DEADLINE_PASSED' | 'DELEGATION_MISSING' | 'DELEGATION_MISSING_NAV_AAREG' | 'DELEGATION_REVOKED' | 'DRY_RUN_FAILED' | 'EVENT_RECLAIM_FAILED' | 'EVENT_RECORD_FAILED' | 'EXECUTION_CIRCUIT_OPEN' | 'EXECUTION_DEADLINE_EXCEEDED' | 'EXECUTION_FAILED' | 'EXECUTION_TIMEOUT' | 'FILING_HISTORY_FAILED' | 'FOLLOWUP_REQUIRED' | 'FORBIDDEN' | 'FORWARD_ORIGIN_MISMATCH' | 'FORWARD_PATH_REJECTED' | 'FORWARD_REDIRECT_REJECTED' | 'FULLMAKT_PACKAGE_NOT_GRANTED' | 'FULLMAKT_PRINCIPAL_NOT_ELIGIBLE' | 'FULLMAKT_PRINCIPAL_NOT_FOUND' | 'FULLMAKT_UPSTREAM_FAILED' | 'GOVERNMENT_API_ERROR' | 'GOVERNMENT_RATE_LIMITED' | 'GOVERNMENT_UNAVAILABLE' | 'GOVERNMENT_VALIDATION_REJECTED' | 'GOV_COMMIT_PAYLOAD_MISMATCH' | 'HITL_ALREADY_RESOLVED' | 'HITL_EXPIRED' | 'HITL_NOT_FOUND' | 'HITL_PENDING_APPROVAL' | 'HITL_RELEASE_FAILED' | 'IDEMPOTENCY_IN_PROGRESS' | 'IDEMPOTENCY_KEY_INVALID_FORMAT' | 'IDEMPOTENCY_KEY_MISMATCH' | 'IDEMPOTENCY_KEY_REQUIRED' | 'INSUFFICIENT_CREDITS' | 'INTERNAL_ERROR' | 'INTERNAL_SERVER_ERROR' | 'INVALID_CODE' | 'INVALID_CURRENCY' | 'INVALID_DATE' | 'INVALID_SIGNATURE' | 'INVALID_TRANSITION' | 'ISSUANCE_TOKEN_INVALID' | 'ISSUANCE_TOKEN_NOT_FOUND' | 'JSONRPC_INVALID_PARAMS' | 'JSONRPC_INVALID_REQUEST' | 'JSONRPC_METHOD_NOT_FOUND' | 'JSONRPC_PROTOCOL_ERROR' | 'JSONRPC_RATE_LIMITED' | 'JWKS_DERIVATION_FAILED' | 'KEY_ALREADY_REVOKED' | 'KEY_LIMIT_REACHED' | 'KEY_NOT_FOUND' | 'LINK_GENERATION_FAILED' | 'LOOKUP_FAILED' | 'LOVDATA_CHECK_FAILED' | 'MASKINPORTEN_AUTH_FAILED' | 'MASKINPORTEN_JWT_BUILD_FAILED' | 'MASKINPORTEN_MALFORMED_RESPONSE' | 'MASKINPORTEN_TOKEN_FAILED' | 'MAX_ISSUANCE_TOKENS_REACHED' | 'MAX_KEYS_REACHED' | 'MAX_PENDING_TOPUP_REQUESTS' | 'MCP_LOOP_DETECTED' | 'METHOD_NOT_ALLOWED' | 'MISSING_SIGNATURE' | 'NOT_FOUND' | 'NO_BILLING_ACCOUNT' | 'NO_RATE_AVAILABLE' | 'OAUTH_AUDIENCE_MISMATCH' | 'OAUTH_DISABLED' | 'OAUTH_JWKS_UNAVAILABLE' | 'OAUTH_SUBJECT_UNMAPPED' | 'OAUTH_TOKEN_EXPIRED' | 'OAUTH_TOKEN_INVALID' | 'ORG_NUMBER_INVALID_CHECKSUM' | 'PAYLOAD_TOO_LARGE' | 'PAYMENT_METHOD_NOT_ENABLED' | 'PAYMENT_STATUS_UNAVAILABLE' | 'PERMISSION_STATE_FAILED' | 'PERSONS_INSERT_FAILED' | 'PERSONS_LOOKUP_FAILED' | 'PLAN_INSUFFICIENT' | 'PROFILE_LIMIT_REACHED' | 'PROFILE_NAME_TAKEN' | 'PROFILE_NOT_FOUND' | 'PUBLIC_DEADLINES_FAILED' | 'PUBLIC_OBLIGATIONS_FAILED' | 'PUBLIC_SANDBOX_BODY_TOO_LARGE' | 'PUBLIC_SANDBOX_ORG_NOT_PERMITTED' | 'RATE_LIMITED' | 'RATE_LIMIT_CHECK_UNAVAILABLE' | 'RATE_LIMIT_EXCEEDED' | 'REQUEST_REJECTED' | 'REQUEST_TOO_LARGE' | 'RESOURCE_NOT_FOUND' | 'RETRY_BUDGET_EXHAUSTED' | 'RISK_ELEVATED' | 'ROLES_INSERT_FAILED' | 'ROLES_LOOKUP_FAILED' | 'SAFETY_SYSTEM_UNAVAILABLE' | 'SANDBOX_LOG_SUFFIX_MISMATCH' | 'SANDBOX_ORG_NOT_IN_FIXTURE_SET' | 'SANDBOX_TEMPORARILY_UNAVAILABLE' | 'SANDBOX_TEST_KEY_REQUIRED' | 'SANDBOX_TOOL_UNAVAILABLE' | 'SCOPE_INSUFFICIENT' | 'SCOPE_INSUFFICIENT_FOR_ACTION' | 'SCOPE_MISSING' | 'SCOPE_NOT_YET_APPROVED' | 'SCOPE_RESERVED' | 'SERVER_ERROR' | 'SERVER_MISCONFIGURED' | 'SERVICE_NOT_YET_AVAILABLE' | 'SESSION_REQUIRED' | 'SESSION_RESOLUTION_FAILED' | 'SHOWCASE_ORG_NOT_PERMITTED' | 'SPEND_CAP_REACHED' | 'SSE_NOT_SUPPORTED' | 'STATUS_URL_MISSING' | 'SUBSCRIPTION_CREATE_FAILED' | 'SUBSCRIPTION_DELETE_FAILED' | 'SUBSCRIPTION_LIMIT_REACHED' | 'SUBSCRIPTION_LIST_FAILED' | 'SUBSCRIPTION_NOT_FOUND' | 'TOPUP_BELOW_MINIMUM' | 'TOPUP_CEILING_EXCEEDED' | 'TOPUP_CEILING_UNAVAILABLE' | 'TOPUP_KEY_REVOKED' | 'TOPUP_NOT_FOUND' | 'TOPUP_REQUEST_NOT_PENDING' | 'TOPUP_RESOLVE_FAILED' | 'UNAUTHENTICATED' | 'UNKNOWN' | 'UNSUPPORTED_CURRENCY_PAIR' | 'UPSTREAM_BODY_READ_FAILED' | 'UPSTREAM_ERROR' | 'UPSTREAM_FETCH_FAILED' | 'UPSTREAM_NON_JSON' | 'UPSTREAM_NON_UTF8' | 'UPSTREAM_RESPONSE_TOO_LARGE' | 'UPSTREAM_TIMEOUT' | 'UPSTREAM_UNAVAILABLE' | 'UPSTREAM_UNMAPPED' | 'VALIDATION_FAILED' | 'VALIDATION_PRECONDITION_FAILED' | 'WEBHOOK_URL_INVALID', required: The CLOSED wire vocabulary of `error_code` values: every code any Apier surface can serialise — REST envelopes, the MCP tool-envelope taxonomy, the JSON-RPC transport, the dashboard billing routes and the operator cron / _internal surfaces. Derived from the runtime error catalog, the same table that stamps retryable / fix_hint / docs_url / category onto live envelopes, so this enum, GET /api/v1/errors and the generated /docs/errors page are the same 209-member set by construction (gated in CI). A code that reaches the envelope builder without a catalog entry is collapsed to INTERNAL_ERROR rather than serialised, so no value outside this enum can appear on the wire. Append-only: members are never renamed or removed without a /v2 bump.
      - `category` 'auth' | 'scope' | 'validation' | 'not_found' | 'rate_limit' | 'upstream' | 'internal' | 'billing', required: Coarse failure-class bucket carried on every error envelope as `category`. Closed and append-only. Routing guidance only, never a retryability promise: `upstream` and `rate_limit` are typically back-off classes and `auth` / `scope` typically stop-and-hand-over classes, but each carries non-retryable members (quota-style limits such as MAX_KEYS_REACHED, malformed upstream acks such as ALTINN_ACK_UNPARSEABLE), so a client MUST read the per-row `retryable` value before retrying and take `fix_hint` from the row, not the class. The full per-code mapping is served keylessly at GET /api/v1/errors.
      - `retryable` boolean, required: `true` → repeating the SAME request after a short backoff can plausibly succeed. `false` → an identical retry fails identically; change the input, the credential, or hand over to a human first. Mirrors the live envelope's `retryable` and, for codes shared with the MCP taxonomy, `metadata.retryable` — the three can never disagree (CI-gated).
      - `fix_hint_en` string, required: One-sentence imperative remediation, English. Identical to the live envelope's `fix_hint` / `fix_hint_en` for this code.
      - `fix_hint_nb` string, required: Norwegian bokmål sibling of `fix_hint_en`. First-pass translations awaiting native-speaker review.
      - `docs_url` string, uri, required: Stable absolute documentation URL for the code: the code's own anchor on https://www.apier.no/docs/errors (`#<code in lower case>`), uniformly for every row. Where a fuller recovery loop lives in a guide (error-handling, idempotency, agent-payments, authentication), the fix hints end with a 'See also' link to it. Always follow the row's value verbatim rather than deriving it from the code.
    - `docs_url` string, uri, required: The human error reference generated from the same catalog.
    - `explain_endpoint` string, required: Canonical path of POST /api/v1/explain, which expands explainer-backed codes into a full bilingual `explanation` object.
  - `_meta` TrustMetadata, required: Metadata included in every response for trust and verifiability.
    - `rulebook_version` string, required: Current Rulebook version. Internal rule-version records carry structured origin metadata (`initial_seed` | `human_review` | `lovdata_drift_response` | `audit_finding` | `customer_question` | `legal_correction`) for operator forensics, but that attribution is deliberately NOT exposed on public responses to avoid leaking operational signal.
    - `data_freshness` string, date-time, required: When this data was last fetched (ISO 8601 UTC).
    - `last_verified` string, date-time, required: When this data was last verified against source (ISO 8601 UTC).
    - `source` string, required: Origin of this data. Defaults to `apier.no`. The agent-readiness probe (`GET /api/v1/health/agent-readiness`) is the one surface that may instead emit `apier.no telemetry` — it does so when at least one of its endpoint rates came from measured live telemetry, and falls back to `apier.no` when every rate is a static default; all other endpoints always emit `apier.no`.
    - `data_source` string: Authoritative origin of the underlying data (listed alongside rulebook_version, data_freshness, last_verified, legal_basis for Rulebook-influenced endpoints). Distinct from `source` (the response origin): `data_source` identifies the authoritative data publisher — e.g. 'Brønnøysund Enhetsregisteret + Apier Universal Rulebook'. Present on registry-backed endpoints.
    - `served_from` 'cache' | 'live' | 'static': Cache-aware endpoints only — 'cache' when the response was served from the local copy, 'live' when the gateway just refreshed from the upstream, 'static' when the payload was computed deterministically from pure code with no DB or upstream read (e.g. /v1/public/deadlines). Absent on endpoints that don't carry this semantic.
    - `stale` boolean: Cache-aware endpoints only — true when the upstream was unreachable and a within-limit cached row was served as a fallback. Absent on normal responses.
    - `schema_version` string, required: OpenAPI contract version at the time of the response; matches `info.version`. Always present on every `/v1/*` response so a future schema break can be traced to the exact rows / audit events that predate / postdate it. Agent-facing machine interfaces (v1/capabilities, workflows.json) may override with their own narrower surface version; all other endpoints inherit the manifest-level version.
    - `legal_basis` string: Legal basis under which the response data is reused. Present on Rulebook-influenced endpoints (v1/company/{org}/obligations, /v1/company/{org}/deadlines). Common value: 'NLOD — public registry reuse'.
    - `rule_count` integer: Rule-evaluation count — total rules evaluated for this request. Present on endpoints that invoke the Rulebook evaluator (v1/company/{org}/obligations).
    - `applicable_count` integer: Count of rules whose evaluation_result is 'applicable'. Present on evaluator endpoints.
    - `not_applicable_count` integer: Count of rules whose evaluation_result is 'not_applicable'. Present on evaluator endpoints.
    - `insufficient_data_count` integer: Count of rules whose evaluation_result is 'insufficient_data' (Tier 2 gated). Present on evaluator endpoints. rule_count = applicable_count + not_applicable_count + insufficient_data_count.
    - `cache_age_ms` integer, nullable: Cache layer: milliseconds since the cached row was computed, or null on a cache miss (served_from === 'live'). Agents use it alongside data_freshness as a staleness signal. Present on endpoints wired to the cache (v1/company/{org}/obligations, /deadlines, /summary, /v1/public/obligations, /v1/public/deadlines).
    - `response_time_ms` integer: Speed signal: total server-side processing time in milliseconds, measured via performance.now() at the route boundary. Mirrored on the `X-Apier-Response-Time-Ms` header so agents can key on it without parsing the body. Present on every endpoint.
    - `response_timestamp` string, date-time: RFC 3339 / ISO 8601 UTC timestamp stamped by the response builder at wire-exit. Mirrored on the `provenance_log.response_timestamp` column by a fire-and-forget writer. Distinct from `data_freshness` (when upstream data was fetched) and `last_verified` (when the citation was verified); this is the moment the envelope left the server. Always populated at runtime — deliberately left out of the `required` list to avoid a cascading contract change that would invalidate every pre-existing example envelope in this spec (append-only response contracts). A future revision may promote it into the `required` list alongside a bulk example refresh.
    - `response_hash` string: SHA-256 hash of the canonical-JSON form of the envelope with `_meta` stripped before hashing, prefixed with `sha256:`. Mirrored on `provenance_log.response_hash` so a consumer can independently re-hash the bytes they received and compare against what we persisted (integrity receipt). Stripping `_meta` is load-bearing: volatile fields (response_time_ms, cache_age_ms, served_from) and the hash itself would otherwise feed into the digest and break the cache-hit-bytewise-identical invariant.
    - `source_snapshot_id` string: Optional free-text pointer into an upstream sync snapshot the response derives from — e.g. a Brreg sync's `brreg-<ISO>` snapshot id. Absent when the response is not tied to a specific upstream snapshot (capabilities, tools, static deadlines).
    - `is_sandbox` true: Present and `true` only when the response was generated from sandbox fixture data (currently `ALTINN_MODE=sandbox` on `/api/v1/altinn/list-acting-capacity`). Absent (NOT `false`) on every other response — the absent-vs-false distinction is deliberate so downstream agents branching on `if (response._meta.is_sandbox)` cannot be misled into treating non-sandbox responses as positively-confirmed-not-sandbox. Distinct from the `/v1/sandbox/*` `is_sandbox: true` literal in `SandboxMeta` (which carries the sandbox surface tag); this flag rides through the production `/api/v1/altinn/*` surface to forensically tag a sandbox-mode response that an OEM evaluator received.
    - `cost_nok` number: What this call debited from the caller's prepaid credit balance, in NOK, rendered from the integer-øre ledger (50 øre → 0.5; the ledger itself never leaves whole øre and no float arithmetic touches a balance). Present on the 2xx body of every metered company-data read — the same debit that sets the `X-Credits-Cost-Ore` header, so the two never disagree. `0` when nothing was charged: credit enforcement running dark (the response then also carries `X-Credit-Check: shadow`) or the sandbox surface. Absent on unmetered endpoints and on error envelopes — a refunded 5xx/403/404 claims no cost rather than a wrong one. Lives under `_meta`, which `response_hash` excludes, so the provenance receipt is unaffected; the route's ETag is computed before the credit wrapper stamps it, so a conditional request can still short-circuit to 304. Append-only addition.
    - `wallet_remaining_nok` number, nullable: The prepaid credit balance remaining AFTER this call's debit, in NOK (same rendering as `cost_nok`; mirrors the `X-Credits-Balance-Ore` header). `null` when no balance was read: credit enforcement running dark, or the sandbox surface. Present wherever `cost_nok` is. An agent planning a sequence of metered calls can divide this by the per-call price from GET /api/v1/pricing to know how many reads remain before a 402 INSUFFICIENT_CREDITS. Append-only addition.
    - `spend_cap_remaining_nok` number: What the calling key may still spend under its tighter spend cap (Europe/Oslo calendar day or month) AFTER this call's debit, in NOK (same rendering as `cost_nok`; never below 0). Present on the 2xx body of a metered read only when credit enforcement is live AND the key has a daily or monthly cap (set with PATCH /api/v1/account/keys/{id}); absent otherwise. When it reaches 0 the next metered call on this key returns 402 SPEND_CAP_REACHED until the cap resets. Append-only addition.

## Other responses

- `304`: Not Modified: the client's If-None-Match matched the current ETag: the catalog is unchanged, so the held representation is still valid. Empty body per RFC 9110; ETag and Cache-Control re-emitted, and the /api/v1 proxy still stamps X-Correlation-ID and the Link service-descriptor on the 304 exactly as on the 200.
- `429`: Per-minute rate limit reached for this (IP, endpoint) bucket on a zero-auth public endpoint. The `Retry-After` header indicates how many seconds to wait before the window resets. Public endpoints share a single soft-cap of 1000 requests per minute PER IP — there is no tier scaling, because callers aren't authenticated. Every allowed response also carries the standard `X-RateLimit-*` headers. On rare infrastructure-side failures the gateway fails OPEN and passes the request through with `X-RateLimit-Check: skipped`.

---

[API](https://skmtc.dev/apier/apis/apier-no-api.md) · [All operations](https://skmtc.dev/apier/apis/apier-no-api/llms.txt) · [OpenAPI document](https://skmtc.dev/apier/apis/apier-no-api/revisions/9ec19bc87311?raw)
