# Error codes

> **Answer.** KRIN errors are RFC 9457 `application/problem+json` with a stable `code`. Branch on `code`, never on `title` or `detail`, which can change. Always log `request_id`: KRIN support can find any request by it.

Each error's `type` is `https://docs.krin.io/errors/<code>`, which opens the row below.

## Requests

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="validation_failed"></span>`validation_failed` | 400 | A field is missing or out of shape. `errors` lists each one with its `path` | Fix the listed fields |
| <span id="invalid_json"></span>`invalid_json` | 400 | The body isn't valid JSON | Send valid JSON |
| <span id="payload_too_large"></span>`payload_too_large` | 413 | The body is over the size limit | Send less in one request |
| <span id="method_not_allowed"></span>`method_not_allowed` | 405 | This path doesn't take this HTTP method | Check the reference |
| <span id="idempotency_key_required"></span>`idempotency_key_required` | 400 | A write without `Idempotency-Key` | Add one unique key per write |
| <span id="idempotency_key_reused"></span>`idempotency_key_reused` | 409 | The same `Idempotency-Key` with a different request | Use a new key for a new request |
| <span id="dry_run_not_supported"></span>`dry_run_not_supported` | 400 | `dry_run=true` on an operation that has no dry run | Drop `dry_run` |
| <span id="rate_limited"></span>`rate_limited` | 429 | Too many requests | Wait for `Retry-After`, then retry |
| <span id="not_found"></span>`not_found` | 404 | The object doesn't exist in your organization | Check the id and the `Krin-Org` |
| <span id="conflict"></span>`conflict` | 409 | The object changed since you read it | Read it again, then retry |
| <span id="invalid_transition"></span>`invalid_transition` | 409 | The object's state doesn't allow this, for example pausing an ended offer | Read its state first |
| <span id="immutable_field"></span>`immutable_field` | 409 | This field can't change after creation | Create a new object instead |
| <span id="internal_error"></span>`internal_error` | 500 | Something failed on KRIN's side | Retry later; send `request_id` to support |
| <span id="not_configured"></span>`not_configured` | 503 | This part of KRIN isn't switched on in this environment yet | Retry later |

## Sign-in and access

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="not_signed_in"></span>`not_signed_in` | 401 | No valid key, token or session | Sign in again or check the key |
| <span id="org_required"></span>`org_required` | 400 | A console call without `Krin-Org` | Send `Krin-Org` |
| <span id="role_not_allowed"></span>`role_not_allowed` | 403 | Your role can't do this | Ask an owner of the organization |
| <span id="side_not_enabled"></span>`side_not_enabled` | 403 | The organization has no advertiser or publisher side for you | Turn the side on in the console |
| <span id="step_up_required"></span><span id="passkey_session_required"></span>`passkey_session_required` | 403 | Sign in with your passkey to do this (console only) | Sign in again with your passkey; if you have none, add one in Settings, Passkeys and security |
| <span id="sign_in_too_old"></span>`sign_in_too_old` | 403 | Money steps need a passkey sign-in from the last 12 hours | Sign in with your passkey again, then retry |
| <span id="recent_new_device"></span>`recent_new_device` | 403 | Money steps wait 10 minutes after a new device sign-in or a passkey change | Wait, then retry; `retry_after_seconds` says how long |
| <span id="passkey_sign_in_failed"></span>`passkey_sign_in_failed` | 401 | Passkey sign-in didn’t work | Try again, or sign in with an email code |
| <span id="origin_rejected"></span>`origin_rejected` | 403 | A console write from another site | Use the console itself |
| <span id="terms_required"></span>`terms_required` | 400 | The KRIN terms weren't accepted | Accept the terms |
| <span id="terms_outdated"></span>`terms_outdated` | 400 | These aren't the current KRIN terms | Reload the page and accept the current terms |
| <span id="org_limit_reached"></span>`org_limit_reached` | 409 | You've created as many organizations as one person can | Use an existing organization, or contact KRIN support |
| <span id="invalid_email"></span>`invalid_email`, <span id="code_wrong"></span>`code_wrong`, <span id="code_expired"></span>`code_expired`, <span id="code_locked"></span>`code_locked` | 400 | The email sign-in code is missing, wrong, expired or locked after too many tries | Request a new code |
| <span id="turnstile_failed"></span>`turnstile_failed` | 400 | The sign-in check didn't pass | Reload the page and try again |
| <span id="mail_unavailable"></span>`mail_unavailable` | 503 | The sign-in email couldn't be sent right now | Retry in a minute |
| <span id="passkey_invalid"></span>`passkey_invalid`, <span id="passkey_challenge_invalid"></span>`passkey_challenge_invalid`, <span id="passkey_needs_fresh_sign_in"></span>`passkey_needs_fresh_sign_in`, <span id="passkey_counter_regressed"></span>`passkey_counter_regressed` | 400/403 | The passkey check failed | Try again; if it repeats, remove that passkey and add a new one |
| <span id="passkey_already_registered"></span>`passkey_already_registered`, <span id="passkey_limit_reached"></span>`passkey_limit_reached`, <span id="no_passkey"></span>`no_passkey` | 409 | Passkey set-up conflict | See Settings, Passkeys |

### API keys (Soon: these codes appear once API keys are switched on)

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="invalid_api_key"></span>`invalid_api_key` | 401 | The key is missing, unknown, revoked or expired | Send a live secret key: `Authorization: Bearer krin_sk_...` |
| <span id="ip_not_allowed"></span>`ip_not_allowed` | 403 | The request came from an address outside the key's allowlist | Call from an allowed address, or change the allowlist in the console |
| <span id="scope_missing"></span>`scope_missing` | 403 | The key doesn't have this operation's scope | Make a key with that scope in the console |
| <span id="not_for_api_keys"></span>`not_for_api_keys` | 403 | A person runs this in the console, such as key and member changes, money moves and steps that need a passkey sign-in | Do it in the console |
| <span id="test_key_live_account"></span>`test_key_live_account` | 403 | A test key (`krin_sk_test_`) after the organization left sandbox | Use a live key |

### Webhooks (Soon: these codes appear once webhooks are switched on)

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="webhook_limit"></span>`webhook_limit` | 409 | This side already has 10 webhook endpoints | Delete one first |
| <span id="webhook_disabled"></span>`webhook_disabled` | 409 | A replay to an endpoint that is turned off | Turn the endpoint on, then replay |

## Advertisers

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="unsupported_url"></span>`unsupported_url` | 422 | The link isn't a Google Play or App Store app link | Paste the store link |
| <span id="store_not_found"></span>`store_not_found` | 404 | The store has no app at that link | Check the link |
| <span id="store_unreachable"></span>`store_unreachable` | 502 | The store didn't answer | Retry later |
| <span id="product_exists"></span>`product_exists` | 409 | Your organization already has a product for this app. The answer names it | Use that product |
| <span id="offer_locked"></span>`offer_locked` | 409 | A submitted offer changes only through withdraw, pause or a change request | Withdraw it or request a change |
| <span id="no_check_run"></span>`no_check_run` | 404 | The offer hasn't been submitted yet, so it has no checks | Submit it first |
| <span id="reversal_window_closed"></span>`reversal_window_closed` | 409 | The conversion is final | Nothing to reverse |
| <span id="reversal_money_off"></span>`reversal_money_off` | 409 | Reversals aren’t open for this conversion yet | Nothing was changed. Try again once reversals open |
| <span id="reversal_daily_cap"></span>`reversal_daily_cap` | 429 | Your organization filed 50 reversals today | Try again after 00:00 UTC (`Retry-After`) |
| <span id="pending_change_required"></span>`pending_change_required` | 409 | On a live or paused offer, this widens who sees it, for example new countries or looser age settings. Nothing was saved, and the live offer keeps serving | Send it as a change request (`advertiser.offers.changes.propose`). It runs the checks first |
| <span id="store_age_unverified"></span>`store_age_unverified` | 422 | KRIN couldn't read the app's age rating from its store yet, so the age setting can't be checked. `errors` lists the fields | Try again later, or check the store link |
| <span id="topup_limit"></span>`topup_limit` | 409 | You already have 5 wire top-ups waiting for payment | Send one, cancel one, or wait for one to expire, then start another |
| <span id="wire_unavailable"></span>`wire_unavailable` | 409 | Wire top-ups aren’t available right now | Try again later; KRIN never sends bank details by email |
| <span id="topup_sandbox"></span>`topup_sandbox` | 409 | Wire top-ups are for live accounts only | Add funds once your account is out of Sandbox |
| <span id="topup_state"></span>`topup_state` | 409 | This top-up is no longer pending | Nothing to change; start a new top-up if you need one |

## Publishers and the wall

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="placement_not_ready"></span>`placement_not_ready` | 409 | The placement can't go live yet. `missing` lists what's left | Finish each listed item |
| <span id="placement_not_serving"></span>`placement_not_serving` | 409 | The wall isn't open: no launch secret yet, or the placement is paused or blocked | Check the placement in the console |
| <span id="placement_fraud_paused"></span>`placement_fraud_paused` | 409 | KRIN paused this placement after a traffic decision | Contact KRIN support with `request_id` |
| <span id="sandbox_only"></span>`sandbox_only` | 409 | The test wall opens only while the account is in sandbox | Use your live wall |
| <span id="postback_not_configured"></span>`postback_not_configured` | 404/409 | No postback URL is set yet: 404 when you read the postback settings, 409 when you send a test | Set the postback first |
| <span id="postback_secret_missing"></span>`postback_secret_missing` | 409 | The postback has no signing secret yet | Create the secret |
| <span id="postback_template_unsigned"></span>`postback_template_unsigned` | 422 | A GET template must carry every signed value. `missing` lists them | Add the listed values to the template |
| <span id="pb_duplicate_parameter"></span>`pb_duplicate_parameter` | 422 | The postback template names one parameter twice | Remove the duplicate |
| <span id="secret_already_shown"></span>`secret_already_shown` | 409 | A secret is shown once, so a retry of its creation doesn't show it again (placement secrets, API keys, webhook endpoints) | Rotate a placement secret. For a lost API key or endpoint secret, revoke the key or delete the endpoint, then create a new one |
| <span id="test_link_already_shown"></span>`test_link_already_shown` | 409 | A test wall link is shown once | Press Open or Copy again for a fresh link |
| <span id="launch_rejected"></span>`launch_rejected` | 401 | The wall launch link's signature doesn't match, or its `ts` is more than 5 minutes from KRIN's clock, or its `user_id` starts with `krin_` (reserved for KRIN) | Sign on your server with the placement's launch secret and current time |
| <span id="launch_nonce_reused"></span>`launch_nonce_reused` | 401 | This launch link was already used | Sign a new link for every open |
| <span id="user_not_found"></span>`user_not_found` | 404 | No user with that ID on this placement | Check the user ID your app sends in the wall launch, and the placement |
| <span id="sdk_app_not_registered"></span>`sdk_app_not_registered` | 409 | This Android app's signing certificate isn't on its property, so the KRIN SDK can't start a session | Add the app signing certificate SHA-256 from Play Console (App integrity, App signing) to the property |
| <span id="client_ip_required"></span>`client_ip_required` | 400 | The request had no user IP | Send it from the user's device, not your server |
| <span id="wall_session_invalid"></span>`wall_session_invalid` | 401 | The wall session ended | Open the wall again from the app |
| <span id="onboarding_required"></span>`onboarding_required` | 403 | The user hasn't chosen an age range or accepted the wall's current terms yet | The wall shows them; nothing to do on your side. With [headless offers](https://docs.krin.io/en/publishers/headless), open your wall for the user once |
| <span id="profile_locked"></span>`profile_locked` | 409 | The age range is already set, or the wall is stopped for this user | The user contacts your support; you contact KRIN support |
| <span id="click_limit"></span>`click_limit` | 429 | The user started too many offers in a short time | Try again later |
| <span id="already_started"></span>`already_started` | 409 | This Idempotency-Key already started an offer. The single-use click link is never stored | Start again with a new Idempotency-Key |
| <span id="network_refused"></span>`network_refused` | 403 | A headless start came from a data center, VPN, proxy or Tor network | Send the IP address the user's device reached your server from |
| <span id="not_claimable"></span>`not_claimable` | 409 | This step can't take a missing-reward claim now. `reason` says why (below) | Follow the reason |

### `not_claimable` reasons

| reason | meaning |
|---|---|
| `step_recorded` | The step is already recorded, so there's nothing to claim |
| `not_opened` | The user didn't open this offer from the wall |
| `too_early` | Claims open later for this step. The step shows the date |
| `window_closed` | The time to claim this step has passed |
| `daily_limit` | Claims are paused for today. Try again tomorrow |

## Reports

| code | status | meaning | what to do |
|---|---|---|---|
| <span id="metric_not_offered"></span>`metric_not_offered` | 400 | The metric isn't in your catalog | Read `metrics.catalog` first |
| <span id="mixed_currency"></span>`mixed_currency` | 400 | Money metrics in more than one currency in one query | Group or filter by one currency |
| <span id="result_too_large"></span>`result_too_large` | 400 | More than 5,000 rows | Narrow the range, the granularity or the dimensions |
| <span id="query_timeout"></span>`query_timeout` | 503 | The report took too long | Narrow the range, then retry after `Retry-After` |
