Build on 01.
Everything is plain HTTP and JSON. There is no proprietary SDK to install and no external runtime. This page documents the endpoints used by 01 Vault and the public developer platform.
Authentication
Two mechanisms are used:
- API key — send x-api-key: 01ak_…. Create and rotate keys in 01 Vault → Developer. Keys are scoped to one 01 identity.
- Identity signature — user-facing endpoints use a challenge/response signed by the identity key. The mobile app handles this; third-party apps use 01 Connect.
Every response is JSON. Errors use HTTP status codes and { "error": "..." }.
Quickstart
# 1. Health (no key) curl https://api.01.run/health # 2. Gateway statistics (no key) curl https://ingest.01.run/v1/stream/stats # 3. Write receipts in batches of up to 1000 items (API key from 01 Vault → Developer) curl -X POST https://ingest.01.run/v1/stream/receipts \ -H "content-type: application/json" \ -H "x-api-key: 01ak_…" \ -d '{"items":[ {"payload_hash":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","tenant":"my-app","ref":"order-1042"}, {"payload_hash":"486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7","tenant":"my-app"} ]}' # 4. Fetch one receipt and its Merkle proof curl https://ingest.01.run/v1/stream/receipts/rc_… # 5. Read the public event feed curl "https://ingest.01.run/v1/open/events?since=0&limit=50" \ -H "x-api-key: 01ak_…"
High-throughput receipt gateway
If you need to prove that millions of API calls happened — without putting each call on a chain — submit each call as a receipt. The gateway groups receipts into one-second Merkle batches and anchors the roots on 01 Chain. A receipt is verifiable independently, and batches can be aggregated across gateways.
| Method | Path | Purpose | Auth |
|---|---|---|---|
| POST | /v1/stream/receipts | Ingest up to 1000 items per request | API key |
| GET | /v1/stream/receipts/:id | Read a receipt and its Merkle proof | Public |
| GET | /v1/stream/batches | List recent Merkle batches | Public |
| GET | /v1/stream/stats | Receipt, batch and anchor counters | Public |
| POST | /v1/stream/anchors | Submit child-gateway batch roots for aggregation | API key |
| GET | /v1/stream/anchors | List aggregate anchors | Public |
| GET | /v1/stream/anchors/:id | Read an aggregate anchor and proof | Public |
Receipt items are capped at 1000 per request. Payloads are hashes and metadata; do not send plaintext personal data.
Open platform & webhooks
Subscribe to public events (published works, announcements, anchors) and receive signed webhook deliveries. Each subscription has its own signing secret; verify the HMAC before trusting a payload.
| Method | Path | Purpose | Auth |
|---|---|---|---|
| GET | /v1/open/events?since=&limit= | Cursor feed of public events | API key |
| POST | /v1/open/subscriptions | Create a webhook subscription | API key |
| GET | /v1/open/subscriptions | List subscriptions | API key |
| DELETE | /v1/open/subscriptions/:id | Delete a subscription | API key |
| POST | /v1/open/subscriptions/:id/test | Send a signed test delivery | API key |
| GET | /v1/open/deliveries | Inspect delivery attempts | API key |
Verify a webhook (Node.js)
import express from "express";
import { createHmac, timingSafeEqual } from "node:crypto";
const app = express();
// Keep the raw bytes: signatures are computed over the exact request body.
app.use(express.json({ verify: (req, _res, buf) => { req.rawBody = buf; } }));
function verify(rawBody, header, secret) {
const [scheme, signature] = String(header || "").split("=");
if (scheme !== "sha256") return false;
const expected = createHmac("sha256", secret).update(rawBody).digest();
const a = Buffer.from(signature, "hex");
return a.length === expected.length && timingSafeEqual(a, expected);
}
app.post("/01-webhook", (req, res) => {
const ok = verify(req.rawBody, req.get("x-01-signature"), process.env.ZERO1_WEBHOOK_SECRET);
if (!ok) return res.status(401).send("bad signature");
res.status(200).send("ok");
});
01 Connect
01 Connect lets a third-party app request a scoped, user-approved claim instead of a password. Apps are created by a 01 identity; authorizations are approved in the user's app and can be revoked individually.
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/connect/apps | Create an application (user session) |
| POST | /v1/connect/apps/:id/rotate-secret | Rotate the client secret |
| POST | /v1/connect/requests | Create an authorization request |
| GET | /v1/connect/lookup | Look up an app by client ID |
| POST | /v1/connect/requests/:id/approve | User approves a request on-device |
| POST | /v1/connect/requests/:id/deny | User denies a request |
| POST | /v1/connect/token | Exchange an approved request for a claim |
| POST | /v1/connect/verify | Verify a claim |
| GET | /v1/me/connect/authorizations | List a user's authorizations |
| POST | /v1/me/connect/authorizations/:id/revoke | Revoke one authorization |
Chain protocol
The chain specification, event schemas and signature rules ship with the node source (chain/docs/01-chain-spec-v1.0.md). The ledger is append-only and stores hashes, Merkle roots and anchors — never encrypted blobs or plaintext. Identities sign events with post-quantum keys; validators reject events with invalid signatures or stale sequence numbers.
Check live network status → Security model →
Security reports: security@01.run. Please do not open public issues for vulnerabilities. This documentation describes 01-mainnet-1 and may be extended as the network evolves; the genesis rules themselves do not change.