| invalid_secret_key | 401 | No valid rh_sk_ key in the Authorization header. | Send `Authorization: Bearer rh_sk_…` from your backend only. |
| invalid_api_key | 401 | An enroll or activate relay arrived without a valid secret key. | Same key, same header; these are server-to-server relays. |
| activation_refused | 401 | The activate relay carried a credential activation response the server did not issue, one that did not open, or an attestation key another account already holds. One answer for all. | Start enrollment again from /attest/enroll; do not resend the same activation response. |
| invalid_evidence | 400 | Malformed verify body: a missing or malformed nonce, or evidence that carries no proof to resolve an installation from. | Pass the nonce from /attest/challenge and the whole blob the client produced. |
| policy_bound_to_key | 400 | The call named a policy. Policies bind to API keys; a call cannot name, tighten or loosen one. | Remove the `policy` field, and attach the policy to the key in the dashboard. |
| invalid_ask | 400 | An ask that isn't identity or posture, or an expectedDevices list of more than 32 ids. A key is minted by its own ceremony, never inside an attestation. | Ask for identity, posture or both. To mint a key, call /keys/challenge with a purpose. |
| wire_version_unsupported | 400 | A TPM enroll relay carried a top-level akPublicArea instead of attestationKey { publicArea, parentPublicArea, qualifiedName }: a client on an earlier SDK. | Update the client SDK to ABI 8.0 and the server SDK to its wire 8.0 release; nothing on the server side changes it. |
| invalid_enroll_shape | 400 | An enroll body no platform sends: a nested attestationKey on a macOS enrollment, both shapes at once, or a qualifiedName the two public areas do not produce. | Relay the body EnrollBegin produced, unchanged. |
| missing_key_material | 400 | The enroll relay lacks a field the platform's ceremony needs: ekPublicKey, a part of attestationKey, or the iOS key id and attestation object. | Relay the body EnrollBegin produced, unchanged. A server SDK that rebuilds the body from fields must keep all three parts of attestationKey. |
| malformed_encoding | 400 | A base64 field in the enroll or activate relay did not decode. | Relay the body unchanged; the client re-runs the leg. |
| malformed_ak_public_area | 400 | The attestation key or its parent did not parse as a TPMT_PUBLIC. | Start enrollment again from EnrollBegin. |
| ak_template_rejected | 400 | The attestation key is not one of the approved templates (ECC P-256 or RSA-2048, restricted signing, TPM-resident). | Start enrollment again from EnrollBegin on a supported SDK. |
| ek_chain_rejected | 400 | The endorsement certificate chain did not validate, or its maker revoked it, and the key's policy does not admit it. `chainFailure` names how. `policyCanAdmit` is true when changing the answer to "A chip whose certificate no maker vouches for?" (or, for `revoked`, "A chip its maker has revoked?") to admit would let this device enroll. | Retry on `chain_fetch_failed`; otherwise not retriable for this device under this policy. |
| unrecognised_ek_key | 400 | The endorsement public key is neither RSA nor ECC, or is ECC on the TPM ceremony, which seals to RSA. | Start enrollment again from EnrollBegin. |
| secure_enclave_key_rejected | 400 | The macOS enroll relay carried a key that is not a well-formed P-256 point. | Start enrollment again from EnrollBegin. |
| app_attest_rejected | 400 | The iOS attestation object did not validate against Apple's root, or the key is already another tenant's installation. | Generate a new App Attest key and enroll again. |
| unknown_platform | 400 | The platform field names nothing the TPM ceremony serves. | Send windows, linux, macos or ios. |
| platform_mismatch | 400 | The device is already recorded on another ceremony's platform; a TPM device cannot become a Secure Enclave or App Attest device. | Not retriable for this device. |
| invalid_request | 400 | A request body that did not bind on any endpoint, or an enrollment or key-ceremony refusal with no code of its own; the message says what was wrong. | Read the message. |
| invalid_purpose | 400 | /keys/challenge named a purpose that is not sign or decrypt. | Pass purpose "sign" or "decrypt". |
| purpose_unsupported | 422 | /keys/certify received an iOS certification for a decrypt key challenge. An App Attest key only signs. | Mint a sign key on iOS. |
| invalid_certification | 400 | The /keys/certify relay is malformed: a missing nonce, a certification that is none of the platform shapes, a macOS decrypt certification without devicePublicKey and deviceSignature, or a macOS sign certification that carries them. | Relay the body MintKey produced, unchanged, with the nonce from /keys/challenge. |
| certification_rejected | 422 | The certification did not verify: the signature is not by a live installation of yours, the certified name does not match the public area, the template does not fit the purpose, the device fails the key's identity policy, or it is not a device the challenge named. One answer for all. | Enroll if the installation is not yours; otherwise mint again on a device the policy admits. |
| key_rotation_conflict | 409 | Two mints for the same installation and purpose raced; the other one completed first. | Mint again. |
| key_write_failed | 500 | The certification verified but the key could not be recorded. | Retry with backoff; if it persists, contact support with the request. |
| key_disclosure_too_low | 422 | The key's disclosure ceiling is below pseudonymous, so a certify could never return a keyId. Answered on /keys/challenge and again on /keys/certify. | Raise the key's ceiling in the dashboard, or mint under a key whose ceiling is pseudonymous or higher. |
| expected_unknown | 422 | expectedKey names a keyId, or expectedDevices a device id, that your account has not enrolled or certified. | Pass only ids you kept from /attest/activate, a verdict, or /keys/certify. |
| platform_rotation_blocked | 422 | The device would switch operating system, and the key's policy refuses a switch between Windows and Linux. | Not retriable under this policy. Allow the switch in the policy if a dual-boot machine should enroll from both. |
| platform_rotation_rate_exceeded | 422 | The device has switched operating system more often than the key's posture policy allows in its window. | Wait out the window, or raise the policy's limit on switches between Windows and Linux. |
| unknown_policy | 422 | A policy bound to the key no longer exists. Nothing is substituted. | Rebind the key to a preset or to a policy you created. |
| posture_not_bound | 422 | The challenge asked for posture on a key that carries no posture policy. | Bind a posture policy to the key (Pro), or ask for identity only. |
| plan_lapsed | 402 | The key's posture policy blocks posture checks while the plan does not cover them. | Restore the plan, or answer the policy's "If the Pro plan lapses?" with Identity only. |
| admission_refused | 422 | Enrollment ran admission under the key's identity policy and the device is not accepted. Refused before the credential is issued, so no elevation prompt is spent. | Not retriable for this device and policy. Tell the user the device is not eligible, or bind the key to a policy that admits it. |
| challenge_expired_or_used | 409 | Unknown, foreign, expired (about five minutes) or already-consumed nonce, on /attest/verify or /keys/certify. | Mint a fresh challenge and re-run the client. Never reuse a nonce. |
| budget_exhausted | 429 | This device is new this month and would cost more than the key's budget allows past the included devices. Answered on activate, the one-leg iOS enroll, verify and certify; already-active devices keep working. The body names the budget. | Raise the budget's limit or move the key to another budget. The response carries the `budget-exhausted` quota header. |
| rate_limited | 429 | A per-IP or per-session window is exhausted. Carries retryAfterSeconds and a Retry-After header; no X-RootHerald-Quota header. | Wait Retry-After seconds and resend. The plan is not involved. |
| metering_unavailable | 500 | A billable route had no resolvable tenant, or usage metering failed. Fails closed rather than serving an unmetered attestation. | Retry with backoff; if it persists, contact support with the request. |