Skip to content
Docs

Reference

HTTP API

Endpoints, authentication and operation states.

All endpoints are under the site's origin and exchange JSON. Errors answer { "error": { "code", "message", "requestId" } }.

Public#

Method and pathReturns
GET /api/configProgram, public RPC URL, genesis hash, proof artifact manifest and its pinned digest, region and status names
GET /api/networkGovernance config, verifiers, the circuit, the upgrade authority, the pass fee and the pass fees the protocol holds, and chain time
GET /api/rulesEvery rule set with its name, and the index position
GET /api/health/live{ "status": "ok" } while the server runs
GET /api/health/readywaiting while the program, governance, circuit or pass fee is not set up; ok once ready; 503 when the database, the chain or the index fails, or jobs failed
POST /api/verifier/webhookProvider callbacks, authenticated by HMAC

Sign-in#

Method and pathBodyReturns
POST /api/auth/challengewalletchallengeId, message, expiresAt
POST /api/auth/verifychallengeId, wallet, signatureSets the session cookie
GET /api/auth/session—The signed-in wallet, or null
POST /api/auth/logout—Ends the session

Signed in#

Method and pathBodyReturns
GET /api/passport—Credential, passes, rule sets with live-pass counts, bindings, index
POST /api/verification-sessionsreturnUrlThe verifier's hosted URL
POST /api/proofs/contextruleCredential, rule set, verifier, circuit, the pass fee, chain time
POST /api/rulesname, nonce, clauses, maxPassAgeSecondsAn operation with its unsigned transaction and the rule set's address
POST /api/mint-bindingsmint, rule, requireSourceAn operation
POST /api/proofsrule, expiresAt, proofAn operation
POST /api/mints/issuemint, destination, amountAn operation
POST /api/transfersmint, source, destination, amountAn operation
POST /api/transactions/submitoperationId, transactionThe operation, now queued
GET /api/operations/{id}—The operation's state

Every POST must carry the site's Origin. Preparing endpoints need an Idempotency-Key.

Operation states#

StateMeaning
DRAFTPrepared, not signed
EXPIREDNever signed within 90 seconds
QUEUEDSigned and saved
SUBMITTEDBroadcast; waiting for finality
UNRESOLVEDThe RPC could not yet establish the outcome; Writ keeps checking the same signature
FINALIZEDExecuted and final
FAILEDFinal, with an on-chain error; nothing changed

Error codes#

CodeStatusMeaning
AUTHENTICATION_REQUIRED, SESSION_EXPIRED401Sign in again
ORIGIN_MISMATCH403The request came from another origin
IDEMPOTENCY_KEY_REQUIRED400Missing or malformed key
IDEMPOTENCY_CONFLICT409The key was used for a different body
SIGNED_OPERATION_PENDING409Another signed operation has no final result yet
TRANSACTION_MISMATCH400The signed bytes differ from the prepared message
DRAFT_EXPIRED409Prepare again
INDEX_STALE503The index is catching up; retry shortly
PROTOCOL_PAUSED503Writ is paused
CREDENTIAL_REQUIRED, CREDENTIAL_EXPIRED, VERIFIER_INACTIVE409The credential cannot prove
PASS_FEE_UNFUNDED409The rule set's pass funds cannot cover the pass fee
PASS_FEE_UNSET503Governance has not set the pass fee yet
MINT_NOT_BINDABLE, UNSUPPORTED_MINT_EXTENSIONS409, 400The mint does not meet the binding profile
TOKEN_ACCOUNT_NOT_FOUND409A token account does not exist at finalized commitment yet
RATE_LIMITED429Too many requests