DelegusDocsv0.2

Docs/API

Reference

API reference

Delegus API 0.2: 61 operations. Rendered from the API's OpenAPI document, which a test in the API's own suite checks against the live router, so this page and the service cannot disagree.

Source openapi.json · sha256 3712582c3eaafdc0763b6ec345de4a5790cb28c01d06d022ce2f5431bc347c37 · servers https://api.delegus.ai https://api.dev.delegus.ai

Availability. The production API at api.delegus.ai is serving. Sign up for a verify key: the sandbox is free with no card, and production starts with a 14-day free trial; the quickstart walks through your first signed decision. The sandbox on this site runs on a development environment, where nothing is a production identity.
Authentication. Bearer tokens. rpKey is a relying-party key and resolves to the RP DID; principalKey is issued to a company at onboarding; adminToken is Delegus's own. Public routes need none. Errors are { error, message }; a DENY is not an error, it is a signed receipt with HTTP 200.

Verify#

The one call a relying party makes (§5).

POST /verify#

rpKey

Evaluate a Grant, Proof and Action; returns the signed Receipt

Request body · VerifyRequest

FieldTypeDescription
grant requiredstringGrant compact JWS as received in Delegus-Grant.
proof requiredstringProof compact JWS as received in Delegus-Proof.
action requiredAction

Responses

StatusBodyMeaning
200ReceiptThe Receipt, decision ALLOW or DENY
400ErrorMalformed envelope (strings inside it are the engine's business and yield a DENY receipt)
401ErrorUnknown or non-RP API key
402ErrorProduction checks need a plan for this account (error PLAN_REQUIRED). An access refusal before evaluation, like 401 or 429: no receipt and no DENY reason, and the proof is not spent. Sandbox checks are never refused this way.
413ErrorBody over 64 KB
503ErrorBacking service unavailable before or after evaluation

Principal#

Grant lifecycle, agents and keys; authenticated as the issuing Principal.

POST /revoke#

principalKey or orgKey

Revoke a Grant (§7); idempotent; success only once visible everywhere

Parameters

NameInTypeDescription
principalqueryDidWeborg:admin keys: the member Principal to act for (required for them; a Principal key acts only for itself)

Request body · RevokeRequest

FieldTypeDescription
grant_id requiredstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$

Responses

StatusBodyMeaning
200RevokeResponseOK
400ErrorBad grant_id
401ErrorNot a Principal key
404ErrorNot this Principal's Grant
503ErrorRevocation recorded but not yet visible; retry

GET /grants#

principalKey or orgKey or adminToken

Grants allocated by a Principal (ids, agents, status entries, revocation), newest first

Parameters

NameInTypeDescription
principalqueryDidWeborg keys: one member Principal (default: all of them); admin: any
agentqueryDidKey
statequery"active" | "revoked"
limitqueryinteger
cursorquerystringnext_cursor from the previous page

Responses

StatusBodyMeaning
200GrantListOK
400ErrorBad filter
401ErrorUnauthorized
404ErrorNamed Principal is not a member

POST /grants#

principalKey

Reserve a Grant id and its Delegus-signed status entry

Request body · GrantAllocationRequest

FieldTypeDescription
agent requiredstring
pattern ^did:key:z6Mk

Responses

StatusBodyMeaning
201GrantAllocationAllocated
400ErrorBad agent DID
401ErrorNot a Principal key
409ErrorAgent is disabled

POST /agents#

principalKey or orgKey

Register an Agent (inventory; not consulted by /verify)

Parameters

NameInTypeDescription
principalqueryDidWeborg:admin keys: the member Principal to act for (required for them; a Principal key acts only for itself)

Request body · AgentRequest

FieldTypeDescription
did requiredstring
pattern ^did:key:z6Mk

Responses

StatusBodyMeaning
201AgentRegistered
400ErrorBad DID
401ErrorNot a Principal key
409ErrorAlready registered

POST /agents/{did}/disable#

principalKey or orgKey

Kill switch: revoke every Grant naming the Agent

Parameters

NameInTypeDescription
did requiredpathstring
principalqueryDidWeborg:admin keys: the member Principal to act for (required for them; a Principal key acts only for itself)

Responses

StatusBodyMeaning
200AgentDisabledOK
401ErrorNot a Principal key
404ErrorNot this Principal's Agent

POST /keys/{kid}/compromise#

principalKey or orgKey

Mark a Principal key compromised (§11)

Parameters

NameInTypeDescription
kid requiredpathstringURL-encoded DID URL
principalqueryDidWeborg:admin keys: the member Principal to act for (required for them; a Principal key acts only for itself)

Responses

StatusBodyMeaning
200KeyCompromisedOK
401ErrorNot a Principal key
403ErrorNot this Principal's key
404ErrorUnknown key

POST /keys/{kid}/retire#

principalKey or orgKey

Retire a Principal key (§11 rotation): existing Grants stay valid to validUntil; new Grants must use an active key

Parameters

NameInTypeDescription
kid requiredpathstringURL-encoded DID URL
principalqueryDidWeborg:admin keys: the member Principal to act for (required for them; a Principal key acts only for itself)

Responses

StatusBodyMeaning
200KeyRetiredRetired (idempotent; a compromised key stays compromised)
401ErrorNot a Principal key
403ErrorNot this Principal's key
404ErrorUnknown key

GET /principals#

rpKey or principalKey or orgKey or adminToken

Principal directory: who is registered and verified, since when, with which keys (any live key or admin)

Parameters

NameInTypeDescription
kindquery"managed" | "hosted"
statequery"verified" | "unverified"
org_idqueryOrgIdthat org's keys or admin only
limitqueryinteger
cursorqueryDidWebnext_cursor from the previous page (ascending DID order)

Responses

StatusBodyMeaning
200PrincipalDirectoryOK
400ErrorBad filter
401ErrorNo live key and no admin token
403Errororg_id filter by a key of another subject

GET /principals/{did}#

principalKey or adminToken or orgKey or rpKey

Principal state: the full record with verification instructions for the Principal itself, its org and admin; the directory view for any other live key

Parameters

NameInTypeDescription
did requiredpathstring

Responses

StatusBodyMeaning
200Principal | PrincipalDirectoryEntryOK
401ErrorUnauthorized
404ErrorUnknown Principal

PATCH /principals/{did}#

adminToken

Set the public-naming consent flag (admin)

Parameters

NameInTypeDescription
did requiredpathstring

Request body · PrincipalNamingRequest

FieldTypeDescription
may_be_named requiredboolean

Responses

StatusBodyMeaning
200PrincipalUpdated
400ErrorBad body
401ErrorNot admin
404ErrorUnknown Principal

POST /principals/{did}/verify#

principalKey or adminToken or orgKey

Run domain verification now

Parameters

NameInTypeDescription
did requiredpathstring

Responses

StatusBodyMeaning
200PrincipalOK
401ErrorUnauthorized
404ErrorUnknown Principal

GET /grants/{id}/consumption#

principalKey or orgKey or rpKey or adminToken

Consumable Grants (v0.3): balances and consumption log of a Grant

Parameters

NameInTypeDescription
id requiredpathGrantId
limitqueryinteger
cursorqueryintegernext_cursor from the previous page (a log version)

Responses

StatusBodyMeaning
200GrantConsumptionOK
400ErrorBad cursor
401ErrorUnauthorized
404ErrorUnknown Grant, or a key without access (RPs see Grants they have verified)

Decisions#

Receipts and Outcome Attestations (§9).

GET /decisions#

rpKey or orgKey or adminToken

List decisions, newest first, with filters and cursor pagination: a relying party's own, an org's relying parties, or any (admin)

Ordered by receipt_id descending. Receipt ids are ULIDs: time-ordered to the millisecond, arbitrary within one millisecond. Cursor pagination is stable under concurrent inserts.

Parameters

NameInTypeDescription
sincequerystring (date-time)evaluated_at ≥ since
untilquerystring (date-time)evaluated_at < until
decisionquery"ALLOW" | "DENY"
reasonqueryReasonCode
principalqueryDidWeb
grant_idqueryGrantId
limitqueryinteger
cursorquerystringnext_cursor from the previous page
rpqueryDidWeborg keys: one member relying party (default: all of them); admin: any
key_idqueryApiKeyIdonly verifies made with this relying-party API key

Responses

StatusBodyMeaning
200DecisionListOK
400ErrorBad filter
401ErrorNo RP key, org key or admin token

GET /decisions/{receipt_id}#

rpKey or orgKey or adminToken

A receipt and its outcome ledger

Parameters

NameInTypeDescription
receipt_id requiredpathstring
rpqueryDidWeborg keys: one member relying party (default: all of them); admin: any

Responses

StatusBodyMeaning
200DecisionOK
401ErrorNo RP key, org key or admin token
404ErrorNot this RP's decision

POST /decisions/{receipt_id}/outcomes#

rpKey or orgKey

Append an Outcome Attestation (§9) (the RP’s own key, or its org’s org:admin key with ?subject=)

Parameters

NameInTypeDescription
receipt_id requiredpathstring
subjectqueryDidWeborg:admin keys: the member relying party named in the receipt (required for them). The ledger records that RP as reporter; the audit log records the org key that acted (action outcome.report).

Request body · OutcomeEvent

FieldTypeDescription
type requiredenum (7)
one of: fulfilled, cancelled, dispute_opened, dispute_resolved, chargeback_received, chargeback_reversed, loss_reported
occurred_at requiredstring (date-time)RFC 3339 UTC
evidence_refstring
notestring
correction_ofstring
pattern ^oat_
reporter_signaturestring
resolution"agent_at_fault" | "agent_not_at_fault" | "indeterminate"required for dispute_resolved
loss_amountintegerrequired for loss_reported; minor units
≥ 0
currencystringrequired for loss_reported
pattern ^[A-Z]{3}$

Responses

StatusBodyMeaning
201AttestationRecorded
400ErrorUnknown type or field, missing required field, bad correction_of
401ErrorNot an RP key
403Errororg:read key, or an RP key naming another subject
404ErrorNot this RP's decision

GET /decisions/export#

rpKey or orgKey or adminToken

Export decisions with their full receipts and outcome ledgers as NDJSON or CSV (same scope and filters as GET /decisions; up to 5000 rows per page, cursor in X-Delegus-Next-Cursor)

Parameters

NameInTypeDescription
sincequerystring (date-time)evaluated_at ≥ since
untilquerystring (date-time)evaluated_at < until
decisionquery"ALLOW" | "DENY"
reasonqueryReasonCode
principalqueryDidWeb
grant_idqueryGrantId
cursorquerystringnext_cursor from the previous page
rpqueryDidWeborg keys: one member relying party (default: all of them); admin: any
key_idqueryApiKeyIdonly verifies made with this relying-party API key
formatquery"ndjson" | "csv"
limitqueryinteger

Responses

StatusBodyMeaning
200application/x-ndjsonRows, newest first. Headers X-Delegus-Rows and X-Delegus-Next-Cursor (empty on the last page).
400ErrorBad filter or format
401ErrorNo RP key, org key or admin token

GET /decisions/stats#

rpKey or orgKey or adminToken or observerKey

Decisions and outcomes rolled up per Principal over a range (default: last 30 days)

Parameters

NameInTypeDescription
sincequerystring (date-time)inclusive; default 29 days ago 00:00Z
untilquerystring (date-time)exclusive; default tomorrow 00:00Z
rpqueryDidWeborg keys: one member relying party; admin: any
principalqueryDidWebone Principal

Responses

StatusBodyMeaning
200DecisionStatsOK
400ErrorBad range
401ErrorNo RP key, org key or admin token

Public#

Unauthenticated: evidence by hash (§8), status lists (§7), DID documents.

GET /healthz#

No auth

Liveness of every backing service the spec fails closed on

Responses

StatusBodyMeaning
200HealthAll backing services reachable
503HealthA backing service is unreachable

GET /evidence/{hash}#

No auth

Exact bytes of an artifact by hash (§8)

Parameters

NameInTypeDescription
hash requiredpathstringsha256:<hex> or bare hex

Responses

StatusBodyMeaning
200*/*The bytes, with their original content type and immutable cache headers
404ErrorUnknown hash

GET /status-lists/{path}#

No auth

A Bitstring Status List credential (also served at the bare path on status.<domain>)

Parameters

NameInTypeDescription
path requiredpathstring<principal domain>/<list number>

Responses

StatusBodyMeaning
200application/vc+jwtCompact JWS (vc+jwt), Cache-Control max-age=30
404ErrorUnknown list

GET /.well-known/did.json#

No auth

The service DID document (receipt and status-list keys)

Responses

StatusBodyMeaning
200DidDocumentOK

GET /org/{slug}/did.json#

No auth

A managed Principal's DID document

Parameters

NameInTypeDescription
slug requiredpathstring

Responses

StatusBodyMeaning
200DidDocumentapplication/did+json
404ErrorUnknown slug

Onboarding#

Registry administration.

POST /principals#

adminToken or orgKey

Register a managed or customer-hosted Principal

An org:admin key onboards into its own org; admin may pass org_id.

Request body · PrincipalCreateRequest

Responses

StatusBodyMeaning
201PrincipalCreatedRegistered; API key shown once
400ErrorBad request
401ErrorBad admin token
409ErrorAlready registered, or a Delegus-managed domain

POST /relying-parties#

adminToken or orgKey

Register a relying party; returns its API key once

An org:admin key onboards into its own org; admin may pass org_id.

Request body · RelyingPartyCreateRequest

FieldTypeDescription
kind required"managed" | "hosted"
slugstring
didstring
pattern ^did:web:
namestring
proof_window_secondsinteger
≥ 1 · ≤ 300 · default 60
verify_rate_limit_per_minuteinteger/verify requests per minute per API key (per node)
≥ 1 · ≤ 1000000 · default 600
org_idOrgIdadmin: attach to this org; org:admin keys always onboard into their own org
profile"delegus-base-v1" | "delegus-base-v2"default delegus-base-v1

Responses

StatusBodyMeaning
201RelyingPartyCreatedRegistered
400ErrorBad request
401ErrorBad admin token
409ErrorAlready registered

GET /relying-parties/{did}#

rpKey or orgKey or adminToken

Relying-party settings

Parameters

NameInTypeDescription
did requiredpathstring

Responses

StatusBodyMeaning
200RelyingPartyOK
401ErrorUnauthorized
404ErrorUnknown relying party

PATCH /relying-parties/{did}#

adminToken or orgKey

Update a relying party's name, Proof window or /verify rate limit

Parameters

NameInTypeDescription
did requiredpathDidWeb

Request body · RelyingPartyUpdateRequest

FieldTypeDescription
namestring
min length 1
proof_window_secondsinteger
≥ 1 · ≤ 300
verify_rate_limit_per_minuteinteger
≥ 1 · ≤ 1000000
profile"delegus-base-v1" | "delegus-base-v2"default delegus-base-v1

Responses

StatusBodyMeaning
200RelyingPartyUpdated
400ErrorBad field
401ErrorBad admin token
404ErrorUnknown relying party

POST /orgs/self-serve#

provisionKey

Self-serve signup: provision an org, a managed relying party, its keys and a starter first ALLOW (console)

One call creates the org, a managed relying party (verified at creation), an org:admin key and the customer's first verify key, and mints a starter Grant and Proof so the customer's first /verify returns a signed ALLOW. The console should forward the end customer's IP in x-delegus-client-ip so the per-customer limit applies; the socket address is the console's own.

Parameters

NameInTypeDescription
x-delegus-client-ipheaderstringThe end customer's IP address, forwarded by the console.

Request body · SelfServeRequest

FieldTypeDescription
slug requiredstringLowercase DNS label; becomes the org slug and the managed relying party did:web:<domain>:rp:<slug>. Taken or reserved slugs are 409.
pattern ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$
name requiredstring
min length 1 · max length 200
admin_email requiredstring (email)
max length 200

Responses

StatusBodyMeaning
201SelfServeBundleProvisioned
400ErrorBad slug, name or admin_email
401ErrorMissing or wrong provision key
404ErrorSelf-serve is not enabled on this deployment, or the relying party does not exist
409ErrorSlug taken or reserved
429ErrorRate limited (per provision key, per customer IP, per relying party, or the daily ceiling)

POST /orgs/self-serve/starter#

provisionKey

Mint a fresh starter Grant and Proof for a self-serve relying party

Request body · SelfServeRpRequest

FieldTypeDescription
rp_did requiredstringA managed relying party created by POST /orgs/self-serve.

Responses

StatusBodyMeaning
200objectA fresh starter
400Errorrp_did is not a managed relying party DID
401ErrorMissing or wrong provision key
404ErrorSelf-serve is not enabled on this deployment, or the relying party does not exist
429ErrorRate limited (per provision key, per customer IP, per relying party, or the daily ceiling)

POST /orgs/self-serve/first-receipt#

provisionKey

Verify a fresh starter as the tenant's relying party and return the signed receipt

The one-click first receipt: runs a fresh starter through the real engine as the tenant's relying party and returns the signed ALLOW receipt, with no dependency on the customer running a command inside the proof window.

Request body · SelfServeRpRequest

FieldTypeDescription
rp_did requiredstringA managed relying party created by POST /orgs/self-serve.

Responses

StatusBodyMeaning
200ReceiptThe signed receipt (ALLOW for a healthy tenant)
400Errorrp_did is not a managed relying party DID
401ErrorMissing or wrong provision key
404ErrorSelf-serve is not enabled on this deployment, or the relying party does not exist
429ErrorRate limited (per provision key, per customer IP, per relying party, or the daily ceiling)

Sandbox#

Present only when DELEGUS_DEMO=1 (development). Real receipts against an ephemeral sandbox Principal, Agent and relying party.

GET /demo/info#

No auth

Sandbox identities, the fixed Grant limits and lifetime

Responses

StatusBodyMeaning
200DemoInfoOK
404ErrorSandbox disabled

POST /demo/mint#

No auth

Mint a sandbox Grant and a fresh Proof for a fixed purchase

Request body · DemoMintRequest

FieldTypeDescription
amountintegerminor units; the sandbox Grant allows up to 50000 USD
≥ 0 · ≤ 1000000000 · default 42700

Responses

StatusBodyMeaning
200DemoMintOK
404ErrorSandbox disabled
429ErrorRate limited

POST /demo/verify#

No auth

POST /verify as the sandbox relying party (no key in the browser)

Request body · VerifyRequest

FieldTypeDescription
grant requiredstringGrant compact JWS as received in Delegus-Grant.
proof requiredstringProof compact JWS as received in Delegus-Proof.
action requiredAction

Responses

StatusBodyMeaning
200ReceiptOK
400ErrorMalformed envelope
404ErrorSandbox disabled
429ErrorRate limited

POST /demo/revoke#

No auth

Revoke a sandbox Grant

Request body · RevokeRequest

FieldTypeDescription
grant_id requiredstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$

Responses

StatusBodyMeaning
200RevokeResponseOK
400ErrorBad grant_id
404ErrorSandbox disabled, or not a sandbox Grant
429ErrorRate limited

Api-keys#

Rotate and revoke API keys: self-service with any live key of the subject, or by admin with ?subject=<did>. A new key does not invalidate the old one; revoke explicitly.

GET /me#

principalKey or rpKey or orgKey

What the caller's API key resolves to (subject, role, settings); the check behind delegus doctor

Responses

StatusBodyMeaning
200MeOK
401ErrorUnknown or revoked key

GET /api-keys#

principalKey or rpKey or adminToken or orgKey

List the subject's API keys (ids only, never the keys)

Parameters

NameInTypeDescription
subjectqueryDidWebAdmin or org keys: act on this Principal or relying party instead of the caller's own subject (org keys: a member of the org; org:admin to issue or revoke).

Responses

StatusBodyMeaning
200ApiKeyListOK
401ErrorNo live key and no admin token
404ErrorAdmin named an unknown subject

POST /api-keys#

principalKey or rpKey or adminToken or orgKey

Issue an additional API key for the subject (rotation step 1)

Parameters

NameInTypeDescription
subjectqueryDidWebAdmin or org keys: act on this Principal or relying party instead of the caller's own subject (org keys: a member of the org; org:admin to issue or revoke).

Request body · ApiKeyRequest

FieldTypeDescription
labelstring
max length 100

Responses

StatusBodyMeaning
201ApiKeyIssuedIssued; the key is shown once
400ErrorBad label
401ErrorNo live key and no admin token
404ErrorAdmin named an unknown subject

POST /api-keys/{key_id}/revoke#

principalKey or rpKey or adminToken or orgKey

Revoke one of the subject's keys by id (rotation step 2, or a leaked key)

Parameters

NameInTypeDescription
key_id requiredpathstring
subjectqueryDidWebAdmin only: act on this Principal or relying party instead of the caller's own subject.

Responses

StatusBodyMeaning
200ApiKeyRevoked (idempotent)
401ErrorNo live key and no admin token
404ErrorNot one of this subject's keys

Audit#

Append-only audit of administrative and Principal actions. Verify decisions are receipts, not audit events.

GET /audit#

adminToken or principalKey or rpKey or orgKey

Audit events, newest first: everything for admin; own actions for a Principal or relying party key; the org and its members for an org key

Parameters

NameInTypeDescription
actorquerystringadmin only: filter by actor DID or org id
actionquerystringnoun.verb
targetquerystring
sincequerystring (date-time)
untilquerystring (date-time)
limitqueryinteger
cursorquerystringnext_cursor from the previous page

Responses

StatusBodyMeaning
200AuditListOK
400ErrorBad filter
401ErrorNo key and no admin token

Usage#

Verify counts per UTC day, for metering and billing. An RP key sees its own verifies, a Principal key the verifies against its Grants, admin any subject.

GET /usage#

rpKey or principalKey or adminToken or orgKey or observerKey

Verifies per UTC day over a range (default: the last 30 days)

Parameters

NameInTypeDescription
sincequerystring (date-time)inclusive; default 29 days ago at 00:00Z
untilquerystring (date-time)exclusive; default tomorrow 00:00Z; range ≤ 366 days
rpqueryDidWebadmin: any; org keys: one member relying party (default: all of them)
principalqueryDidWebadmin: any; org keys: one member Principal
key_idqueryApiKeyIdonly verifies made with this relying-party API key
byquery"key"by=key adds a per-key breakdown to each day

Responses

StatusBodyMeaning
200UsageOK
400ErrorBad range
401ErrorNo key and no admin token

Orgs#

Organizations: customer accounts owning Principals and relying parties, with org-scoped API keys (roles read and admin) for dashboards. Human identity lives in the console, never here.

POST /orgs#

adminToken

Create an organization (admin)

Request body · OrgCreateRequest

FieldTypeDescription
slug requiredstringlowercase DNS label, unique
name requiredstring
max length 200

Responses

StatusBodyMeaning
201OrgCreated
400ErrorBad slug or name
401ErrorNot admin
409ErrorSlug taken

GET /orgs/{org_id}#

orgKey or adminToken

The org and its members

Parameters

NameInTypeDescription
org_id requiredpathstring

Responses

StatusBodyMeaning
200OrgWithMembersOK
401ErrorUnauthorized
404ErrorUnknown org, or a key of another subject

POST /orgs/{org_id}/members#

adminToken

Attach an existing Principal or relying party to the org (admin)

Parameters

NameInTypeDescription
org_id requiredpathstring

Request body · OrgMemberRequest

FieldTypeDescription
did requiredDidWebAn existing Principal or relying party not yet in another org

Responses

StatusBodyMeaning
200OrgMemberAddedAttached (idempotent)
400ErrorBad DID
401ErrorNot admin
404ErrorUnknown org or subject
409ErrorSubject belongs to another org

GET /orgs/{org_id}/api-keys#

orgKey or adminToken

The org's API keys (ids only)

Parameters

NameInTypeDescription
org_id requiredpathstring

Responses

StatusBodyMeaning
200OrgApiKeyListOK
401ErrorUnauthorized
404ErrorUnknown org

POST /orgs/{org_id}/api-keys#

orgKey or adminToken

Issue an org key with role read or admin (shown once)

Parameters

NameInTypeDescription
org_id requiredpathstring

Request body · OrgApiKeyRequest

FieldTypeDescription
role required"read" | "admin"read: every GET about the org and its members; admin: also onboarding, keys, revocation, agents, Principal keys, RP settings
labelstring
max length 100

Responses

StatusBodyMeaning
201ApiKeyIssuedIssued
400ErrorBad role or label
401ErrorUnauthorized
403Errororg:read key cannot issue keys
404ErrorUnknown org

POST /orgs/{org_id}/api-keys/{key_id}/revoke#

orgKey or adminToken

Revoke an org key by its public id (immediate, idempotent)

Parameters

NameInTypeDescription
org_id requiredpathstring
key_id requiredpathstring

Responses

StatusBodyMeaning
200ApiKeyRevoked
401ErrorUnauthorized
403Errororg:read key cannot revoke keys
404ErrorUnknown org or key

GET /orgs/{org_id}/entitlement#

provisionKey or adminToken

Read an org's production entitlement and what the gate would decide now (console, admin)

Parameters

NameInTypeDescription
org_id requiredpathstring

Responses

StatusBodyMeaning
200EntitlementThe stored row (null fields when none is stored) and the effective decision
401ErrorNot the provision key or admin
404ErrorUnknown org

PUT /orgs/{org_id}/entitlement#

provisionKey or adminToken

Set an org's production entitlement: allowed or blocked, until when, and a check cap (console, admin)

The console owns plan state and pushes one fact per org on every change. A push whose as_of is older than the stored row's is ignored (applied false), so pushes may arrive out of order. Production /verify calls from an org without a current plan are refused with 402 PLAN_REQUIRED once enforcement is on; sandbox checks and comp tenants are never refused.

Parameters

NameInTypeDescription
org_id requiredpathstring

Request body · EntitlementRequest

FieldTypeDescription
production required"allowed" | "blocked"
production_until requiredstring | null (date-time)Production checks stop at this instant; null for no end.
check_cap requiredinteger | nullAt most this many production checks since cap_since; null for no cap.
≥ 0 · ≤ 1000000000
cap_since requiredstring | null (date-time)Start of the capped count; required with check_cap. A new value starts a fresh count.
reason required"trial" | "paid" | "past_due_grace" | "canceled" | "comp" | "none"
as_of requiredstring (date-time)The console's change time. At most five minutes ahead of the server clock.

Responses

StatusBodyMeaning
200EntitlementStored (applied true) or ignored as older than the stored row (applied false); the row now in effect
400ErrorInvalid body
401ErrorNot the provision key or admin
404ErrorUnknown org

Transparency#

Signed daily Merkle roots (RFC 6962, SHA-256) over the receipt ids issued each UTC day, chained day to day and signed with the status key named in the service DID document. Leaf = SHA-256(0x00 ‖ receipt_id); node = SHA-256(0x01 ‖ left ‖ right). Anyone recomputes a root from the published leaf hashes; a receipt holder proves inclusion of their receipt id. Also served on status.<domain>/checkpoints/… .

GET /checkpoints/latest#

No auth

The most recent closed day's checkpoint

Responses

StatusBodyMeaning
200CheckpointOK
404ErrorNo day closed yet

GET /checkpoints/{day}#

No auth

The checkpoint for a UTC day (immutable once published)

Parameters

NameInTypeDescription
day requiredpathstringUTC day

Responses

StatusBodyMeaning
200CheckpointOK
404ErrorDay not closed, or not a UTC day

GET /checkpoints/{day}/leaves#

No auth

The day's leaf hashes, one hex SHA-256 per line in tree order; merkleRoot(leaves) equals the checkpoint root

Parameters

NameInTypeDescription
day requiredpathstringUTC day

Responses

StatusBodyMeaning
200text/plaintext/plain; headers X-Delegus-Tree-Size and X-Delegus-Root
404ErrorDay not closed

POST /checkpoints/close#

adminToken

Close every ended UTC day now (admin; idempotent; the maintenance loop does this every 5 minutes)

Responses

StatusBodyMeaning
200CheckpointsClosedDays closed in this run
401ErrorNot admin

GET /decisions/{receipt_id}/inclusion#

No auth

Inclusion proof of a receipt id in its day's checkpoint; 202 while the day is still open

Parameters

NameInTypeDescription
receipt_id requiredpathstring

Responses

StatusBodyMeaning
200InclusionProofProof
202InclusionPendingDay not closed yet (Retry-After: 3600)
404ErrorUnknown receipt

Authzen#

OpenID AuthZEN Authorization API 1.0 Access Evaluation, shaped over /verify for Policy Enforcement Points such as MCP servers and gateways (COAZ-MCP binding). Same receipts, ledger and limits as /verify; fail closed.

POST /access/v1/evaluation#

rpKey

AuthZEN Access Evaluation: subject/action/resource/context → decision, backed by a Delegus receipt

Request body · AuthZenRequest

FieldTypeDescription
subject requiredAuthZenEntitytype "agent", id = the Agent's did:key; properties.grant and properties.proof = the compact JWS the Agent presented (context.grant/proof also accepted)
action requiredobject
FieldTypeDescription
name required"commerce:purchase" | "api:call"
propertiesobjectthe remaining Delegus Action fields: amount, currency (commerce:purchase) or method (api:call); never type or resource
resource requiredAuthZenEntityid = the Delegus action.resource (order id or absolute URL)
contextobject

Responses

StatusBodyMeaning
200AuthZenResponseDecision (true only for ALLOW); context carries the Delegus reason and the receipt
400ErrorRequest does not map to a verification (no permit)
401ErrorNot a relying-party key
402ErrorProduction checks need a plan for this account (error PLAN_REQUIRED). An access refusal before evaluation, like 401 or 429: no receipt and no DENY reason, and the proof is not spent. Sandbox checks are never refused this way.
429ErrorRate limited (the RP's verify limit)

GET /.well-known/authzen-configuration#

No auth

AuthZEN PDP metadata

Responses

StatusBodyMeaning
200AuthZenConfigurationOK

Metrics#

Aggregate service metrics. GET /metrics is public and per-subject-free (HQ finance dashboard, public metrics page). Observer keys read /decisions/stats and /usage service-wide for a staff-only collector without the admin token.

GET /metrics#

No auth

Aggregate service metrics (public, no per-subject data)

Parameters

NameInTypeDescription
daysqueryintegerverify-total window

Responses

StatusBodyMeaning
200MetricsOK
400ErrorBad days

GET /observer-keys#

adminToken

List observer keys (admin)

Responses

StatusBodyMeaning
200ApiKeyListOK
401ErrorNot admin

POST /observer-keys#

adminToken

Issue an observer key: service-wide read of /decisions/stats and /usage only (admin; shown once)

Request body · ApiKeyRequest

FieldTypeDescription
labelstring
max length 100

Responses

StatusBodyMeaning
201ApiKeyIssuedIssued
401ErrorNot admin

POST /observer-keys/{key_id}/revoke#

adminToken

Revoke an observer key (admin)

Parameters

NameInTypeDescription
key_id requiredpathstring

Responses

StatusBodyMeaning
200ApiKeyRevoked
401ErrorNot admin
404ErrorUnknown observer key

Conformance#

Hosted conformance runner: the published vectors run against an implementer endpoint (wire contract in @delegus/conformance). Reports are pinned to the vector-set hash and unsigned.

POST /conformance/runs#

rpKey or principalKey or orgKey or adminToken

Start a hosted conformance run: the published vectors against your endpoint

Runs every published vector (and the htu, jcs and jti sets the endpoint supports) against the submitted endpoint and reports pass or fail per vector. The runner only POSTs JSON to that one URL, through the SSRF-hardened outbound path (public addresses only, no redirects, size cap, per-request timeout), at most 50 requests and 2 minutes per run, one run at a time per account, 10 starts per hour per key. Returns 202 with the run; poll GET /conformance/runs/{run_id}.

Request body · ConformanceRunRequest

FieldTypeDescription
endpoint requiredstring (uri)An https endpoint that speaks the conformance wire contract (delegus-conformance-http v1, see @delegus/conformance): one JSON POST per call, op evaluate / describe / normalizeHtu / canonicalize / sha256 / isJti. Never a Delegus host.
max length 2048

Responses

StatusBodyMeaning
202ConformanceRunStarted
400ErrorNot an https URL, carries credentials, or is a Delegus host
401ErrorNo valid key
409ErrorA run is already running for this account
429ErrorRate limited

GET /conformance/runs/{run_id}#

rpKey or principalKey or orgKey or adminToken

Read a hosted conformance run and its report

Parameters

NameInTypeDescription
run_id requiredpathstring

Responses

StatusBodyMeaning
200ConformanceRunThe run
401ErrorNo valid key
404ErrorNo such run for this account

Schemas#

Every object the API accepts or returns. ReasonCode values link to their definition on the DENY reason codes page.

ActiononeOf#

The RP's description of the action (§3.3, §5.1). Integers only, no floats.

One of: object | object

Agentobject#

FieldTypeDescription
did requiredstring
pattern ^did:key:z6Mk
principal requiredstring
pattern ^did:web:
created_at requiredstring (date-time)RFC 3339 UTC

AgentDisabledobject#

FieldTypeDescription
did requiredstring
pattern ^did:key:z6Mk
disabled_at requiredstring (date-time)RFC 3339 UTC
revoked_grants requiredstring[]

AgentRequestobject#

FieldTypeDescription
did requiredstring
pattern ^did:key:z6Mk

ApiKeyobject#

FieldTypeDescription
key_id requiredstringPublic identifier (first 12 hex chars of the key hash); never a secret.
role required"principal" | "rp" | "org:read" | "org:admin" | "observer"
subject requiredstringThe Principal or relying-party DID, or the org id for org keys
label requiredstring | null
created_at requiredstring (date-time)
revoked_at requiredstring (date-time) | null

ApiKeyIdstring#

Public identifier of an API key (first 12 hex chars of its hash); never a secret.

string · pattern ^[0-9a-f]{12}$

ApiKeyIssuedobject#

ApiKey & object

ApiKeyListobject#

FieldTypeDescription
subject requiredDidWeb
keys requiredApiKey[]

ApiKeyRequestobject#

FieldTypeDescription
labelstring
max length 100

Attestationobject#

OutcomeEvent & object

AuditEventobject#

FieldTypeDescription
event_id requiredstring
pattern ^aud_
occurred_at requiredstring (date-time)
actor requiredobject
FieldTypeDescription
kind required"admin" | "principal" | "rp" | "org" | "system"
did requiredstring | nullThe subject DID, or the org id for org keys
key_id requiredstring | null
action requiredstringprincipal.create, principal.verify, relying_party.create, api_key.create, api_key.revoke, agent.register, agent.disable, grant.allocate, grant.revoke, key.compromise, sandbox.create, key.retire, relying_party.update
target requiredstring | null
request_id requiredstring | null
details requiredobject

AuditListobject#

FieldTypeDescription
events requiredAuditEvent[]
next_cursor requiredstring | null

AuthZenConfigurationobject#

FieldTypeDescription
policy_decision_point requiredstring (uri)
access_evaluation_endpoint requiredstring (uri)
delegusobject

AuthZenEntityobject#

FieldTypeDescription
type requiredstring
id requiredstring
propertiesobject

AuthZenRequestobject#

FieldTypeDescription
subject requiredAuthZenEntitytype "agent", id = the Agent's did:key; properties.grant and properties.proof = the compact JWS the Agent presented (context.grant/proof also accepted)
action requiredobject
FieldTypeDescription
name required"commerce:purchase" | "api:call"
propertiesobjectthe remaining Delegus Action fields: amount, currency (commerce:purchase) or method (api:call); never type or resource
resource requiredAuthZenEntityid = the Delegus action.resource (order id or absolute URL)
contextobject

AuthZenResponseobject#

FieldTypeDescription
decision requiredbooleantrue iff the Delegus receipt says ALLOW
context requiredobject
FieldTypeDescription
reason requiredReasonCode | null
receipt_id requiredstring
evaluated_at requiredstring (date-time)
relying_party requiredDidWeb
principalDidWeb
agentDidKey
receipt requiredstringthe signed receipt JWS
receipt_url requiredstring
issuer requiredDidWeb

Capabilityobject#

FieldTypeDescription
action required"commerce:purchase" | "api:call"
constraints requiredobjectcommerce:purchase: maxAmount (integer, minor units), currency (ISO 4217). api:call: methods (uppercase HTTP methods). Unknown keys deny at P17.
resourcesstring[]Globs with * and ** only; absent = ["*"].

CheckOutcomeoneOf#

Check outcome: true, false, or "skipped" when a prerequisite did not pass.

One of: boolean | "skipped"

Checkpointobject#

FieldTypeDescription
day requiredstring
pattern ^\d{4}-\d{2}-\d{2}$
tree_size requiredinteger
≥ 0
root requiredSha256
previous_root requiredSha256 | nullThe previous day's root; null for the first checkpoint
first_receipt_id requiredstring | null
last_receipt_id requiredstring | null
tree required"rfc6962-sha256"
kid requiredstringdid:web:<domain>#status-<n>, the signing key
checkpoint requiredstringCompact JWS, typ delegus-checkpoint+jwt, JCS payload {iss, day, tree_size, root, previous_root, first_receipt_id, last_receipt_id, iat, tree}
checkpoint_hash requiredSha256
leaves_url requiredstring
created_at requiredstring (date-time)

CheckpointsClosedobject#

FieldTypeDescription
closed requiredstring[]
latest requiredstring | null

ConformanceRunobject#

FieldTypeDescription
run_id requiredstringcfr_<ULID>
status required"running" | "passed" | "failed" | "error"passed: every vector, committed receipt and supplied set passed. failed: the report shows which did not. error: the endpoint was refused by the outbound policy (not public, not https) or the run was interrupted.
endpoint requiredstring
created_at requiredstring (date-time)
finished_at requiredstring (date-time) | null
requests requiredintegerRequests sent to the endpoint (at most 50 per run).
vectors requiredobject
FieldTypeDescription
sha256 requiredstringsha256 over the vector set that ran (recompute with vectorSetHash()).
conformance_version requiredstring
error requiredstring | null
report requiredobject | null
signed requiredfalseReports are unsigned in v1.

ConformanceRunRequestobject#

FieldTypeDescription
endpoint requiredstring (uri)An https endpoint that speaks the conformance wire contract (delegus-conformance-http v1, see @delegus/conformance): one JSON POST per call, op evaluate / describe / normalizeHtu / canonicalize / sha256 / isJti. Never a Delegus host.
max length 2048

ConsumptionBalanceobject#

FieldTypeDescription
key requiredSha256sha256 over the RFC 8785 form of the Capability (v0.3 proposal §3)
spent_total requiredinteger
spent_in_period requiredinteger
period_start requiredstring (date-time) | null
uses_spent requiredinteger
limits requiredobjectas seen at the last consume
FieldTypeDescription
totalinteger | null
per_periodinteger | null
usesinteger | null
remaining requiredobject
FieldTypeDescription
totalinteger | null
per_periodinteger | null
usesinteger | null
updated_at requiredstring (date-time)

ConsumptionEventobject#

FieldTypeDescription
version requiredinteger
key requiredSha256
delta_total requiredinteger
delta_period requiredinteger
delta_uses requiredinteger
period_start requiredstring (date-time) | null
cause required"consume" | "restore" | "restore_reversal"
cause_id requiredstringreceipt id (consume) or attestation id (restore, restore_reversal)
receipt_id requiredstring
recorded_at requiredstring (date-time)

CredentialStatusobject#

FieldTypeDescription
id requiredstring
type required"BitstringStatusListEntry"
statusPurpose required"revocation"
statusListIndex requiredstring
pattern ^(0|[1-9][0-9]*)$
statusListCredential requiredstring (uri)

Decisionobject#

FieldTypeDescription
receipt requiredReceipt
outcomes requiredAttestation[]

DecisionExportRowobject#

One NDJSON line: the decision summary, the full signed receipt, and its outcome ledger

DecisionSummary & object

DecisionListobject#

FieldTypeDescription
decisions requiredDecisionSummary[]
next_cursor requiredstring | nullPass as ?cursor= for the next (older) page; null when this was the last page.

DecisionStatsobject#

FieldTypeDescription
since requiredstring (date-time)
until requiredstring (date-time)
rpsDidWeb[]
totals requiredobject
FieldTypeDescription
verifies requiredinteger
allow requiredinteger
deny requiredinteger
allow_with_outcome requiredinteger
principals requiredPrincipalStats[]

DecisionSummaryobject#

FieldTypeDescription
receipt_id requiredstring
decision required"ALLOW" | "DENY"
reason requiredReasonCode | null
evaluated_at requiredstring (date-time)
principal requiredDidWeb | null
grant_id requiredGrantId | null
agent requiredDidKey | null
rp requiredDidWeb
key_id requiredApiKeyId | nullThe relying-party key that made the verify; null before key tracking
action_type required"commerce:purchase" | "api:call" | nullThe Action the relying party submitted to /verify, as checked. Null when the action was malformed, for decisions recorded before actions were kept (production: before 2026-09-23 01:57 UTC), and for decisions older than 7 years (the action fields are cleared then; the receipt itself is kept).
amount requiredinteger | nullcommerce:purchase: integer minor units of currency (JPY has 0 decimals, USD 2, KWD 3). Null otherwise.
currency requiredstring | nullcommerce:purchase: ISO 4217 code. Null otherwise.
resource requiredstring | nullThe action resource as submitted (a purchase resource or an api:call URI).
method requiredstring | nullapi:call: the HTTP method. Null otherwise.

DemoInfoobject#

FieldTypeDescription
principal requiredDidWeb
agent requiredDidKey
rp requiredDidWeb
authority requiredCapability
grant_lifetime_seconds requiredinteger
request requiredobject
FieldTypeDescription
methodstring
urlstring
amount_cap requiredinteger
rate_limit_per_minute requiredinteger

DemoMintobject#

FieldTypeDescription
grant requiredstring
proof requiredstring
action requiredAction
rp requiredstring
pattern ^did:web:
grant_id requiredstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$
agent requiredstring
pattern ^did:key:z6Mk
principal requiredstring
pattern ^did:web:
request requiredobject
FieldTypeDescription
methodstring
urlstring
authority requiredCapability
valid_until requiredstring (date-time)
grant_lifetime_seconds requiredinteger

DemoMintRequestobject#

FieldTypeDescription
amountintegerminor units; the sandbox Grant allows up to 50000 USD
≥ 0 · ≤ 1000000000 · default 42700

DidDocumentobject#

FieldTypeDescription
@context requiredstring[]
id requiredstring
pattern ^did:web:
verificationMethod requiredobject[]
FieldTypeDescription
id requiredstring
type required"Multikey"
controller requiredstring
pattern ^did:web:
publicKeyMultibase requiredstring
assertionMethodstring[]

DidKeystring#

string · pattern ^did:key:z6Mk

DidWebstring#

string · pattern ^did:web:

Entitlementobject#

FieldTypeDescription
org_id requiredstring
stored requiredbooleanWhether a row exists. With enforcement on, no row means no plan.
production"allowed" | "blocked" | null
production_untilstring | null (date-time)
check_capinteger | null
cap_sincestring | null (date-time)
reasonenum (7)
one of: trial, paid, past_due_grace, canceled, comp, none, null
as_ofstring | null (date-time)
updated_atstring | null (date-time)
production_checks_since_capinteger | nullProduction checks counted since cap_since (at most check_cap); null without a cap.
comp requiredbooleanA staff, self-test or canary tenant that never needs a plan.
effective required"allowed" | "blocked"What the gate would decide for the next production check now.
effective_detailstring | nullWhy it would be refused; null when allowed.
enforced requiredbooleanWhether this deployment refuses (true) or only logs (false) a blocked production check.
appliedbooleanPUT only: whether this push was stored.

EntitlementRequestobject#

FieldTypeDescription
production required"allowed" | "blocked"
production_until requiredstring | null (date-time)Production checks stop at this instant; null for no end.
check_cap requiredinteger | nullAt most this many production checks since cap_since; null for no cap.
≥ 0 · ≤ 1000000000
cap_since requiredstring | null (date-time)Start of the capped count; required with check_cap. A new value starts a fresh count.
reason required"trial" | "paid" | "past_due_grace" | "canceled" | "comp" | "none"
as_of requiredstring (date-time)The console's change time. At most five minutes ahead of the server clock.

Errorobject#

FieldTypeDescription
error requiredenum (10)
one of: INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, PAYLOAD_TOO_LARGE, SERVICE_UNAVAILABLE, METHOD_NOT_ALLOWED, INTERNAL, RATE_LIMITED
message requiredstring

GrantAllocationobject#

The Principal signs these into the Grant (§3.2 rows 6 and 14).

FieldTypeDescription
id requiredstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$
issuer requiredstring
pattern ^did:web:
agent requiredstring
pattern ^did:key:z6Mk
credentialStatus requiredCredentialStatus
allocated_at requiredstring (date-time)RFC 3339 UTC

GrantAllocationRequestobject#

FieldTypeDescription
agent requiredstring
pattern ^did:key:z6Mk

GrantConsumptionobject#

Balances and the append-only consumption log of one Grant (v0.3 consumable Grants, proposal §7–§8). Empty for Grants that were never consumed.

FieldTypeDescription
grant_id requiredGrantId
principal requiredDidWeb
agent requiredDidKey
version requiredintegerlog version; 0 when never consumed
as_of requiredstring (date-time)
snapshot_hash requiredSha256hash of the canonical consumption snapshot as of now (what a v0.3 receipt would pin)
capabilities requiredConsumptionBalance[]
events requiredConsumptionEvent[]newest first
next_cursor requiredinteger | null

GrantIdstring#

string · pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$

GrantListobject#

FieldTypeDescription
grants requiredGrantSummary[]
next_cursor requiredstring | null

GrantSummaryobject#

What Delegus knows about a Grant: its id, Agent and status entry. The Grant itself (authority, validity) is signed by the Principal and reaches Delegus only inside a /verify; see the receipt's authority and expires_at.

FieldTypeDescription
id requiredGrantId
principal requiredDidWeb
agent requiredDidKey
status_list requiredstring (uri)
status_list_index requiredinteger
allocated_at requiredstring (date-time)
revoked_at requiredstring (date-time) | null
state required"active" | "revoked"

Healthobject#

FieldTypeDescription
ok requiredboolean
envstring
didstring
pattern ^did:web:

InclusionPendingobject#

FieldTypeDescription
receipt_id requiredstring
day requiredstring
status requiredstring

InclusionProofobject#

FieldTypeDescription
receipt_id requiredstring
day requiredstring
leaf requiredstringhex SHA-256(0x00 ‖ receipt_id)
leaf_index requiredinteger
≥ 0
tree_size requiredinteger
≥ 1
root requiredSha256
audit_path requiredstring[]RFC 6962 §2.1.1 audit path, hex, leaf to root
checkpoint requiredstringThe day's checkpoint JWS
kid requiredstring

KeyCompromisedobject#

FieldTypeDescription
kid requiredstring
state required"compromised"

KeyRetiredobject#

FieldTypeDescription
kid requiredstring
state required"retired" | "compromised"

Meobject#

FieldTypeDescription
subject requiredstringDID, or org id for org keys
role required"principal" | "rp" | "org:read" | "org:admin" | "observer"
key_id requiredstring
key_labelstring | null
key_created_atstring (date-time)
service_did requiredDidWeb
env requiredstring
namestringrelying parties
proof_window_secondsintegerrelying parties
kind"managed" | "hosted"principals
verificationVerification
keysobject[]principals: signing keys known from the DID document and their trust state
FieldTypeDescription
kidstring
state"active" | "retired" | "compromised"
org_idOrgId | nullPrincipals and relying parties: their org
orgOrgorg keys
membersOrgMember[]org keys
scopestring[]observer keys: the endpoints the key may call

Metricsobject#

Aggregate only; no Principal, relying-party or receipt identifiers appear.

FieldTypeDescription
as_of requiredstring (date-time)
service_did requiredDidWeb
env requiredstring
principals requiredobject
FieldTypeDescription
verified requiredinteger
hosted_verified requiredinteger
hosted_unverified requiredinteger
managed requiredinteger
relying_parties requiredinteger
organizations requiredinteger
receipts_total requiredinteger
verifies requiredobject
FieldTypeDescription
window_days requiredinteger
since requiredstring (date-time)
until requiredstring (date-time)
verifies requiredinteger
allow requiredinteger
deny requiredinteger
per_day requiredobject[]
FieldTypeDescription
day requiredstring
verifies requiredinteger
allow requiredinteger
deny requiredinteger
transparency requiredobject
FieldTypeDescription
latest_daystring | null
latest_rootSha256
latest_tree_sizeinteger
checkpointsinteger
named_principals requiredobject[]verified Principals that opted in to public naming
FieldTypeDescription
did requiredDidWeb
domain requiredstring
kind required"managed" | "hosted"
self_test requiredobjectself-test/liveness tenants, excluded from the customer counters above; never a customer
FieldTypeDescription
principals requiredinteger
relying_parties requiredinteger
organizations requiredinteger

Orgobject#

FieldTypeDescription
org_id requiredOrgId
slug requiredstring
name requiredstring
created_at requiredstring (date-time)

OrgApiKeyListobject#

FieldTypeDescription
org_id requiredOrgId
keys requiredApiKey[]

OrgApiKeyRequestobject#

FieldTypeDescription
role required"read" | "admin"read: every GET about the org and its members; admin: also onboarding, keys, revocation, agents, Principal keys, RP settings
labelstring
max length 100

OrgCreateRequestobject#

FieldTypeDescription
slug requiredstringlowercase DNS label, unique
name requiredstring
max length 200

OrgIdstring#

string · pattern ^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$

OrgMemberobject#

FieldTypeDescription
did requiredDidWeb
kind required"principal" | "relying_party"
created_at requiredstring (date-time)
principal_kind"managed" | "hosted"principals
domainstringprincipals
verification_state"verified" | "unverified"principals
verificationVerificationprincipals
namestringrelying parties
proof_window_secondsintegerrelying parties
verify_rate_limit_per_minuteintegerrelying parties

OrgMemberAddedobject#

FieldTypeDescription
org_id requiredOrgId
did requiredDidWeb
kind required"principal" | "relying_party"

OrgMemberRequestobject#

FieldTypeDescription
did requiredDidWebAn existing Principal or relying party not yet in another org

OrgWithMembersobject#

Org & object

OutcomeEventobject#

Unknown fields and unknown types are rejected (§9.3).

FieldTypeDescription
type requiredenum (7)
one of: fulfilled, cancelled, dispute_opened, dispute_resolved, chargeback_received, chargeback_reversed, loss_reported
occurred_at requiredstring (date-time)RFC 3339 UTC
evidence_refstring
notestring
correction_ofstring
pattern ^oat_
reporter_signaturestring
resolution"agent_at_fault" | "agent_not_at_fault" | "indeterminate"required for dispute_resolved
loss_amountintegerrequired for loss_reported; minor units
≥ 0
currencystringrequired for loss_reported
pattern ^[A-Z]{3}$

Principalobject#

FieldTypeDescription
did requiredstring
pattern ^did:web:
kind required"managed" | "hosted"
domain requiredstring
verification requiredVerification
created_at requiredstring (date-time)RFC 3339 UTC
org_idOrgId | null
may_be_namedbooleanconsent to be named publicly (metrics page); default false, admin-set

PrincipalCreatedobject#

Principal & object

PrincipalCreateRequestoneOf#

One of: object | object

PrincipalDirectoryobject#

FieldTypeDescription
principals requiredPrincipalDirectoryEntry[]
next_cursor requiredDidWeb | null

PrincipalDirectoryEntryobject#

What any relying party may know about a Principal: identity, verification state with dates, key history, DID-document snapshot. Never the verification token or org membership.

FieldTypeDescription
did requiredDidWeb
kind required"managed" | "hosted"
domain requiredstring
verification requiredobject
FieldTypeDescription
state required"verified" | "unverified"
verified_since requiredstring (date-time) | null
last_checked_at requiredstring (date-time) | null
method required"domain" | "delegus-hosted"domain: DNS TXT or .well-known proof, re-checked every 24 h; delegus-hosted: managed Principal, verified by construction
keys requiredobject[]Key history: every verification method ever seen, with its current state
FieldTypeDescription
kid requiredstring
state required"active" | "retired" | "compromised"
since requiredstring (date-time)
did_document requiredobject | null
registered_at requiredstring (date-time)
may_be_namedbooleanconsent to be named publicly (metrics page); default false, admin-set

PrincipalNamingRequestobject#

FieldTypeDescription
may_be_named requiredboolean

PrincipalStatsobject#

FieldTypeDescription
principal requiredDidWeb | nullnull groups receipts denied before the Grant was authenticated (P1–P3, T1–T3)
verifies requiredinteger
allow requiredinteger
deny requiredinteger
reasons requiredobjectDENY reason → count
outcomes requiredobjectoutcome type → count
losses requiredobjectloss_reported sums per currency, minor units
allow_with_outcome requiredintegerALLOW receipts with at least one outcome attestation

ProtocolCheckIdstring#

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15 P16 P17 P18 P19 P20

Receiptobject#

Decision Receipt (spec §6.2). receipt is the canonical non-detached compact JWS over JCS(body minus receipt).

FieldTypeDescription
receipt_version required"delegus-receipt-v1"
receipt_id requiredstring
pattern ^drc_[0-7][0-9A-HJKMNP-TV-Z]{25}$
decision required"ALLOW" | "DENY"
reason requiredReasonCode | null
evaluated_at requiredstring (date-time)RFC 3339 UTC
relying_party requiredstring
pattern ^did:web:
principalobjectPresent only once P3 passed (§6.4).
FieldTypeDescription
id requiredstring
pattern ^did:web:
verification required"domain" | "unverified"
agentstring
pattern ^did:key:z6Mk
grant_idstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$
grant_hash requiredstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
proof_hash requiredstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
request_hashstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
authorityCapability | nullThe Capability that authorized the action; null on DENY; absent before P3.
expires_atstring (date-time)RFC 3339 UTC
evidence requiredobject
FieldTypeDescription
issuer_resolutionobject
FieldTypeDescription
did requiredstring
pattern ^did:web:
did_document_hash requiredstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
resolved_at requiredstring (date-time)RFC 3339 UTC
statusobject
FieldTypeDescription
credential_url requiredstring (uri)
credential_hash requiredstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
valid_fromstring (date-time)RFC 3339 UTC
checked_at requiredstring (date-time)RFC 3339 UTC
status_list_index requiredstring
trust_config_version requiredstring
trust_config_hash requiredstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
protocol requiredobject
FieldTypeDescription
result required"PASS" | "FAIL"
profile required"delegus-base-v1"
profile_hash requiredstringThe one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).
pattern ^sha256:[0-9a-f]{64}$
checks requiredobject
FieldTypeDescription
P1 requiredCheckOutcome
P2 requiredCheckOutcome
P3 requiredCheckOutcome
P4 requiredCheckOutcome
P5 requiredCheckOutcome
P6 requiredCheckOutcome
P7 requiredCheckOutcome
P8 requiredCheckOutcome
P9 requiredCheckOutcome
P10 requiredCheckOutcome
P11 requiredCheckOutcome
P12 requiredCheckOutcome
P13 requiredCheckOutcome
P14 requiredCheckOutcome
P15 requiredCheckOutcome
P16 requiredCheckOutcome
P17 requiredCheckOutcome
P18 requiredCheckOutcome
P19 requiredCheckOutcome
P20 requiredCheckOutcome
trust requiredobject
FieldTypeDescription
result required"PASS" | "FAIL"
policy_version required"delegus-trust-v1"
checks requiredobject
FieldTypeDescription
T1 requiredCheckOutcome
T2 requiredCheckOutcome
T3 requiredCheckOutcome
T5 requiredCheckOutcome
receipt requiredstringCompact JWS, alg EdDSA, typ delegus-receipt+jwt, kid did:web:<domain>#receipt-<n>.

RelyingPartyobject#

FieldTypeDescription
did requiredDidWeb
name requiredstring
proof_window_seconds requiredinteger
verify_rate_limit_per_minute requiredinteger
created_at requiredstring (date-time)
org_idOrgId | null
profile"delegus-base-v1" | "delegus-base-v2"Protocol profile for /verify; v2 enables consumable grants (budget). Default v1.

RelyingPartyCreatedobject#

FieldTypeDescription
did requiredstring
pattern ^did:web:
name requiredstring
proof_window_seconds requiredinteger
created_at requiredstring (date-time)RFC 3339 UTC
api_key requiredstringShown once.
api_key_id requiredstring
verify_rate_limit_per_minute requiredinteger

RelyingPartyCreateRequestobject#

FieldTypeDescription
kind required"managed" | "hosted"
slugstring
didstring
pattern ^did:web:
namestring
proof_window_secondsinteger
≥ 1 · ≤ 300 · default 60
verify_rate_limit_per_minuteinteger/verify requests per minute per API key (per node)
≥ 1 · ≤ 1000000 · default 600
org_idOrgIdadmin: attach to this org; org:admin keys always onboard into their own org
profile"delegus-base-v1" | "delegus-base-v2"default delegus-base-v1

RelyingPartyUpdateRequestobject#

FieldTypeDescription
namestring
min length 1
proof_window_secondsinteger
≥ 1 · ≤ 300
verify_rate_limit_per_minuteinteger
≥ 1 · ≤ 1000000
profile"delegus-base-v1" | "delegus-base-v2"default delegus-base-v1

RevokeRequestobject#

FieldTypeDescription
grant_id requiredstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$

RevokeResponseobject#

FieldTypeDescription
grant_id requiredstring
pattern ^urn:delegus:grant:[0-7][0-9A-HJKMNP-TV-Z]{25}$
revoked requiredtrue
revoked_at requiredstring (date-time)RFC 3339 UTC

SelfServeBundleobject#

FieldTypeDescription
org requiredOrg
org_admin_key requiredstringorg:admin key for the new org (dk_org_admin_…). Shown once; the console keeps it server-side and never shows it to the customer.
relying_party requiredobjectThe tenant's managed relying party. Managed identities are verified at creation; nothing is pending.
FieldTypeDescription
did requiredstring
name requiredstring
profile requiredstring
proof_window_seconds requiredinteger
rp_verify_key requiredstringThe customer's first relying-party verify key (dk_rp_…). Shown once.
starter requiredSelfServeStarter

SelfServeRequestobject#

FieldTypeDescription
slug requiredstringLowercase DNS label; becomes the org slug and the managed relying party did:web:<domain>:rp:<slug>. Taken or reserved slugs are 409.
pattern ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$
name requiredstring
min length 1 · max length 200
admin_email requiredstring (email)
max length 200

SelfServeRpRequestobject#

FieldTypeDescription
rp_did requiredstringA managed relying party created by POST /orgs/self-serve.

SelfServeStarterobject#

A ready-to-verify sample: a Grant issued by the shared sandbox Principal to a one-time agent, and a Proof bound to this relying party. Bounded: a $50 ceiling, resource sandbox/**, a 1-hour Grant. POST grant, proof and action to /verify with the tenant's rp_verify_key for a signed ALLOW.

FieldTypeDescription
grant requiredstringGrant compact JWS (vc+jwt).
proof requiredstringProof compact JWS (delegus-proof+jwt), aud = this relying party.
action requiredobjectThe exact Action the Proof is bound to (a $10.00 sandbox purchase).
grant_id requiredstring
expires_at requiredstring (date-time)When the Proof leaves the relying party's 300-second window; call /orgs/self-serve/starter for a fresh one.
verify_url requiredstring (uri)
verify_curl requiredstringA ready shell command for /verify; the literal <rp_verify_key> marks where the customer's key goes.

Sha256string#

The one hash encoding: sha256:<64 lowercase hex> over the exact bytes (spec §6.3).

string · pattern ^sha256:[0-9a-f]{64}$

TrustCheckIdstring#

T1 T2 T3 T5

Usageobject#

FieldTypeDescription
since requiredstring (date-time)
until requiredstring (date-time)
rpDidWeb
principalDidWeb
totals requiredobject
FieldTypeDescription
verifies requiredinteger
allow requiredinteger
deny requiredinteger
days requiredUsageDay[]
rpsDidWeb[]org keys: the relying parties covered
key_idApiKeyId

UsageDayobject#

FieldTypeDescription
day requiredstringUTC day
pattern ^\d{4}-\d{2}-\d{2}$
verifies requiredinteger
allow requiredinteger
deny requiredinteger
reasons requiredobjectDENY reason → count
keysobjectPresent with by=key: per API key id ("unknown" for receipts recorded before key tracking)

Verificationobject#

FieldTypeDescription
state required"verified" | "unverified"
token requiredstring
dns_txt requiredobject
FieldTypeDescription
namestring
valuestring
well_known requiredobject
FieldTypeDescription
urlstring
bodyobject
reverified_every_hours required24
did_document_url requiredstring

VerifyRequestobject#

FieldTypeDescription
grant requiredstringGrant compact JWS as received in Delegus-Grant.
proof requiredstringProof compact JWS as received in Delegus-Proof.
action requiredAction