Build

Webhooks

Mitome posts every recorded answer to your server, still sealed and signed the Standard Webhooks way. Your server opens it with your exported key.

/settings
Settings, Webhooks section: the add form, and a webhook to a local receiver opened with Send a test and its deliveries, each answer.recorded event Delivered (204) with its number of tries

Add one

Under Settings → Webhooks (Settings is in your avatar menu), enter your server's URL and choose All forms or one form, then Add. The signing secret is shown once; copy it into your server's secrets. Each webhook has an on/off switch and its recent deliveries (when, result, tries).

Owners and admins manage webhooks, up to 20 per workspace. In production the URL must be https and resolve to a public address; it's checked when you save and again at every delivery.

The request

Real deliveries are one event, answer.recorded, sent once an answer is recorded on Midnight (Send a test sends a webhook.test event so you can check your endpoint first):

POST /your/path
webhook-id: dlv_…
webhook-timestamp: 1795224710
webhook-signature: v1,<base64 HMAC-SHA256(key, id + "." + timestamp + "." + body)>
content-type: application/json
{
  "type": "answer.recorded",
  "timestamp": "2026-11-21T01:31:50.000Z",
  "data": {
    "form": { "id": "frm_…", "slug": "2kdhncnx", "title": "Product feedback", "contractAddress": "…", "network": "local" },
    "receiptId": "sub_…",
    "txId": "…",
    "nullifier": "…",
    "answerKey": "<hex: the answer's one-time Ed25519 key>",
    "recordedAt": "…",
    "box": "<base64url: the sealed answer>",
    "signature": "<base64url: the answer key's signature over the box>"
  }
}

The HMAC key is the secret without its whsec_ prefix, base64-decoded, as in Standard Webhooks. Using the whole whsec_… string as the key never matches.

Reply with any 2xx within 10 seconds. Otherwise Mitome tries again after 30 s, 2 min, 10 min, 1 h and 6 h, then marks it failed. box is null if the person deleted their answer before it was delivered.

Open the answer

The payload is sealed, like everything Mitome stores. To read it on your server:

Export your answer key. Settings → Webhooks → Export key, then Download key file, saves mitome-answer-key.json. Anyone holding it can read every answer sealed to you, so put it in your server's secret store, never in code.

/settings
The Export your answer key dialog: a warning that anyone holding the file can read every answer sealed to you, with Cancel and Download key file

Run the receiver. examples/webhook-receiver in the repo is a small Node server with no dependency on Mitome's code, only the @noble libraries:

cd examples/webhook-receiver && npm install
MITOME_WEBHOOK_SECRET=whsec_… MITOME_ANSWER_KEY=./mitome-answer-key.json node receiver.mjs

It checks, then opens. For each delivery it verifies the Standard Webhooks signature and the timestamp (5 minutes), verifies the answer's own Ed25519 signature against answerKey, then opens the box with your key and prints the answers.

A delivery from the demo workspace (one of its seeded answers, so it has no ending; answers sent from the form page also say which ending the person reached), opened by the receiver:

Waiting for Mitome webhooks on http://localhost:8099
New answer to “Product feedback” (receipt sub_j7txwj6sd5b8jvtx):
{
  version: 1,
  answers: {
    q_name: 'Margaret',
    q_nps: 4,
    q_rating: 3,
    q_used: [ 'c_dash', 'c_rep', 'c_int' ],
    q_tenure: 'c_t1',
    q_improve: 'More templates',
    q_follow: true
  },
  hidden: { ref: 'newsletter' },
  variables: {},
  other: {},
  seconds: 122,
  formVersion: 1
}

Answers are keyed by question id; choices by choice id. An answer sealed before you joined the team can't be opened with your key.

On this page