Developers

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.

Base URL. Read-only endpoints are public at https://api.01.run; receipt ingestion is at https://ingest.01.run. Always confirm chain_id and the genesis hash from /health before sending data. 01-mainnet-1 is the current network. During the early period, keep an independent copy of anything you cannot afford to lose.

Authentication

Two mechanisms are used:

Every response is JSON. Errors use HTTP status codes and { "error": "..." }.

Quickstart

terminal
# 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.

MethodPathPurposeAuth
POST/v1/stream/receiptsIngest up to 1000 items per requestAPI key
GET/v1/stream/receipts/:idRead a receipt and its Merkle proofPublic
GET/v1/stream/batchesList recent Merkle batchesPublic
GET/v1/stream/statsReceipt, batch and anchor countersPublic
POST/v1/stream/anchorsSubmit child-gateway batch roots for aggregationAPI key
GET/v1/stream/anchorsList aggregate anchorsPublic
GET/v1/stream/anchors/:idRead an aggregate anchor and proofPublic

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.

MethodPathPurposeAuth
GET/v1/open/events?since=&limit=Cursor feed of public eventsAPI key
POST/v1/open/subscriptionsCreate a webhook subscriptionAPI key
GET/v1/open/subscriptionsList subscriptionsAPI key
DELETE/v1/open/subscriptions/:idDelete a subscriptionAPI key
POST/v1/open/subscriptions/:id/testSend a signed test deliveryAPI key
GET/v1/open/deliveriesInspect delivery attemptsAPI key

Verify a webhook (Node.js)

verify.mjs
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.

MethodPathPurpose
POST/v1/connect/appsCreate an application (user session)
POST/v1/connect/apps/:id/rotate-secretRotate the client secret
POST/v1/connect/requestsCreate an authorization request
GET/v1/connect/lookupLook up an app by client ID
POST/v1/connect/requests/:id/approveUser approves a request on-device
POST/v1/connect/requests/:id/denyUser denies a request
POST/v1/connect/tokenExchange an approved request for a claim
POST/v1/connect/verifyVerify a claim
GET/v1/me/connect/authorizationsList a user's authorizations
POST/v1/me/connect/authorizations/:id/revokeRevoke 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.