Browse and search developers

Webhooks

Webhook payloads

The JSON envelope Formit sends with every webhook, the request headers, and a full example payload for each subscribable event type.

On this page
  1. Envelope
  2. Request headers
  3. Submission events
  4. Form lifecycle events
  5. Test event
  6. Handling payloads safely

Every delivery is an HTTPS POST with Content-Type: application/json. The body is a JSON envelope with the same five top-level fields for every event. Event-specific fields live under data.

Envelope

FieldTypeDescription
idstringUnique id of this delivery. It is the same value as the X-Formit-Delivery-Id header and stays the same across retries of that delivery.
typestringThe event type, for example form.submission.created. Also sent in X-Formit-Event.
api_versionstringPayload schema version. Currently 2026-08-25.
created_atstringISO 8601 UTC time when the event was emitted.
dataobjectEvent-specific fields, described below.

Request headers

HeaderValue
X-Formit-Signaturet=<unix_seconds>,v1=<hex>. See the signature verification guide.
X-Formit-TimestampThe same Unix timestamp (seconds) as t in the signature.
X-Formit-EventThe event type.
X-Formit-Delivery-IdThe delivery id, equal to the envelope id.
Content-Typeapplication/json
User-AgentFormit-Webhook/1.0

Key order in the body is not guaranteed, so parse the JSON and do not compare bodies as strings. Compute the signature over the raw bytes you received.

Submission events

form.submission.created fires when a respondent completes a form. form.submission.partial fires only when the form collects partial responses, and only the first time a partial response is saved for a respondent session. Later saves in the same session do not fire it again. When that respondent finishes, form.submission.created fires with the same submission_id.

FieldTypeDescription
organization_idstringOrganization that owns the form.
workspace_idstringWorkspace that owns the form and the webhook.
form_idstringForm that received the response.
form_namestringForm name at the time of the event.
submission_idstringThe response record.
is_partialbooleantrue for form.submission.partial, false for form.submission.created.
submitted_atstringISO 8601 creation time of the submission record. For a response that started as a partial, this is when the partial was first saved.
answer_countnumberNumber of answers stored on the submission when the event fired.
form.submission.created
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "form.submission.created",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "organization_id": "h3m9c2v7b1n4x8z5l0k6j2wd",
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "form_id": "d2f6g9h1j4k7l0z3x5c8v1bn",
    "form_name": "Contact form",
    "submission_id": "m4n7b0v3c6x9z2l5k8j1h4gq",
    "is_partial": false,
    "submitted_at": "2026-11-25T10:15:29.874Z",
    "answer_count": 4
  }
}
form.submission.partial
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "form.submission.partial",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "organization_id": "h3m9c2v7b1n4x8z5l0k6j2wd",
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "form_id": "d2f6g9h1j4k7l0z3x5c8v1bn",
    "form_name": "Contact form",
    "submission_id": "m4n7b0v3c6x9z2l5k8j1h4gq",
    "is_partial": true,
    "submitted_at": "2026-11-25T10:12:02.410Z",
    "answer_count": 2
  }
}

Form lifecycle events

Lifecycle events share organization_id, workspace_id, form_id and form_name. Some also include published and version.

EventExtra fields
form.createdpublished, the form’s published flag at creation (normally false). Fires for forms created in the builder and for accepted AI drafts.
form.publishedpublished: true and version, the new published version number. Fires on every publish, including re-publishes.
form.unpublishedpublished: false. Fires only when a published form is taken offline.
form.deletedNone. Fires after the form and its responses are deleted.
form.created
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "form.created",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "organization_id": "h3m9c2v7b1n4x8z5l0k6j2wd",
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "form_id": "d2f6g9h1j4k7l0z3x5c8v1bn",
    "form_name": "Untitled form",
    "published": false
  }
}
form.published
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "form.published",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "organization_id": "h3m9c2v7b1n4x8z5l0k6j2wd",
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "form_id": "d2f6g9h1j4k7l0z3x5c8v1bn",
    "form_name": "Contact form",
    "published": true,
    "version": 3
  }
}
form.unpublished
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "form.unpublished",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "organization_id": "h3m9c2v7b1n4x8z5l0k6j2wd",
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "form_id": "d2f6g9h1j4k7l0z3x5c8v1bn",
    "form_name": "Contact form",
    "published": false
  }
}
form.deleted
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "form.deleted",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "organization_id": "h3m9c2v7b1n4x8z5l0k6j2wd",
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "form_id": "d2f6g9h1j4k7l0z3x5c8v1bn",
    "form_name": "Contact form"
  }
}

Test event

webhook.test cannot be subscribed to. It is sent when you click Send test event and has a different data shape.

webhook.test
{
  "id": "q8k2n5w7r1t4y6u9i3o0p2as",
  "type": "webhook.test",
  "api_version": "2026-08-25",
  "created_at": "2026-11-25T10:15:30.123Z",
  "data": {
    "workspace_id": "p5t1r8e3w6q9y2u4i7o0a3sf",
    "webhook_id": "w9e2r5t8y1u4i7o0p3a6s9df",
    "message": "Test event from Formit AI"
  }
}

Handling payloads safely

  • Switch on type and ignore types you do not handle, so new event types do not break your receiver.
  • Deduplicate on id. A retry reuses the same id, so a delivery your server processed but failed to acknowledge can arrive again.
  • Check api_version and log anything you do not recognise.
  • Answer values are not included. Fetch them with GET /v1/forms/{form_id}/responses/{submission_id} (the submission id is the response id), or find the response in the form’s Results.

Ready?

Build your first AI form in minutes.

No credit card. Generate from a prompt, enable follow-ups, and publish a link or embed the same day.