Skip to content

API Reference

Audience: Engineers integrating against the Nanorix HTTP API directly (or building third-party SDKs). Stability contract: the API surface follows a Forever-Standard discipline — fields are additive; existing fields and identifiers are forever-stable; breaking renames do not ship. Substrate framing: Nanorix attests to the boundary; the customer composes downstream attestations; the auditor verifies independently. The API surface below is the boundary contract.

Where PHI runs. Production PHI runs only in a Nanorix deployment you run yourself. The hosted endpoint at nanorix.io is an evaluation sandbox for synthetic data, with no PHI or other regulated data. The request examples below that declare or upload PHI are for your own deployment; replace the base URL with its address.

Base URL: https://api.nanorix.io

All requests and responses are JSON unless explicitly noted (file upload endpoints accept raw bytes). Authentication is Authorization: Bearer nrx_live_<32hex>. Every response carries the X-Nanorix-Request-Id header for support correlation; on errors the same value appears at error.request_id in the body.


Table of contents

  1. Authentication and tiers
  2. Capsule lifecycle
  3. Capsulefiles
  4. AuditProofs and AuditRecords
  5. Stateless verification
  6. Egress profiles
  7. Webhooks
  8. SCIM provisioning
  9. Customer account
  10. Billing
  11. Health and ops
  12. Error envelope
  13. Rate limiting and retries
  14. Idempotency
  15. Service-unavailable responses

Vocabulary note. External brand: AuditProof (standard proof) and AuditRecord (the customer's complete record). API paths still use /cdp for forever-stable structural compatibility. When the docs say "AuditProof" the JSON path inside the request still says /cdp/.... This is by design.


Authentication and tiers

Headers

Authorization: Bearer nrx_live_<32hex>
Content-Type: application/json
Idempotency-Key: <uuid>            # optional; honoured by POST /v1/capsules and POST /v1/capsulefiles
X-Nanorix-Trace-Id: <uuid>          # optional, propagated through logs

The API key is issued once at signup and cannot be retrieved later (Nanorix stores a SHA-256 hash of it, with a short hint for display). Test-mode keys (nrx_test_...) operate against the same surface but do not generate billable AuditProofs.

Tier surface (external naming)

Tier Wire identifier AuditProofs / month
Free free 100 included
Developer starter per plan
Team business per plan
Enterprise enterprise per plan

Tier naming: the wire values starter / business are forever-stable identifiers; public surfaces, marketing, and docs use Developer / Team. Both are accepted in tier-relevant API requests.

Free tier offers evaluation-on-ramp limits. They apply where billing tiers apply: on the hosted Evaluation Sandbox, and on an install with billing on. An install with billing off applies no tier limit except that a single uploaded file keeps its tier's size limit; otherwise this server's own bounds apply. Developer / Team / Enterprise pricing is contact-based; see billing.

Rate limits

Where billing tiers apply, the per-customer rate limit is the account's rate_limit_rpm, which GET /v1/customers/me returns. On an install with billing off the API applies a per-account rate of the server's own, and GET /v1/customers/me returns rate_limit_rpm as null. Exceeding it returns 429 rate_limited with a Retry-After header in seconds. Public endpoints (signup, verify, contact, keys) are rate-limited per source IP.

Surface Limit
POST /v1/signup 10 / min / IP
POST /v1/verify 60 / min / IP
POST /v1/contact 5 / min / IP
GET /v1/capsules/:id/cdp/verify 30 / min / IP
Authenticated endpoints the account's rate_limit_rpm where billing tiers apply; on an install with billing off, the server's own per-account rate (rate_limit_rpm reads null there)

Capsule lifecycle

POST /v1/capsules

Create an ephemeral capsule. Authenticated.

Request:

{
  "max_lifetime_seconds": 300,
  "data_classification": "general",
  "capsulefile_id": "cf_aB3dE9xQ",
  "egress_profile": "partner-api",
  "metadata": {"matter_id": "ACME-001"}
}
Field Type Required Description
max_lifetime_seconds integer no Capsule lifetime in seconds (default: your tier's default lifetime, 300 on Free). A value above your tier's maximum is a 400 invalid_parameters. The lifetime applied never exceeds 3600 seconds on any tier today, so a value between 3600 and a higher tier maximum is capped rather than rejected; the response's max_lifetime_seconds is the value applied. On an install with billing off no tier maximum applies: any lifetime up to 3600 seconds, or the Capsulefile's duration cap when that is lower, is applied, and a larger one is capped.
data_classification string no general (default), PHI, PII, financial, credentials. Customer-declared. The service lowercases the value before validating and storing it, so PHI and phi are both recorded as phi in capsule_context.
capsulefile_id string no Pin a specific Capsulefile (cf_<id>).
jurisdiction string no us, ca, gb, au, in, eu-fr, eu-de, eu-nl. Customer-declared, case-insensitive (stored lowercase); any other value is a 400. When omitted, it is your account's declared jurisdiction when that names one country (US is us, UK is gb, CA is ca, AU is au, IN is in); an account declared EU or OTHER names no single one, so its create must name it or is refused with 400 invalid_parameters (message starting invalid_jurisdiction), before anything is created or counted. POST /v1/destroy takes the same field and the sealed proxy the X-Nanorix-Jurisdiction header, resolved the same way. Stored per capsule and carried as jurisdiction in the signed AuditProof. The frameworks in regulatory_context, and the jurisdiction in capsule_context, come from the account jurisdiction declared at signup, not from this field.
egress_profile string no Egress profile name (Team+).
metadata object no Free-form {string:string}, ≤4KB total, customer-defined keys (the nanorix:* prefix is reserved).

Response (201):

{
  "id": "018f5b8e-3a9c-4c4d-9e7e-d4a8f7b2c10e",
  "status": "active",
  "max_lifetime_seconds": 300,
  "created_at": "2026-...Z",
  "expires_at": "2026-...Z",
  "memory_limit_bytes": 536870912
}

memory_limit_bytes is the memory limit the runtime wrote for the capsule, in bytes: the Capsulefile's capsule_memory_mb when it sets one, else the smaller of your tier's limit (none on an install with billing off) and the API server's per-capsule memory limit. Uploaded files and Capsulefile files count against it. It is absent only on a development host that skips cgroup setup. It is not part of the AuditProof, and it is kept only as part of the 24-hour replay of a create sent with Idempotency-Key.

Errors: 400 invalid_parameters, 400 capsule_memory_exceeds_server_limit (the Capsulefile's capsule_memory_mb is above the server's per-capsule memory limit; no capsule was created and no usage was counted; see the error catalog), 401 invalid_api_key, 402 quota_exceeded (where billing tiers apply; on the Free tier, also when the organization's AuditProofs this billing cycle plus its undestroyed capsules created with live (non-test) keys have reached 100), 403 tier_required (for example, naming an egress_profile on the Free tier where billing tiers apply) or mfa_enrollment_required, 404 resource_not_found (unknown capsulefile_id or egress profile), 409 idempotency_key_conflict, 409 resource_conflict (the Capsulefile was finalized before file names were part of its content_hash and cannot move to the current rule: its stored value does not recompute from its stored declaration and files, or a file name is ambiguous (two files share it, or it is a file and also a folder of another); the message names the rebuild (for a system Capsulefile, that it cannot be used until it is replaced), and no capsule is created), 413 payload_too_large (the Capsulefile's files, each counted in whole memory pages of the server's page size (4 KiB on most servers, never less), with 2 MiB kept for the process that writes them and the room each write leaves free, do not fit under the memory limit the capsule would get, or the files alone take more than 4294967296 bytes (4 GiB), the size of a capsule's file system; the message names that limit or size, and no capsule was created and no usage was counted. A Capsulefile with no files is not checked. These checks, and the 503 capsule_capacity_reached for the memory the server's capsules share below, are answered after authentication, 503 isolation_unavailable, MFA, the egress profile and the Capsulefile's own 404, 409 and 422, and before 402 quota_exceeded, the capsule count's 503 capsule_capacity_reached and the 400 checks of the memory the capsule asks for. After those checks pass, a file that stops fitting once the capsule exists, or files the memory the server's capsules share no longer has room for (that message carries no byte count), are refused with the same code after the capsule was created and counted; the message names that capsule's id, which stays until you destroy it or it reaches max_lifetime_seconds; see the error catalog), 422 (region_mismatch, execution_mode_mismatch or secrets_injection_rejected; see the error catalog), 429 rate_limited, 503 isolation_unavailable (this deployment does not run capsule commands; see the error catalog), 503 capsule_capacity_reached (the server is already running the most capsules it admits at once; no capsule was created. Also when the Capsulefile's files fit under the memory limit the capsule would get but the memory the server's capsules share has no room for them now: it is answered before anything exists, after the Capsulefile's own checks and before 402 quota_exceeded, the message says no capsule was created and no file was written and carries no byte count, and no capsule was created and no usage was counted) or 503 db_pool_circuit_open (see Service-unavailable responses).

GET /v1/capsules/:id

Get capsule status. Authenticated; must own the capsule.

Response (200):

{
  "id": "018f5b8e-3a9c-4c4d-9e7e-d4a8f7b2c10e",
  "status": "active",
  "max_lifetime_seconds": 300,
  "created_at": "2026-...Z",
  "expires_at": "2026-...Z",
  "execution_count": 2,
  "bytes_processed": 1024,
  "memory_limit_bytes": 536870912
}

status enum: active, executing, destroyed, expired, expired_unclean.

memory_limit_bytes is present only when the API server process that answers runs the capsule; otherwise, and after the capsule is destroyed, it is absent rather than guessed.

POST /v1/capsules/:id/exec

Execute a command inside the capsule. Authenticated.

Request:

{
  "command": "python /data/input/capsulefile/main.py",
  "input_data": "{\"record_id\":\"P-1234\"}",
  "timeout": 30
}
Field Type Required Description
command string no Shell command (max 10 KB, counted as UTF-8 bytes). When omitted or null, the Capsulefile entrypoint runs, and the 10 KB limit applies to it too; required for a capsule created without a Capsulefile. An empty string is refused with 400.
input_data string no Written to /data/input/uploads/data in the capsule before exec (max 512 KB, counted as UTF-8 bytes). Not sent to stdin.
input_filename string no Accepted and currently ignored; the file is always /data/input/uploads/data.
timeout integer no Seconds before the command is killed with SIGKILL; the response then has timed_out: true and exit_code: -1. timed_out is sent only then. When omitted, no exec timer fires before the capsule's lifetime (max_lifetime_seconds) ends.

Response (200):

{
  "capsule_id": "018f5b8e-3a9c-4c4d-9e7e-d4a8f7b2c10e",
  "stdout": "extraction complete",
  "stderr": "",
  "exit_code": 0,
  "duration_ms": 1240,
  "executed_at": "2026-...Z"
}

Security note: sensitive bytes go in input_data, not in the command string. input_data is written to a tmpfs file inside the sealed sandbox; command-line arguments would be visible at /proc/PID/cmdline.

Errors: 400 invalid_parameters (including a command over 10 KB or input_data over 512 KB), 401 invalid_api_key, 403 tier_required (the developer-role gate), 404 resource_not_found, 409 resource_conflict (the capsule is not active), 410 capsule_expired, 422 input_provenance_rejected (the input manifest failed verification and the capsule destroys itself; see the error catalog), 429 rate_limited, 503 isolation_unavailable (this request ran no capsule command: the deployment does not run capsule commands, or the runtime refused this capsule's isolation setup; see the error catalog) or 503 db_pool_circuit_open (see Service-unavailable responses).

POST /v1/capsules/:id/upload

Upload a file to the capsule's input area. Authenticated. Body is raw bytes; filename is the ?filename= query param.

curl -X POST https://api.nanorix.io/v1/capsules/cap_.../upload?filename=input.pdf \
  -H "Authorization: Bearer nrx_live_..." \
  --data-binary @input.pdf

Response (200):

{"file_id":"...","filename":"input.pdf","size_bytes":48132,"sha256":"<hex>","uploaded_at":"2026-...Z"}

The sha256 key holds the file's SHA-512 digest as 128 hex characters, despite its name.

Errors: 413 payload_too_large (tier-bounded, or the file would not fit under the capsule's memory limit; against the capsule's memory limit, a file already under the same name counts as free room, except under the name data, which a command's input_data is written under; see the error catalog), 404 resource_not_found, 410 capsule_expired, 503 capsule_capacity_reached (the file fits under the capsule's memory limit, but the memory the server's capsules share has no room for it now; no file was written and the answer carries no byte count; retry after retry_after seconds).

GET /v1/capsules/:id/output

List output files written by the capsule. Authenticated.

Response (200):

{
  "files": [
    {"filename":"extraction.json","size_bytes":2048}
  ]
}

Each entry carries the file's name and size only; the listing carries no hash. The download response below carries the file's digest.

GET /v1/capsules/:id/output/:filename

Download an output file (binary body).

Response (200): raw file body with Content-Type: application/octet-stream; the X-Content-Hash header carries its SHA-512 digest as sha512:<hex>.

DELETE /v1/capsules/:id

Destroy the capsule. Returns the full proof (cdp, schema 2.2) with the summary projection (verification_cdp) beside it. Authenticated.

A destroy is never refused for a billing limit. Where billing tiers apply, the Free tier AuditProof limit is enforced when a capsule is created (POST /v1/capsules), not here.

Response (200):

{
  "capsule_id": "cap_...",
  "status": "destroyed",
  "destroyed_at": "2026-...Z",
  "total_executions": 2,
  "total_bytes_processed": 1024,
  "cdp": { /* the full proof: the document that verifies offline; see the AuditProof specification */ },
  "verification_cdp": { /* summary projection of cdp: no per-step chain */ },
  "regulatory_context": {
    "notice": "This mapping identifies regulatory provisions potentially related to the destruction evidence. It is not a compliance certification.",
    "framework_version": "2026-08",
    "mappings": [...]
  },
  "capsule_context": {"jurisdiction":"US","data_classification":"general"}
}

The full schema is in the AuditProof specification. Field-level discipline:

  • cdp is the full proof: the document the offline verifiers and the verifier page accept. It carries the capsule's activity trail (uploaded and downloaded file names, the Capsulefile ID, the egress profile name); commands are stored only as hashes. It also carries your metadata, capsule_context and regulatory_context; none of these three is covered by the signature (the capsule_started event (signed on 2.1 and 2.2) carries only a hash of metadata). Save it to a file and hand that file to whoever verifies.
  • verification_cdp is the summary projection. It leaves out the file names, the Capsulefile ID, the egress profile name and the per-step chain, and it carries your metadata, the capsule ID and the same Ed25519 attestation. It has no per-step chain, so it verifies only through POST /v1/verify. It is not a way to keep the activity trail from a recipient: the API serves the full proof without authentication to anyone who holds the capsule ID, on the hosted service and on your own deployment (GET /v1/capsules/:id/cdp/verify).
  • regulatory_context is a factual reference map; never COMPLIANT/PASSED/MEETS.

Errors: 503 auditproof_signing_unavailable when the destruction finished but the AuditProof could not be signed. The capsule's data is destroyed, no AuditProof was issued, and the capsule is in signing_failed; the error body carries capsule_id, status, signing_request_id, retry_signing_url and pause_window_expires_at; there is no Retry-After header. Do not repeat the destroy. Call POST /v1/capsules/:id/retry-signing before pause_window_expires_at, after which the capsule moves to destroyed_no_proof and no AuditProof can be produced for it; a failed retry returns the same error and starts a new pause window. See the error catalog. POST /v1/destroy, POST /v1/capsules/:id/retry-signing and the two provider proxy routes return the same error.


Capsulefiles

A Capsulefile is the customer's sealed environment definition, and the customer declares its contents. Inside the capsule the runtime also sets variables of its own: HOME=/tmp, TMPDIR=/tmp and a PATH that puts /opt/nanorix/bin and the Capsulefile's usr/bin and usr/local/bin ahead of the system folders; NANORIX_ACTIVITY_BUFFER_PATH and NANORIX_BUFFER_PATH, both /data/activity_events.jsonl; HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy and NO_PROXY=localhost,127.0.0.1 when the capsule's egress goes through a proxy; LD_LIBRARY_PATH when the Capsulefile holds native libraries; PYTHONPATH=/data/input/capsulefile/packages, PYTHONDONTWRITEBYTECODE=1 and PYTHONUNBUFFERED=1 for the Python runtimes; and NODE_PATH=/data/input/capsulefile/node_modules and NODE_ENV=production for node22. Your env_vars are set as well, except a key the runtime keeps for itself (HOME, PATH, TMPDIR, PYTHONPATH, NODE_PATH, NODE_ENV, the proxy variables, LD_LIBRARY_PATH) and a value that is not a string; those are skipped. Create and finalize answer 400 for an env_vars that sets NANORIX_ACTIVITY_BUFFER_PATH or NANORIX_BUFFER_PATH.

POST /v1/capsulefiles

Create a draft Capsulefile. Requires the developer role or above. The endpoint honours an Idempotency-Key header (see Idempotency).

Request:

{
  "name": "med-ai-extraction",
  "runtime": "python3.12",
  "entrypoint": "python /data/input/capsulefile/main.py",
  "egress_declaration": ["api.anthropic.com"],
  "capsule_memory_mb": 512,
  "env_vars": {"ANTHROPIC_MODEL": "claude-3-5-sonnet-latest"}
}

runtime is one of python3.11, python3.12 or node22. The Capsulefile's files land in /data/input/capsulefile/ inside the capsule, so the entrypoint names its script by that path. data_classification is declared on POST /v1/capsules, not here. This endpoint does not refuse a field it does not take: it drops it, and the dropped field is not part of the Capsulefile or its content_hash. system_packages is accepted but not stored, so it installs nothing and is not part of the content_hash either.

Response (201): the stored Capsulefile record. The example shows some of its fields:

{
  "id": "cf_aB3dE9xQ",
  "name": "med-ai-extraction",
  "runtime": "python3.12",
  "entrypoint": "python /data/input/capsulefile/main.py",
  "status": "draft",
  "content_hash": null,
  "total_size_bytes": 0,
  "is_system": false,
  "env_vars": "enc:...",
  "created_at": "2026-...Z",
  "finalized_at": null
}

env_vars is stored encrypted. This response, finalize and the list return the stored form, enc: followed by base64 (or {} when none were declared). GET /v1/capsulefiles/:id returns them decrypted to the admin and developer roles when the Capsulefile still has its key, and the stored form when it has none or the caller is a viewer or auditor.

Errors: 400 for an invalid field or an env_vars that sets NANORIX_ACTIVITY_BUFFER_PATH or NANORIX_BUFFER_PATH; 402 when your organization already holds as many Capsulefiles as its tier allows; 403 below the developer role; 409 when you already have a Capsulefile with this name (names are unique per user, not per organization), or 409 idempotency_key_conflict when an Idempotency-Key you already used comes with a different body.

POST /v1/capsulefiles/:id/files

Upload one source file to a draft Capsulefile: the raw body is the file, ?filename= names it, and the Content-Length header is required. Uploading a filename the Capsulefile already holds replaces that file. Requires the developer role or above.

curl -X POST 'https://api.nanorix.io/v1/capsulefiles/cf_.../files?filename=main.py' \
  -H "Authorization: Bearer nrx_live_..." \
  --data-binary @main.py

Response (200): {"file_id":"cff_k2Pq8sLm4nRt","filename":"main.py","size_bytes":1234,"sha256":"<hex>"}

The sha256 key holds the file's SHA-512 digest as 128 hex characters, despite its name.

Errors: 400 for an invalid filename, a Capsulefile that is not a draft, or a missing Content-Length; 403 below the developer role; 404 for a Capsulefile outside your organization; 413 when the Capsulefile would hold more files, or more bytes, than your tier allows. The byte check adds this upload's Content-Length to the Capsulefile's current total, so a file uploaded again under the same name counts at its old size as well as its new one.

POST /v1/capsulefiles/:id/finalize

Finalize the Capsulefile. Locks file set, computes the content_hash, transitions draft → finalized. After finalize the Capsulefile's declaration and files are immutable. Requires the developer role or above.

Response (200): the finalized Capsulefile record, with the same fields as the create response:

{
  "id": "cf_aB3dE9xQ",
  "status": "finalized",
  "content_hash": "<128 hex characters>",
  "total_size_bytes": 48132,
  "finalized_at": "2026-...Z"
}

content_hash is the SHA-512 digest, as 128 hex characters, of the Capsulefile's declaration: its declared fields (its name among them), its env vars, and each file's name together with its digest. A Capsulefile finalized before file names were hashed moves to the current rule at the first capsule create that passes the Capsulefile checks (ownership, status, region, execution mode, egress declaration); its content_hash changes once, content_hash_rule reads 2, and its earlier value stays in rule1_content_hash. When its stored value cannot be recomputed, or a file name is ambiguous (two files share it, or it is a file and also a folder of another), that create is refused with 409 resource_conflict instead and the Capsulefile is left as it is. If a finalized Capsulefile of your organization already has the same content_hash, the draft is discarded (its files and key are destroyed, as a delete would) and the response is that Capsulefile's record, under its own id. Use the id in the response. Because the hash covers the name and names are unique per user, this happens when another member of your organization finalized the same declaration under the same name.

Errors: 400 when the Capsulefile is not a draft, has no files, holds two files of one name (upload that name once more as a single file, which replaces every file of that name, then finalize), holds a name that is a file and also a folder of another file, or its env_vars sets NANORIX_ACTIVITY_BUFFER_PATH or NANORIX_BUFFER_PATH, which the runtime reserves; 403 below the developer role; 404 for a Capsulefile outside your organization.

GET /v1/capsulefiles

List your organization's Capsulefiles, newest first. Includes is_system: true Capsulefiles (Nanorix-published reference shapes — read-only, not deletable). Query parameters: status (draft or finalized) and limit (default 20, at most 100). There is no cursor, so one call returns at most 100 Capsulefiles.

Response (200): each entry is a Capsulefile record, with the same fields as the create response:

{
  "capsulefiles": [
    {"id":"cf_aB3dE9xQ","name":"med-ai-extraction","status":"finalized","is_system":false,"content_hash":"<128 hex characters>"}
  ]
}

GET /v1/capsulefiles/:id

Response (200): the Capsulefile record with its env vars decrypted (for the admin and developer roles, when it still has its key; viewers and auditors get the stored enc: form), its files, and how many active capsules use it:

{
  "capsulefile": {
    "id": "cf_aB3dE9xQ",
    "name": "med-ai-extraction",
    "status": "finalized",
    "runtime": "python3.12",
    "entrypoint": "python /data/input/capsulefile/main.py",
    "egress_declaration": ["api.anthropic.com"],
    "capsule_memory_mb": 512,
    "env_vars": {"ANTHROPIC_MODEL": "claude-3-5-sonnet-latest"},
    "content_hash": "<128 hex characters>"
  },
  "files": [
    {"file_id":"cff_k2Pq8sLm4nRt","filename":"main.py","size_bytes":1234,"sha256":"<hex>"}
  ],
  "usage": {"active_capsules": 0}
}

Each file's sha256 key holds its SHA-512 digest as 128 hex characters, as in the upload response.

Errors: 404 for a Capsulefile outside your organization. System Capsulefiles are readable by every account.

DELETE /v1/capsulefiles/:id

Delete a Capsulefile and its stored files. Existing AuditProofs that referenced it remain valid — each AuditProof carries its own bound content_hash.

Response (204): no body.

Requires the developer role or above.

Errors: 403 below the developer role; 404 for a Capsulefile outside your organization or a system Capsulefile; 409 resource_conflict if active capsules still reference this Capsulefile.


AuditProofs and AuditRecords

GET /v1/capsules/:id/cdp

Retrieve the full AuditRecord for a capsule. Authenticated.

Response (200): the full AuditRecord as documented in the AuditProof specification.

GET /v1/capsules/:id/cdp/verify

Retrieve the canonical AuditProof document. Public endpoint (no auth) — rate limited to 30 / min / IP.

Response (200): by default, the canonical verifiable document — the same document the destroy response returns as cdp, carrying the top-level 8-step chain, final_hash, attestation, and destroyed_at. This is the artifact to feed the offline verifiers: the nanorix-verify CLI, the SDK verifier modules, and the browser verifier at verify.nanorix.io.

?format=presentation: returns the summary projection instead — the same Ed25519 attestation, with the activity trail and per-step chain replaced by aggregate summaries (destruction, document_hash, verify). The projection carries no per-step chain, so offline verifiers reject it by design; it verifies only through POST /v1/verify. The projection keeps the stored proof's cdp_version, and a 2.1 / 2.2 projection takes the reduced-scope path. A stored proof that declares cdp_version 2.0 is a retired format and is not re-projected: ?format=presentation returns 400 with an error naming the refusal, and the default response still serves that row as stored. The Python and TypeScript SDK cdp.get() and cdp.verify() request this format, so for a stored 2.0 row they raise a bad-request error; download_auditproof (Python) and downloadAuditProof (TypeScript) fetch the document as stored.

Note: the canonical document includes the capsule's activity trail. The route needs no authentication, and the capsule ID is the only thing a caller must know, so treat the capsule ID as access to the full proof. The presentation form (?format=presentation) leaves the activity trail out but trades away offline verifiability.

GET /v1/proofs/:capsule_id

Retrieve the stored AuditRecord for a destroyed capsule. Authenticated; must own the capsule.

Response (200):

{
  "proof_id":"prf_...",
  "capsule_id":"cap_...",
  "cdp":{...},
  "component_proofs":{},
  "verified":true,
  "created_at":"2026-...Z"
}

verified is stored when the service issued the record: whether the destroy's own checks held then (zero state reached, the destruction validated, and the forensic check complete). It is not a check of the record's signature or key, and not a check made for this caller. To check the record yourself, verify cdp offline with nanorix-verify <proof.json> --trust-chain <key-list.json> --identity-fingerprint <pin>, or add ?walk_chain=true: the response's chain_verification.status is verified only when every proof in the chain checked and its key is the key the published manifest lists for it; not_anchored when the list holds no key for the link's authority_id and signing_key_version, the list is a hybrid list, or no list is loaded; failed when the list refuses the link (its authority is revoked, or its carried key is not the key the list holds for its authority and version) and for every other check. A link the list refuses carries error key_refused, refused_capsule_id and reason. A walk that reaches a stored 1.0 parent reads failed with parent_not_found.

Errors: 401 invalid_api_key, 404 resource_not_found (capsule not yet destroyed, or you don't own it).

GET /v1/keys/:id

Retrieve the Ed25519 public key used to sign a specific AuditProof, by the attestation.key_id the proof carries. Public endpoint, no auth. Hosted proofs are signed by the authority key nrx-kms-v1 (authority us-kms-nanorix-v1), so lookups resolve to that one record until the key rotates.

Response (200):

{
  "key_id":"nrx-kms-v1",
  "algorithm":"Ed25519",
  "public_key":"k14hxzgc34OAXLi+3x1ckvO18jzDmNjWfKHopTTVVEc=",
  "created_at":"2026-04-14T07:32:48.653244Z"
}

The public_key is raw base64 (no base64: prefix) for direct decode by verifiers. The response carries no authority fields: the proof itself names its authority_id and signing_key_version, and that pair resolves against the published trust-chain manifest (the offline verifier's --trust-chain path), which is the anchored check — this endpoint only tells you the key is one Nanorix registered.


Stateless verification

POST /v1/verify

Verify an AuditProof JSON document. Public endpoint, no auth, 60 / min / IP.

Request: the AuditProof document, verbatim, under cdp (any of 1.0, 2.0, 2.1, 2.2; the full document or the verification_cdp summary projection):

{"cdp":{"cdp_version":"2.2","chain":[...],"final_hash":"sha512:...","attestation":{...},"...":"..."}}

Response (200):

{
  "valid": true,
  "checks": {
    "cdp_version_valid": true,
    "chain_integrity": true,
    "final_hash_valid": true,
    "step_count": 8,
    "signature_valid": true,
    "algorithm": "Ed25519",
    "verification_scope": "trust_chain_anchored: the signing key resolved to an authority in this service's published trust-chain manifest, which verified against its pinned identity fingerprint, and the signature verified against that key (stage 8). This establishes which published authority's key produced the signature over the signed message (the final chain hash for a 1.0 proof, and for 2.1 and 2.2 the canonical-view hash recomputed from the document's fields); content that message does not cover is not attested by the signature, and the signature does not by itself establish that the events the document describes occurred."
  },
  "verified_at": "2026-...Z"
}

How the document is checked. A full 2.1 / 2.2 document runs the same eight-stage ladder as the offline nanorix-verify CLI. On the Evaluation Sandbox the service anchors it to its published trust-chain manifest (/.well-known/trust-chain.json, verified against the identity fingerprint published beside it) when the document's authority_id is one the manifest carries; a key version the manifest does not hold is refused. A 2.1 or 2.2 document that names an authority the manifest does not carry is checked against the key embedded in the document (integrity only): when its checks hold it answers valid: false with no failure_reason, and checks.verification_scope says so. 1.0 documents run the same ladder, under the manifest whatever authority they name (a 1.0 signature does not cover authority_id), so one whose other checks hold and that names an authority the manifest does not carry is refused as signing_key_version_unknown; a 1.0 document is never anchored: its signature covers final_hash alone. 2.0-labelled documents are checked against the embedded key only. The ladder requires the step at each position to carry the canonical subsystem for that position (eee_namespace through capsule_destroy), so a document with swapped, repeated or relabelled steps fails the chain walk. cdp_version 2.0 is a retired format that the offline verifiers refuse; this endpoint keeps a check for 2.0 documents already delivered, and every 2.0-labelled document goes to it unless it carries a customer_declared_activity_root, which is refused first as unsigned_field_populated. A full 2.0 document's checks cannot hold: it lacks the fields the 2.0 check requires and is reported as step_count_invalid; only a document carrying the summary fields that check requires, as a 2.0 projection does, can pass that check, and it is still never valid: true. A 2.1 / 2.2 verification_cdp projection is checked on a reduced path (Ed25519 over its declared document_hash and the chain terminus reproduced), and the scope says so, including that the signature binds the declared document_hash, with one leading sha512: prefix removed if present, and nothing else on the projection. A 2.0 projection takes the 2.0 check instead: a verdict whose checks hold carries a declared_hash_only: scope and is valid: false, the signature is checked over the declared document_hash string and that string is all it covers, and the chain is compared as the string 8/8 steps (or the legacy 8/8 form), not verified. A 2.0 verdict is never anchored.

valid: true means anchored. Only a verdict whose checks.verification_scope begins trust_chain_anchored: is valid: true: the signing key was resolved against the published trust chain. When the document's checks hold under any other prefix, embedded_key_integrity:, stripped_projection: or declared_hash_only:, the verdict is integrity only: valid is false, failure_reason is absent, and the scope says what was checked. Earlier builds of this service answered valid: true on those documents, with the same scope, and older builds could answer valid: true with no scope; read the prefix; do not match the full sentence. A BYOC deployment's own key, a self-hosted install and a key you have not established trust in all look the same to this endpoint, so it cannot tell them apart. Nanorix does not hold such a key, and what anchors each differs. This release does not start with an install signing authority until the hybrid signer ships; until then a self-hosted proof, BYOC included, names a Nanorix authority and no key list anchors it. Once that signer ships, a proof under a customer's own authority is anchored with the key list the customer signs for that authority with its own offline identity key, which can come by any private route, and that key's fingerprint, which comes through at least two channels that neither the customer's servers nor Nanorix control. The customer gives both to its assessor and, if it has one, its client, and publishes neither. A key you have not established trust in is anchored only when its holder gives you a list and fingerprint the same way (nanorix-verify <proof.json> --trust-chain <key-list.json> --identity-fingerprint <pin>). The embedded_key_integrity: scope also appears if the service could not load its own manifest; no document is then anchored. A verdict with a failed check carries no scope, except that a verdict from the stripped-projection path carries its stripped_projection: scope whether its checks hold or not. There is no separate top-level field for this; valid and the scope string are the signal.

When a check fails, valid is false, the failing booleans are false, and the typed reason is in failure_reason:

{
  "valid": false,
  "checks": {
    "cdp_version_valid": true,
    "chain_integrity": true,
    "final_hash_valid": true,
    "step_count": 8,
    "signature_valid": false,
    "algorithm": "Ed25519"
  },
  "failure_reason": {"type": "signature_mismatch", "reason": "does_not_verify"},
  "verified_at": "2026-...Z"
}

failure_reason follows a closed-set failure-reason enum — the same enum returned by the offline verifiers, byte-equivalent across implementations. The type values are snake_case.

A declared signature_algorithm (or attestation.algorithm) other than Ed25519, or a signing_mode other than nanorix_only, on a full 2.1 / 2.2 document is reported as {"type": "algorithm_unsupported", "found": "<algorithm>"} or "found": "signing_mode=<mode>", with signature_valid: false and cdp_version_valid: true. Earlier builds never read the declared algorithm, so such a document could come back valid: true, and they reported an unrecognised mode as cdp_version_valid: false (a dual_signature document as signature_valid: false alone, a tee_attested document as chain_integrity: false); clients must now expect algorithm_unsupported. See Verification for the full table of response classes.

The submitted AuditProof is verified and discarded; it is not stored. One side effect exists: a valid: true verdict, which only an anchored verdict is, for a capsule_id that matches a proof this service holds dispatches a cdp.verified webhook event to the owning organisation's subscribed endpoints. Its payload carries no caller IP address. Each delivery, payload included, is recorded as a row in the owner's webhook delivery log.


Egress profiles

Egress profiles let you define named domain/IP allowlists for outbound traffic from your capsules. Developer, Team and Enterprise accounts can create profiles and add rules; the API refuses that on a Free account. Naming a profile on a capsule create (egress_profile) is for Team and Enterprise accounts. On a Developer account, a capsule created without one runs under the account's profile when the account has exactly one profile and that profile has rules. On your own install with billing off (no Stripe credentials) no tier gates them: every organization can register profiles and rules, with no Nanorix-imposed count limit.

Every call that changes a profile or a rule (each POST, PUT and DELETE below) is for organization admins only; another member gets 403. The GET calls are open to every member of the account.

POST /v1/egress/profiles

Create a profile. Authenticated; organization admins only. The API refuses it on a Free account (403), and once the account holds as many profiles as its tier allows (403): on a Developer account it refuses a second profile; Team and Enterprise accounts can create more. name is 1 to 64 characters of lowercase letters, digits, - and _; any other name is refused with 400.

Request:

{"name":"med-ai-egress","description":"Allowlist for clinical extraction"}

Response (201): {"id":"ep_...","name":"med-ai-egress","description":"...","rule_count":0,"created_at":"...","updated_at":"..."}

GET /v1/egress/profiles

List profiles. Response (200): a JSON array of profiles, each as POST /v1/egress/profiles returns it, with its current rule_count.

GET /v1/egress/profiles/:id

Get profile + rules. Response (200):

{
  "id":"ep_...","name":"med-ai-egress","description":"...","rules":[
    {"id":"egr_...","domain_pattern":"api.anthropic.com","port":443,"description":null,"created_at":"..."}
  ],
  "created_at":"...","updated_at":"..."
}

PUT /v1/egress/profiles/:id

Update profile name/description. Organization admins only; the API refuses it on a Free account (403). A new name follows the same rule as on create, and a name another profile of the organization already holds is refused with 409 resource_conflict; a rename to the profile's own name is accepted. Response (200): the profile, as POST /v1/egress/profiles returns it.

DELETE /v1/egress/profiles/:id

Delete profile. Organization admins only. Response (200): an empty body. Errors: 409 resource_conflict if active capsules reference it.

POST /v1/egress/profiles/:id/rules

Add a rule. Authenticated; organization admins only. The API refuses it on a Free account (403), and refuses a rule past the tier's per-profile rule limit (403).

Request:

{"domain_pattern":"api.anthropic.com","port":443,"description":"Model API"}
  • domain_pattern (required): an exact host name (api.anthropic.com), a leading-dot wildcard with at least two labels after the dot (.anthropic.com covers its subdomains), or a public IP address written in plain form. The API refuses with 400: values longer than 253 characters, single-label names, names whose last label is a number, names with a character other than letters, digits, -, _ and . (so no CIDR ranges, ports or schemes), loopback and cloud metadata names and wildcards covering them, and loopback, link-local, metadata, unspecified, multicast, broadcast, reserved and documentation addresses. Private addresses are refused unless the deployment allows private destinations.
  • port (optional): 1 to 65535; 443 when omitted.
  • description (optional): free text.

Response (201): {"id":"egr_...","domain_pattern":"api.anthropic.com","port":443,"description":"Model API","created_at":"..."}

GET /v1/egress/profiles/:id/rules

List rules in a profile.

DELETE /v1/egress/profiles/:id/rules/:rid

Remove a rule. Organization admins only. Response (200): an empty body.

Backwards-compatible flat endpoints

Nanorix retains pre-profile-feature endpoints for forever-stability:

  • GET /v1/egress — list all rules flat.
  • POST /v1/egress — add a rule to the organization's profile named default. When the organization has no profile of that name, the call creates it only while the organization holds fewer profiles than its tier allows; once it holds as many, the call is refused with a 403 (tier_required) and nothing is created. It takes the same request body as POST /v1/egress/profiles/:id/rules. Organization admins only; the API refuses it for an organization on Free (403). The tier's rule limit here counts every rule the organization has, across all its profiles; it is checked first, and a call refused at that limit creates no profile either.
  • DELETE /v1/egress/:id — remove rule by id. Organization admins only. Response (200): an empty body.

Webhooks

See the full webhooks integration guide. API surface:

Creating, updating, deleting and testing an endpoint, rotating its secret, and the two dead-letter queue calls are for organization admins only; another member gets 403. The GET calls on endpoints and their deliveries are open to every member of the account.

POST /v1/webhooks

Register an endpoint.

Request: {"url":"https://...","events":["cdp.generated","capsule.failed"],"description":"..."}

Response (201): {"id":"wh_...","url":"...","events":[...],"description":"...","active":true,"secret":"<64 hexadecimal characters>","created_at":"...","updated_at":"...","consecutive_failures":0}

The secret is returned only here and, as a new secret, by POST /v1/webhooks/:id/rotate-secret; the list, get and update responses give secret: null. It is shown once. Save it. HMAC-SHA256 verification recipes are in integrations/webhooks.md.

GET /v1/webhooks

List endpoints.

GET /v1/webhooks/:id

Get one endpoint.

PUT /v1/webhooks/:id

Update url / events / description / active status.

DELETE /v1/webhooks/:id

Delete an endpoint.

POST /v1/webhooks/:id/test

Send a test event. Response: success, delivery_id, and either status (the HTTP status your endpoint answered) or error (why the test request could not be sent or completed). delivery_id is the id carried in the test event sent to your endpoint; a test is not recorded as a delivery, so it never appears in the deliveries list or the dead-letter queue. An endpoint URL the outbound check refuses answers 400, and a server-side failure answers 500, each with the error envelope.

GET /v1/webhooks/:id/deliveries

List the 50 most recent deliveries, newest first, in any state. Each entry returns id, event_type, response_status, attempt, delivered_at, failed_at and created_at.

Failure handling

A delivery gets five attempts in total, sent about 5 seconds, 5 minutes, 30 minutes and 2 hours apart. After the fifth failed attempt it moves to a dead-letter queue, which GET /v1/webhooks/dlq lists and POST /v1/webhooks/dlq/:id/replay sends again; both require the admin role. After 10 consecutive failed attempts an endpoint is turned off (active: false). See integrations/webhooks.md for the full schedule and how to turn an endpoint back on.


SCIM provisioning

Your identity provider (Okta, Microsoft Entra ID, OneLogin) can create and deprovision your organization's members through SCIM 2.0 at /scim/v2 (Users; Groups is a stub). Errors use the SCIM error body (application/scim+json), not the error envelope.

Ordinary API keys no longer work for SCIM. SCIM accepts only a SCIM provisioning token. A request with an API key, of any role, answers 401 with "API keys are no longer accepted for SCIM. Issue a SCIM provisioning token with POST /v1/scim-tokens and use it in your identity provider."; a revoked or unknown provisioning token answers 401 with "Invalid or inactive provisioning token.". If your identity provider holds an API key for SCIM today, issue a provisioning token, paste it into the identity provider in place of the key, and then revoke the key if nothing else uses it.

POST /v1/scim-tokens

Issue a provisioning token. Admin role only; on paid tiers the admin must have MFA enabled.

Request: {"name":"Okta"}

Response (201): {"id":"...","name":"Okta","token":"nrx_scim_...","token_prefix":"nrx_scim_...","created_at":"..."}

The token is shown once. Paste it into your identity provider as the SCIM bearer token. The platform API refuses it, so it can only provision. An organization holds at most 2 active tokens (409 beyond that), so you can issue a new one, switch the identity provider over, then revoke the old one.

GET /v1/scim-tokens

List the organization's tokens, active and revoked, with token_prefix, created_by, created_at, last_used_at and revoked_at. Admin role only. The token itself is never returned again.

DELETE /v1/scim-tokens/:id

Revoke a token. Admin role only. The identity provider's next SCIM call with it answers 401.

A token belongs to the organization, not to the admin who issued it, and keeps working after that admin is removed or deprovisioned; so do the webhook endpoints a member registered. When an admin leaves, rotate the organization's SCIM tokens (GET /v1/scim-tokens shows created_by) and review its webhook endpoints.

Deprovisioning

PATCH /scim/v2/Users/{id} with active: false, a PUT with active: false, or DELETE /scim/v2/Users/{id} ends the member's access to the organization at once. Its API keys are revoked, its sessions end, and password sign-in, password reset and single sign-on refuse it. Invitations it sent that are still open are cancelled. Its capsules, AuditProofs and other records stay with the organization. active: true restores password and single sign-on sign-in; revoked API keys stay revoked, so the member issues new ones, and an API key or refresh token written while the member was deprovisioned is revoked at reactivation. A session (15 minutes), an MFA-pending token (5 minutes) or a password-reset link (60 minutes) issued shortly before deprovisioning works again after reactivation, until it expires. The organization owner and the organization's last active admin cannot be deprovisioned (400, scimType: invalidValue). A member removed through DELETE /v1/team/{id} answers 404 to SCIM, so a sync from the identity provider cannot bring it back.


Customer account

POST /v1/signup

Self-service signup. Public, 10 / min / IP. On your own install it is off unless the operator turns it on (NANORIX_SIGNUP=open, or signup.mode: open in the Helm chart); off, it answers 403 signup_disabled and creates nothing, and the operator creates organizations with nanorix-api create-organization (see Self-hosting).

Request: {"email":"[email protected]","jurisdiction":"US"}

jurisdiction is required, one of US, EU, UK, CA, AU, IN, OTHER, accepted in any letter case and stored upper-cased. Customer-declared, never inferred. A body without it, or with another value, answers 400 invalid_parameters naming the accepted values and creates no account. A value that is not a string is refused with 400 invalid_parameters as a JSON type error, whose message does not list the accepted values.

Response (201):

{
  "api_key":"nrx_live_...",
  "customer_id":"...",
  "email":"...","tier":"free",
  "limits":{"capsules_per_month":100,"max_lifetime_seconds":300,"concurrent_capsules":3,"rate_limit_rpm":20},
  "warning":"Store this API key securely — it will not be shown again."
}

With signup open on an install with billing off, capsules_per_month, concurrent_capsules and rate_limit_rpm are null and max_lifetime_seconds is the server's lifetime ceiling.

POST /v1/auth/signup

Console signup with email and password. Public, limited per client IP. Off on your own install unless the operator turns it on, with the same 403 signup_disabled as POST /v1/signup.

Request: {"name":"...","email":"[email protected]","password":"...","company_name":"...","jurisdiction":"EU"}

jurisdiction takes the same values as POST /v1/signup: US, EU, UK, CA, AU, IN, OTHER, in any letter case. Customer-declared, never inferred, and required: a body without it, or with an unknown value, answers 400 invalid_parameters naming the accepted values and creates no account. The Console's signup form always asks for it. Members who join the organization later (team invitation, SSO sign-in, SCIM provisioning) take the organization's value; such an arrival is refused with 409 when the organization can no longer take new members, and an existing account's join through an invitation is refused while that account still has members, open invitations or single sign-on of its own.

Response (201): an access token, a refresh token and the new account's profile.

GET /v1/customers/me

Get your account, usage, limits.

Response (200):

{
  "customer_id":"...","email":"...","tier":"free","role":"admin","jurisdiction":"US",
  "limits":{"capsules_per_month":100,"max_lifetime_seconds":300,"concurrent_capsules":3,"rate_limit_rpm":20},
  "usage":{
    "capsules_used_this_month":5,
    "cdps_this_cycle":5,
    "cdp_limit":100,
    "billing_cycle_start":"2026-...Z"
  },
  "created_at":"2026-...Z"
}

cdp_limit is 100 for Free tier and null (unlimited) for Developer / Team / Enterprise and on an install with billing off. On such an install capsules_per_month, concurrent_capsules and rate_limit_rpm are null as well: no account limit applies to them there, but the server's own capsule count still limits how many capsules run at once, so a null concurrent_capsules does not mean unlimited, and the API still applies a request rate of the server's own. There max_lifetime_seconds is the server's lifetime ceiling. role is the caller's role in its organization: admin, developer or viewer.

PATCH /v1/customers/me

Change your organization's declared jurisdiction. Admin only.

Request: {"jurisdiction":"EU"}

Every account in your organization takes the new value, so the organization has one. The response is the GET /v1/customers/me body showing it.

An AuditProof takes capsule_context.jurisdiction, and the frameworks its regulatory_context lists, from the account that destroys the capsule (or retries its signing), read at that moment. A destroy the service starts at the end of a capsule's lifetime or at shutdown reads the account that created the capsule; one it starts because an exec was refused reads the account that sent the exec. AuditProofs produced after the change carry the new value, including those for capsules created before it. AuditProofs already produced do not change. The new value also decides the signed jurisdiction of capsules created after the change that name none; a capsule created before the change keeps the signed jurisdiction resolved when it was created.

Status When
200 Changed.
400 invalid_parameters jurisdiction is missing or not one of US, EU, UK, CA, AU, IN, OTHER. Nothing changes.
403 tier_required Your role is not admin. Nothing changes.

POST /v1/contact

Submit a contact form. Public, 5 / min / IP.

Request: {"email":"...","name":"...","company":"...","message":"...","source":"pricing_page"}

Response (200): {"status":"received"}


Billing

POST /v1/billing/checkout

Upgrade tier through Stripe Checkout. Authenticated.

Request:

{"tier":"developer"}

tier accepts both external (developer, team) and internal (starter, business) names per the tier-naming split. Enterprise contracts go through [email protected] rather than self-service Checkout.

Response (200):

{"checkout_url":"https://checkout.stripe.com/..."}

The Checkout URL expires in 24 hours. After successful payment, your account tier updates within ~10 seconds via the Stripe webhook.

Response (409): an identical checkout request for your account is still being created. Retry in a few seconds.

POST /v1/billing/webhook

Stripe webhook receiver. HMAC-verified. Not customer-callable; documented for transparency.


Health and ops

GET /v1/health

Response (200): {"status":"healthy","version":"1.0.0","timestamp":"2026-08-07T00:00:00Z"}

GET /v1/health/ready

Readiness probe. Returns 200 only when DB connectivity is healthy; 503 otherwise.

The response also reports capsule_runtime: verified (the startup isolation self-test held), disabled (the operator set NANORIX_CAPSULE_RUNTIME to a value other than enabled, which is read in any letter case with surrounding whitespace ignored; unset or empty leaves execution on, while a value made only of whitespace turns it off) or unavailable (the self-test refused on a host that declares itself development). It describes the startup posture and never makes the instance unready.


Error envelope

Every error response uses the same envelope:

{
  "error": {
    "type": "<category>",
    "code": "<machine_code>",
    "message": "<human>",
    "doc_url": "https://docs.nanorix.io/errors/<code>",
    "request_id": "req_018f5b8e-...",
    "retry_after": 30
  }
}

request_id is also returned in the X-Nanorix-Request-Id response header (every request — success or error). Quote it when filing support tickets.

The envelope has exactly these fields, except that 503 auditproof_signing_unavailable adds capsule_id, status, signing_request_id, retry_signing_url and pause_window_expires_at. For the 422 errors, details such as the rejection reason or an input hash appear inside message, not as separate fields. retry_after is present only on 429 rate_limited, 409 idempotency_key_in_use, 503 db_pool_circuit_open, 503 capsule_capacity_reached and 503 bundle_memory_busy. See the error catalog. doc_url has the form shown, but the per-code path does not serve a separate page; the section for each code is https://docs.nanorix.io/errors/#<code>.

Closed-set error codes

HTTP Code Category
400 invalid_parameters invalid_request_error
400 capsule_memory_exceeds_server_limit invalid_request_error
401 invalid_api_key authentication_error
402 quota_exceeded quota_error
403 mfa_required mfa_required
403 mfa_enrollment_required mfa_enrollment_required
403 tier_required forbidden
403 session_required forbidden
404 resource_not_found not_found
409 resource_conflict conflict_error
409 idempotency_key_conflict idempotency_error
409 idempotency_key_in_use idempotency_error
410 capsule_expired capsule_error
413 payload_too_large invalid_request_error
422 input_provenance_rejected input_provenance_error
422 secrets_injection_rejected secrets_injection_error
422 region_mismatch region_mismatch_error
422 execution_mode_mismatch execution_mode_mismatch_error
429 rate_limited rate_limit_error
500 internal_error api_error
503 db_pool_circuit_open service_unavailable
503 isolation_unavailable service_unavailable
503 capsule_capacity_reached service_unavailable
503 bundle_memory_busy service_unavailable
503 boundary_issuance_paused service_unavailable
503 auditproof_signing_unavailable service_unavailable
503 console_origin_not_configured service_unavailable
503 api_base_url_not_configured service_unavailable

Each code is documented in the error catalog with cause + customer-side fix.


Rate limiting and retries

429 responses include a Retry-After header (seconds) and a retry_after field inside the body's error object. The Python and TypeScript SDKs retry a GET, a HEAD, and a capsule or Capsulefile create carrying a well-formed Idempotency-Key (see Idempotency below) automatically on 429, 500, 502, 503 and 504, and on timeouts and transport errors: up to 3 retries (4 attempts in all). Any other request (exec, upload, record commit, destroy and the rest) is sent again only when its connection failed before the request was sent, or after a 429 on /v1/capsules, /v1/capsulefiles or a path under them; otherwise it raises at once, and the error says the request may have reached the server and was not sent again. They do not retry a 503 auditproof_signing_unavailable either, and its error carries no such note: the request already ran, and repeating it is refused with 409 (see its section). On a 429 they wait the Retry-After value; otherwise they back off exponentially from 0.5 seconds with up to 50% added jitter. The Go SDK does not retry. For raw HTTP integrations the retry recipe is:

attempt n: wait retry_after seconds when the response carries it, else 2^n + random(0,1) seconds
abort after 3 retries

Client-side timeouts: recommend ≥30s for capsule create, ≥120s for capsule exec, ≥60s for AuditProof verification; the actual wall-clock cap is the per-capsule TTL.


Idempotency

Two endpoints accept an Idempotency-Key header, 1 to 255 characters of A-Z, a-z, 0-9, _ and - (a UUID fits):

  • POST /v1/capsules (capsule create)
  • POST /v1/capsulefiles (Capsulefile create)

Keys belong to the user whose API key sends them. A replay with the same key and the same body, byte for byte, within 24 hours returns the first response's status and body without running the request again, with the header Idempotent-Replayed: true; the same key with a different body answers 409 idempotency_key_conflict. Only a successful (2xx) JSON response is kept, so a retry after an error runs the request again. A request with the same key and the same body while the first has not answered does not run and answers 409 idempotency_key_in_use with a Retry-After header: the first started less than 15 minutes ago and may still be running, or may have stopped without an answer. A first request whose client disconnects keeps running on the server until it answers or the server stops; its successful response is recorded when it answers. Retried after that, a request receives the first response once it is recorded, unless the first is still running, or stopped without an answer, 15 minutes after it started, when the key is free and the retry runs. If a database error stops the service from recording the key, it answers 503 db_pool_circuit_open with Retry-After and does not run the request. With the header, a request body over 1,048,576 bytes answers 413 payload_too_large before the key is recorded, and a successful response over that size is returned but not kept. Every other endpoint ignores the header, POST /v1/capsules/:id/exec, POST /v1/capsulefiles/:id/finalize and POST /v1/billing/checkout among them.


Service-unavailable responses

A 503 from the API's JSON endpoints carries one of the codes below, and they behave differently. The readiness probe GET /v1/health/ready has one more form: when its own database check fails it answers 503 with {"status":"unhealthy","message":"Service unavailable"}, with no error envelope and no code. While the database circuit breaker is open the request is refused before the probe runs, like every other endpoint, and the response is the standard envelope with code db_pool_circuit_open.

db_pool_circuit_open means the service's database circuit breaker is open: the request was refused before it ran. It carries retry_after and a Retry-After header; retry after that many seconds. The same code is returned when single sign-on is temporarily unavailable.

{
  "error":{
    "type":"service_unavailable",
    "code":"db_pool_circuit_open",
    "message":"Service temporarily unavailable; please retry after the specified duration.",
    "doc_url":"https://docs.nanorix.io/errors/db_pool_circuit_open",
    "request_id":"req_...",
    "retry_after":15
  }
}

The Python and TypeScript SDKs retry a 503 on a GET, a HEAD or a create carrying a well-formed Idempotency-Key with their own backoff (they honour Retry-After only on a 429); other requests raise at once; the Go SDK does not retry.

isolation_unavailable means this request ran no capsule command: the operator turned execution off, the startup isolation self-test refused, or the runtime refused one capsule's isolation setup at exec time. It carries no Retry-After header. For the first two causes, which concern the whole deployment, retrying does not help until the operator changes the deployment. The third concerns one capsule on a deployment that otherwise runs commands, so a retry may succeed, with a different capsule configuration or once a momentary resource shortage on the host has cleared. See the error catalog.

capsule_capacity_reached means the API server that took the request is already running the most capsules it admits at once, so no capsule was created, no usage was counted and no AuditProof will exist for the request. It carries retry_after (30) and a Retry-After header. A slot frees when a capsule on the server is destroyed or reclaimed after its max_lifetime_seconds, so a retry after retry_after seconds can succeed; destroying capsules you no longer need frees slots sooner. The same code also answers an upload that fits under the capsule's memory limit, or a capsule create whose Capsulefile's files fit under the limit the capsule would get, while the memory the server's capsules share has no room now: the message says no capsule was created and no file was written, with no byte count, and a create refused this way created nothing and counted no usage; on a create it is answered after authentication, the execution switch, MFA, the egress profile and the Capsulefile's own 404, 409 and 422, and before 402 quota_exceeded, the capsule count and the 400 checks of the memory the capsule asks for. See the error catalog.

bundle_memory_busy is returned only by POST /v1/capsulefiles/:id/bundle: other bundle uploads on the API server that took the request hold the bundle memory this bundle needs now, or every one of its 32 bundle extraction slots, so the bundle was not stored. No file row was written, and objects the upload had already stored are deleted. It carries retry_after (5) and a Retry-After header; room frees as the other uploads end, so a retry of the same bundle after that many seconds can succeed. See the error catalog.

boundary_issuance_paused is returned only by POST /v1/capsules/:id/boundary-attestations; do not retry it. See the error catalog.

No other fields are added to the 503 envelope. The envelope has no degradation_mode field.

A 503 from the sealed LLM-provider proxy can also be the provider's own: the status code and body are the provider's, except that a JSON error body with an error object gains a request_id. A response that carries an X-Nanorix-AuditProof-Id header came from the provider; a Nanorix error uses the envelope above and has no such header.


Cross-references

Forever-Standard discipline. Every field above is permanent. New fields arrive as additive extensions; new endpoints are additive. The request_id / trace_id discipline plus the closed-set failure-reason enum are the structural contract that makes "evidence outlives Nanorix" possible.