Webhooks

A webhook sends the events of your forms to a URL of your server as they happen: a new submission, a form updated, a submission deleted. Each call is signed, so that your server can check it comes from BackMyForm.

Creating a webhook

A webhook is a URL subscribed to some events, for all the forms of the workspace or for one form. Create it in the BackMyForm app, in Settings → Webhooks (all the forms) or in the Integrations tab of a form, or with the API: see Webhook endpoints.

The URL must be a public https address. The form of a webhook is chosen when it is created and can't be changed. Webhooks are included in every plan, with no limit on their number.

Events

EventSent when
form.createdA form is created. Only for the webhooks of all the forms.
form.updatedThe settings of a form change.
form.deletedA form is moved to the trash.
form.restoredA form is restored from the trash.
submission.createdA submission is received, once it is checked as not spam.
submission.startedA visitor starts filling a form.
submission.abandonedA visitor stopped filling a form without sending it: no activity for 30 minutes.
submission.deletedA submission is moved to the trash.
submission.restoredA submission is restored from the trash.

submission.started and submission.abandoned are sent for the forms that use the forms.js script, on the plans with partial submissions. A visitor may still send an abandoned form later: submission.created is then sent for the same submission.

The submissions detected as spam are never sent.

The request

Each event is sent to the URL of the webhook with a POST request, whose JSON body has the type of the event, its date, and its data: the form, and the submission for the events of the submissions. The form and the submission are the objects of the API, as returned by GET /v1/forms/:id and GET /v1/forms/:formId/submissions/:id (without the personal read state).

Request body

{
	"type": "submission.created",
	"timestamp": "2026-11-20T14:32:11.000Z",
	"data": {
		"form": {
			"id": "1f0b2c4e-1a2b-6c3d-8e4f-5a6b7c8d9e0f",
			"shortId": "k3x9q2mf",
			"name": "Contact",
			"enabled": true,
			"submissionsCount": 42,
			"lastSubmissionAt": "2026-11-20T14:32:10.000Z"
		},
		"submission": {
			"id": "1f0b2c4f-3c4d-6e5f-9a0b-1c2d3e4f5a6b",
			"origin": "https://www.example.com",
			"data": [
				{ "fieldId": "name", "value": "John Smith", "file": null },
				{ "fieldId": "email", "value": "[email protected]", "file": null },
				{ "fieldId": "message", "value": "Hello!", "file": null }
			],
			"startedAt": null,
			"createdAt": "2026-11-20T14:32:10.000Z",
			"updatedAt": "2026-11-20T14:32:11.000Z",
			"abandonedAt": null,
			"sentEmails": [],
			"spam": { "status": "safe", "score": 0.4, "checkedAt": "2026-11-20T14:32:11.000Z" }
		}
	}
}

The form is shortened here. The request has these headers, and the custom headers of the webhook:

HeaderValue
content-typeapplication/json
user-agentBackMyForm-Webhooks
webhook-idThe id of the event: the same for every attempt to send it.
webhook-timestampWhen the request was sent, in seconds since the Unix epoch.
webhook-signatureThe signature of the request.

Responding

Respond with a 2xx status within 10 seconds: any other status, a redirection, an error or no response in time is a failed call, sent again later. Respond first, then do the work: put the event in a queue rather than processing it before responding.

The same event can be received more than once, for example when your response was lost. Use the webhook-id header to process each event only once.

Verifying the signature

The calls follow the Standard Webhooks specification. Check the signature of each call before trusting it, with the secret of the webhook: a whsec_ string shown in the app and returned by the API to the owners and the admins.

The signature is an HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body}, with the part of the secret after whsec_, base64 decoded, as the key. The webhook-signature header has the base64 signature after v1,. Compute it from the raw body, before parsing it, and refuse the calls whose timestamp is more than 5 minutes old, to stop the replay of an old call.

import { createHmac, timingSafeEqual } from 'node:crypto';

// rawBody: the body as received, before JSON.parse
function verifyWebhook(rawBody, headers, secret) {
	const id = headers['webhook-id'];
	const timestamp = headers['webhook-timestamp'];
	const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64');
	const expected = createHmac('sha256', key)
		.update(`${id}.${timestamp}.${rawBody}`)
		.digest('base64');

	if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 5 * 60) {
		return false;
	}

	// the header may hold several signatures, separated by spaces
	return headers['webhook-signature'].split(' ').some((signature) => {
		const [version, value] = signature.split(',');

		return (
			version === 'v1' &&
			value.length === expected.length &&
			timingSafeEqual(Buffer.from(value), Buffer.from(expected))
		);
	});
}

Verify a call

The Standard Webhooks libraries, available for many languages, do the same check: new Webhook(secret).verify(rawBody, headers).

Retries

A failed call is sent again later, up to 8 times: 1 minute after the first attempt failed, then after 5 minutes, 15 minutes, 1 hour, 3 hours, 6 hours, 12 hours and 24 hours. The last attempt is about 46 hours after the first one. Every attempt has the same webhook-id.

When an event fails all its attempts, the user who created the webhook and the owner of the workspace receive an email, at most once a day per webhook.

Automatic disabling

A webhook that keeps failing is disabled, and its pending retries are cancelled:

  • after 5 days of failures with 3 events that failed all their attempts,
  • or after 24 hours of failures with 500 failed calls.

The failures are counted since the last successful call. A disabled webhook has enabled: false and disabledReason: "failing". Enable it again once your server is fixed, in the app or with PUT /v1/webhooks/:id.

Logs

Every call is logged for 7 days with its request, its response and its duration, in the app. A call can be sent again from its log, for example once your server is fixed.