Skip to main content

Launch: −50% for 3 months with LANSARE50

Pricing →

Webhooks

Signed events, signature verification, retries, replay and the endpoint API.

Webhook endpoints are on Business and up. Create them in Settings → Developers → Webhooks or with the endpoint API below (scope webhooks:manage). Each endpoint subscribes to event types and, optionally, to some forms.

Events

EventWhenReadable in GET /events with
response.starteda respondent started the formresponses:read
response.completeda respondent submitted the form (the main trigger)responses:read
response.deleteda response was deleted through the API or MCP (restorable 30 days)responses:read
answer.submittedone answer saved (high volume)responses:read
file.uploadeda respondent uploaded a file (metadata, no link)responses:read
recording.transcribeda voice answer was transcribedresponses:read
form.created / form.updated / form.published / form.unpublished / form.deletedfrom the dashboard, the API or MCPforms:read
webhook.test"Send test" or POST /webhook_endpoints/{id}/testwebhooks:manage
{
  "id": "evt_…", "object": "event", "type": "response.completed", "created": "2026-11-27T10:15:00Z",
  "api_version": "v1", "workspace_id": "ws_…", "form_id": "form_…", "source": "respondent",
  "data": { "object": { "id": "rsp_…", "object": "response", "status": "completed", "fields": { "qst_…": "…" } } }
}

Personal data is in the payload only for endpoints with include_personal_data (setting it needs a key with personal-data access). file.uploaded never contains a download link.

Headers

  • Mform-Signature: t=<unix seconds>,v1=<hex>
  • Mform-Event-Id (evt_…), Mform-Event-Type, Mform-Delivery-Id (wd_…)
  • Content-Type: application/json, User-Agent: mform-webhooks/1

Verify the signature

v1 = hex HMAC-SHA256(secret, t + "." + raw body). Use the raw bytes, not re-serialised JSON. Reject when t is more than 5 minutes away from your clock and compare in constant time. During a secret rotation the header carries two v1= values: accept either.

// use the RAW body (express.raw), not the parsed JSON
import crypto from "node:crypto";
export function verifyMformSignature(rawBody, header, secret, toleranceSec = 300) {
  const items = String(header || "").split(",").map((p) => p.trim().split("="));
  const t = Number((items.find(([k]) => k === "t") || [])[1]);
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const want = Buffer.from(expected);
  return items.some(([k, v]) => {
    if (k !== "v1" || typeof v !== "string") return false;
    const got = Buffer.from(v, "utf8"); // byte length, so non-ASCII input cannot make timingSafeEqual throw
    return got.length === want.length && crypto.timingSafeEqual(got, want);
  });
}

app.post("/webhooks/mform", express.raw({ type: "application/json" }), (req, res) => {
  const raw = req.body.toString("utf8");
  if (!verifyMformSignature(raw, req.get("Mform-Signature"), process.env.MFORM_WEBHOOK_SECRET)) return res.sendStatus(400);
  res.sendStatus(200);                 // answer fast,
  queue.add(JSON.parse(raw));          // process later, dedupe on event.id
});

Test vector — secret whsec_test_4eC39HqLyjWDarjtT1zdp7dc, t=1764238500, body {"id":"evt_test0000000000000000000001","object":"event","type":"webhook.test"} → v1=d6085e5d7fdd562799a01e8fe07338bf0b633a6fa3cc83b4f2cc15266d34933d. Our tests run the Node, Python and PHP snippets on it.

Delivery and retries

  • Answer 2xx within 10 seconds; anything else (or a timeout) is a failure. Process asynchronously and dedupe on the event id: order is not guaranteed.
  • Attempts: immediately, then after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h (8 attempts over about 45 hours). After the last one the delivery is abandoned.
  • An endpoint that keeps failing for 3 days is disabled (status disabled_by_failures) and the workspace owner gets an e-mail. Re-enable it with PATCH status=enabled.
  • Each endpoint is delivered independently, at most 4 requests in flight per endpoint.
  • Only public https URLs: private, loopback and link-local addresses are refused, also after DNS resolution; we connect to the address we validated and never follow redirects.

Replay and recovery

  • GET /webhook_endpoints/{id}/deliveries lists attempts newest first (status pending, succeeded or abandoned; error and response code, never the receiver's body).
  • POST …/deliveries/{delivery_id}/retry queues one delivery again right away.
  • GET /events keeps every event for 30 days: use it to rebuild what your receiver missed.
  • Rotate the secret with POST /webhook_endpoints/{id}/rotate_secret: the previous secret stays valid for expire_previous_in_hours (default 24, 0–168).
  • Endpoints created before v1 keep their old payload and X-Megaforms-Signature, plus Mform-Signature, until you switch them to v1 (see Migrating old webhooks).
# What did my receiver miss during the outage? (events are kept 30 days)
curl "https://mform.md/api/public/v1/events?type=response.completed&created_after=2026-11-27T08:00:00Z&limit=100" \
  -H "Authorization: Bearer $MFORM_API_KEY"

# Or re-send failed deliveries of one endpoint (webhooks:manage, Business+)
curl "https://mform.md/api/public/v1/webhook_endpoints/we_…/deliveries?status=abandoned" -H "Authorization: Bearer $MFORM_API_KEY"
curl -X POST "https://mform.md/api/public/v1/webhook_endpoints/we_…/deliveries/wd_…/retry" -H "Authorization: Bearer $MFORM_API_KEY"

Endpoint API

get/webhook_endpoints

List webhook endpoints listWebhookEndpoints

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP

Parameters

NameInTypeRequiredDescription
limitqueryintegernoPage size, 1–100.
cursorquerystringnoThe `next_cursor` of the previous page. Bound to the same filters and the same key's workspace.
curl https://mform.md/api/public/v1/webhook_endpoints \
  -H "Authorization: Bearer $MFORM_API_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "id": "we_8Hq2LmZ71cX",
      "object": "webhook_endpoint",
      "url": "https://example.com/webhooks/mform",
      "description": "How was your visit?",
      "events": [
        "response.started"
      ],
      "form_ids": [
        "form_8Hq2LmZ71cX"
      ],
      "include_personal_data": false,
      "status": "enabled",
      "api_version": "v1",
      "secret_rotation_ends_at": "2026-11-27T10:15:00Z",
      "last_delivery_at": "2026-11-27T10:15:00Z",
      "last_status_code": 1,
      "failing_since": "2026-11-27T10:15:00Z",
      "created_at": "2026-11-27T10:15:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": "example"
}

post/webhook_endpoints

Create a webhook endpoint createWebhookEndpoint

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP · Idempotency-Key supported

`url` must be public `https://` (private, loopback and link-local addresses are refused, also after DNS resolution). The `secret` (`whsec_…`) is returned only in this response. Zapier and Make "instant" triggers call this on subscribe and `DELETE` on unsubscribe. Plan feature `webhooks` (Business and up).

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoAny unique string (a UUID). The first result is kept 24 hours and replayed for the same key and body (`Idempotent-Replayed: true`); a different body returns `409 idempotency_key_reused`.

Body (JSON)

NameTypeRequiredDescription
urlstring (uri)yes
descriptionstringno
events"response.started" | "response.completed" | "response.deleted" | "answer.submitted" | "file.uploaded" | "recording.transcribed" | "form.created" | "form.updated" | "form.published" | "form.unpublished" | "form.deleted" | "webhook.test"[]yes
form_idsform_… id[] | nullnoOnly events of these forms. `null` = every form the key can see.
include_personal_databooleannoPut respondent name, e-mail, phone and contact answers in the payload. Requires `responses:pii`. Default = whether the key has `responses:pii`.
curl -X POST https://mform.md/api/public/v1/webhook_endpoints \
  -H "Authorization: Bearer $MFORM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/mform","events":["response.started"]}'

Response 201

{
  "id": "we_8Hq2LmZ71cX",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/mform",
  "description": "How was your visit?",
  "events": [
    "response.started"
  ],
  "form_ids": [
    "form_8Hq2LmZ71cX"
  ],
  "include_personal_data": false,
  "status": "enabled",
  "api_version": "v1",
  "secret_rotation_ends_at": "2026-11-27T10:15:00Z",
  "last_delivery_at": "2026-11-27T10:15:00Z",
  "last_status_code": 1,
  "failing_since": "2026-11-27T10:15:00Z",
  "created_at": "2026-11-27T10:15:00Z",
  "secret": "example"
}

get/webhook_endpoints/{endpoint_id}

Retrieve a webhook endpoint getWebhookEndpoint

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes
curl https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX \
  -H "Authorization: Bearer $MFORM_API_KEY"

Response 200

{
  "id": "we_8Hq2LmZ71cX",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/mform",
  "description": "How was your visit?",
  "events": [
    "response.started"
  ],
  "form_ids": [
    "form_8Hq2LmZ71cX"
  ],
  "include_personal_data": false,
  "status": "enabled",
  "api_version": "v1",
  "secret_rotation_ends_at": "2026-11-27T10:15:00Z",
  "last_delivery_at": "2026-11-27T10:15:00Z",
  "last_status_code": 1,
  "failing_since": "2026-11-27T10:15:00Z",
  "created_at": "2026-11-27T10:15:00Z"
}

patch/webhook_endpoints/{endpoint_id}

Update a webhook endpoint updateWebhookEndpoint

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP

Re-enabling an endpoint disabled after failures resets its failure counter.

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes

Body (JSON)

NameTypeRequiredDescription
urlstring (uri)no
descriptionstringno
events"response.started" | "response.completed" | "response.deleted" | "answer.submitted" | "file.uploaded" | "recording.transcribed" | "form.created" | "form.updated" | "form.published" | "form.unpublished" | "form.deleted" | "webhook.test"[]no
form_idsform_… id[] | nullno
include_personal_databooleanno
status"enabled" | "disabled"no
curl -X PATCH https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX \
  -H "Authorization: Bearer $MFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/mform"}'

Response 200

{
  "id": "we_8Hq2LmZ71cX",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/mform",
  "description": "How was your visit?",
  "events": [
    "response.started"
  ],
  "form_ids": [
    "form_8Hq2LmZ71cX"
  ],
  "include_personal_data": false,
  "status": "enabled",
  "api_version": "v1",
  "secret_rotation_ends_at": "2026-11-27T10:15:00Z",
  "last_delivery_at": "2026-11-27T10:15:00Z",
  "last_status_code": 1,
  "failing_since": "2026-11-27T10:15:00Z",
  "created_at": "2026-11-27T10:15:00Z"
}

delete/webhook_endpoints/{endpoint_id}

Delete a webhook endpoint deleteWebhookEndpoint

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP

Pending deliveries are cancelled. Endpoints are configuration, not customer data, so they can be deleted.

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes
curl -X DELETE https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX \
  -H "Authorization: Bearer $MFORM_API_KEY"

Response 200

{
  "id": "example",
  "object": "example",
  "deleted": true
}

post/webhook_endpoints/{endpoint_id}/rotate_secret

Rotate the signing secret rotateWebhookSecret

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP · Idempotency-Key supported

Returns a new `whsec_…` secret (shown once). For `expire_previous_in_hours` (default 24, 0–168) every delivery is signed with both secrets (two `v1=` values), so receivers can switch without downtime.

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes

Body (JSON)

NameTypeRequiredDescription
expire_previous_in_hoursintegerno
curl -X POST https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX/rotate_secret \
  -H "Authorization: Bearer $MFORM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 200

{
  "id": "we_8Hq2LmZ71cX",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/mform",
  "description": "How was your visit?",
  "events": [
    "response.started"
  ],
  "form_ids": [
    "form_8Hq2LmZ71cX"
  ],
  "include_personal_data": false,
  "status": "enabled",
  "api_version": "v1",
  "secret_rotation_ends_at": "2026-11-27T10:15:00Z",
  "last_delivery_at": "2026-11-27T10:15:00Z",
  "last_status_code": 1,
  "failing_since": "2026-11-27T10:15:00Z",
  "created_at": "2026-11-27T10:15:00Z",
  "secret": "example"
}

post/webhook_endpoints/{endpoint_id}/test

Send a test event testWebhookEndpoint

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP · Idempotency-Key supported

Sends a signed `webhook.test` event now and returns the delivery. 10 per minute.

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes
curl -X POST https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX/test \
  -H "Authorization: Bearer $MFORM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response 200

{
  "id": "wd_8Hq2LmZ71cX",
  "object": "webhook_delivery",
  "endpoint_id": "example",
  "event_id": "example",
  "event_type": "response.started",
  "status": "pending",
  "attempts": 1,
  "next_attempt_at": "2026-11-27T10:15:00Z",
  "last_attempt_at": "2026-11-27T10:15:00Z",
  "response_status": 1,
  "duration_ms": 1,
  "error": "example",
  "created_at": "2026-11-27T10:15:00Z"
}

get/webhook_endpoints/{endpoint_id}/deliveries

List deliveries of an endpoint listWebhookDeliveries

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP

Newest first. The receiver's response body is never stored or returned.

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes
limitqueryintegernoPage size, 1–100.
cursorquerystringnoThe `next_cursor` of the previous page. Bound to the same filters and the same key's workspace.
statusquery"pending" | "succeeded" | "failed" | "abandoned"noThe v1 delivery worker writes `pending` (waiting, or failed and scheduled for another attempt, with `error` set), `succeeded` and `abandoned` (all 8 attempts failed). Use `abandoned` to find deliveries to re-send. `failed` is accepted but no current sender writes it, so it returns an empty list.
curl https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX/deliveries \
  -H "Authorization: Bearer $MFORM_API_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "id": "wd_8Hq2LmZ71cX",
      "object": "webhook_delivery",
      "endpoint_id": "example",
      "event_id": "example",
      "event_type": "response.started",
      "status": "pending",
      "attempts": 1,
      "next_attempt_at": "2026-11-27T10:15:00Z",
      "last_attempt_at": "2026-11-27T10:15:00Z",
      "response_status": 1,
      "duration_ms": 1,
      "error": "example",
      "created_at": "2026-11-27T10:15:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": "example"
}

post/webhook_endpoints/{endpoint_id}/deliveries/{delivery_id}/retry

Retry a delivery now retryWebhookDelivery

Scope: webhooks:manage · Plan: Business and up · MCP tool: not exposed over MCP · Idempotency-Key supported

Re-sends the same event (same `id`, fresh signature). Receivers must de-duplicate on the event `id`.

Parameters

NameInTypeRequiredDescription
endpoint_idpathwe_… idyes
delivery_idpathwd_… idyes
curl -X POST https://mform.md/api/public/v1/webhook_endpoints/we_8Hq2LmZ71cX/deliveries/wd_8Hq2LmZ71cX/retry \
  -H "Authorization: Bearer $MFORM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response 200

{
  "id": "wd_8Hq2LmZ71cX",
  "object": "webhook_delivery",
  "endpoint_id": "example",
  "event_id": "example",
  "event_type": "response.started",
  "status": "pending",
  "attempts": 1,
  "next_attempt_at": "2026-11-27T10:15:00Z",
  "last_attempt_at": "2026-11-27T10:15:00Z",
  "response_status": 1,
  "duration_ms": 1,
  "error": "example",
  "created_at": "2026-11-27T10:15:00Z"
}