Skip to content
VOUCHVOUCHDocs

Reference

HTTP API

Two services speak HTTP: the attestor (verify, sign, the rail API) and this site (anchors, revocations, status). Bodies are JSON; proofs travel as base64url.

On this page

#Attestor

The hosted one is https://vouch-attest.onrender.com; run your own with the same binary.

HTTP
POST /v1/attest    { "proof": "<base64url>", "audience"?: "…" }
→ 200 { "attestation": { "message", "signature", "attestor", "slot" } }  |  422 { "verdict": { "kind": "…" } }

POST /v1/verify    { "proof": "<base64url>", "audience"?: "…" }
→ 200 VerificationResult   (the same JSON as pof-verify --json; nothing signed)

GET  /v1/pubkey     → { "pubkey", "verifier", "vkFingerprint", "audience", "demoProver" }
GET  /v1/anchor/{h} → the anchor records it trusts at height h
GET  /health        → ok

#Rail API

HTTP
POST /v1/certificates             { "certificate", "audience", "epoch"?, "dormantSince"?, "intent"? }
→ 200 { "status": "pre-cleared", "certificate": { "id", "revealed", "tags", … }, "result": { … } }  |  422 { "status": "refused", … }

GET  /v1/certificates?audience=…  → the rail's certificates, newest first
GET  /v1/certificates/{id}

POST /v1/certificates/{id}/match  { "txid", "network"? }  |  { "nullifiers": ["<hex>", …] }
→ { "status": "matched" | "mismatch", "certificate": { "deposit": { "result": { "kind": "Matched", "spent": 2 } } } }

POST /v1/batch                    { "batch", "audience", "epoch"?, "attest"?: true }
→ BatchResult, plus { "attestation" } for pof-reserve when attest is set and the batch is valid
SettingEffect
POF_RAIL_TOKENEvery call that writes needs Authorization: Bearer <token>.
POF_WEBHOOK_URL, POF_WEBHOOK_SECRETEvents certificate.precleared, deposit.matched and deposit.mismatch are posted with X-Vouch-Signature: sha256=<hmac of the body>.
POF_STOREPersist the registry to a JSON file (written atomically). Without it, certificates live in memory.

The store holds ids, tags, revealed nullifiers, verdicts and times, never proof bytes.

#Site

RouteDoes
GET /api/anchorsThe published anchor table (mainnet, testnet and the labelled demo anchor).
GET /api/revocations{ "secrets": [hex…] }: every published revocation secret.
POST /api/revocations{ "secret": "<hex>" } publishes a revocation. Only the holder knows the secret.
GET /api/statusWhat this deployment has configured: attestor, devnet programs, shared store. Nothing secret.
POST /api/attest{ "proof" }: a thin, rate-limited proxy to the attestor’s /v1/attest.
GET /api/reserveThe devnet reserves feed, its token supply and whether it is stale.
GET /schema/pof-v1.jsonThe JSON Schema every verifier’s result follows.

/api/relay, /api/demo-prove and the POST side of /api/reserve drive the devnet demo with a demo relayer key. They are rate-limited and capped per hour, and are not an API to build on.