Build

API

The HTTP routes behind the app: the public ones people answer through, and the owner ones the editor uses.

Mitome's API is a Hono app on Node (apps/api, port 8787 locally). Its clients are the app and, through /mcp, AI agents (see AI agents); the routes are listed here so you can see exactly what crosses the wire.

Public routes (people answering)

Called without cookies (credentials: 'omit'), and the server never reads a session on them, so an answer can't be tied to a Mitome account.

RouteDoes
GET /api/public/forms/:slugThe published form, its checks, whether it's full, and its verified-owner badge (with an ETag)
POST /api/public/forms/:slug/answersSend a sealed answer: { tx, nullifier, answerKey, box, signature, fileIds? } → 202 { receiptId, status: 'sponsoring' }
POST /api/public/forms/:slug/filesUpload a sealed file (up to 25 MB)
GET /api/public/receipts/:idA receipt's status: sponsoring, submitted, recorded, rebuild or rejected
PUT /api/public/receipts/:idA rebuilt proof, signed by the answer's one-time key
DELETE /api/public/receipts/:idDelete my answer: { at, signature }, signed within 5 minutes
GET /api/public/forms/:slug/draw · …/announcementsA draw's state and result; the team's signed updates
POST /api/public/receipts/:id/claimA winner's claim, sealed to the team and signed with the entry's key
GET /api/public/push/key · POST /api/public/receipts/:id/push, …/push/offReminders: the server's push key, then on or off for one receipt
GET/POST /api/public/digest/offThe daily email's unsubscribe link
GET /api/public/door/:token · POST …/check-ins · PATCH/DELETE …/check-ins/:nullifierA door link: the event, checking tickets in, adding guests, undoing
POST /api/public/indexer/:networkPreprod's indexer, read-only: block reads and Mitome's own form contracts

Same answer sent twice? The first receipt comes back. A second, different answer with the same nullifier gets 409. A full or closed form, 410. Over the rate limit, 429.

Owner routes

Signed-in session (Better Auth: email link, passkey, or a guest workspace), scoped to the active workspace. AI agents use OAuth tokens bound to /mcp instead.

AreaRoutes
AccountGET /api/me · GET/PUT /api/vault · GET/POST /api/workspace/keys · PUT /api/workspace/keys/shares
FormsGET/POST /api/forms (?archived=1) · GET/PATCH /api/forms/:id (revision-checked) · POST …/duplicate · POST …/archive, …/unarchive · POST …/trash, …/restore · DELETE /api/forms/:id (from the trash) · PATCH …/slug (a custom link)
VersionsGET /api/forms/:id/versions · POST /api/forms/:id/versions/:version/restore
PublishingPOST /api/forms/:id/publish · GET …/publish/latest · GET …/publish/:jobId/events (server-sent events)
Owner actionsPOST /api/forms/:id/actions (workspace-signed, relayed to Midnight: pause, close, keys, sealing a draw) · GET …/actions, …/actions/:actionId
AnswersGET /api/forms/:id/submissions (sealed; ?limit= up to 500 a page, default 50) · PATCH …/submissions/:sid (star, archive) · GET …/files/:fileId (sealed)
ChainGET /api/forms/:id/chain (the contract's state, read by the server)
ListsGET/POST /api/lists · GET/PATCH/DELETE /api/lists/:id · POST/DELETE /api/lists/:id/entries (hashes only)
DomainGET/PUT/DELETE /api/workspace/domain · POST /api/workspace/domain/verify
WebhooksGET/POST /api/webhooks · PATCH/DELETE /api/webhooks/:id · POST …/test · GET /api/webhooks/:id/deliveries
Draws and updatesGET /api/forms/:id/draw · GET/POST /api/forms/:id/announcements · DELETE …/announcements/:announcementId
ClaimsGET /api/claims · PATCH /api/claims/:id (handled)
Check-inGET /api/forms/:id/door · POST …/check-ins (a ticket code) · POST/PATCH/DELETE …/check-ins/:nullifier (by hand, guests, undo) · POST …/door-links · PATCH/DELETE …/door-links/:linkId
SettingsGET/PATCH /api/me/settings (the daily email) · POST /api/me/digest (send it now) · GET /api/connected-apps · DELETE /api/connected-apps/:id

Writes to webhooks (Send a test included), the workspace key and the domain need an owner or admin. JSON bodies are capped at 1 MB.

Other addresses

AddressDoes
/mcpThe MCP server for AI agents, with OAuth bearer tokens. See AI agents
/.well-known/oauth-protected-resource · /.well-known/oauth-authorization-serverOAuth discovery for MCP clients
GET /og/f/:slugLink previews: the form's title, welcome text, event and cover, for chat apps that don't run JavaScript
GET /api/statusEach Midnight network's state: starting, ready, unfunded (the sponsor has no DUST yet) or error

The checker

apps/verify (port 8788 locally): POST /v1/sessions, GET /v1/sessions/:id, POST …/email, POST …/email/confirm, GET/POST …/passport, GET …/accounts/:provider/start, GET /v1/accounts/callback/:provider, POST …/wallet/challenge, POST …/wallet, POST …/pass. Bodies up to 512 KB. The checker.

On this page