Webhook

Webhook

How it works

Webhooks are a way to receive notifications when a new form submission occurs. With HeyForm, whenever someone submits a form, the response data is sent to your specified URL in JSON format through a POST request.

Add a webhook

Publish your form and go to the Connect page. Click Connect to Webhooks.
 
notion image
 
You’ll be prompted to configure your webhook endpoint.
 
notion image
 

Endpoint URL

For the endpoint URL, set up an HTTP or HTTPS endpoint that can accept webhook requests with a POST method:
  • Handles POST requests with a JSON payload
  • Returns a successful status code (2XX) within 10 seconds

Example webhook event

{ "id": "660a08beb52c552fe0731c0b", "formId": "nAz7DjoO", "formName": "Contact form", "answers": [ { "id": "cX8QlEHXZ41S", "kind": "short_text", "title": "What is your name?", "value": "Tim" }, { "id": "tq1Q33cIErou", "kind": "number", "title": "What is your age?", "value": 12 } ], "fields": [ { "description": [], "id": "cX8QlEHXZ41S", "kind": "short_text", "layout": { "align": "split_right", "brightness": 0, "mediaType": "image", "mediaUrl": "https://images.unsplash.com/photo-1646013532943-d5b86e8689b8?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1080&q=80" }, "properties": null, "title": [ "What is your name?" ], "validations": { "required": false } }, { "description": [], "id": "tq1Q33cIErou", "kind": "number", "properties": {}, "title": [ "What is your age?" ], "validations": {} }, { "description": [ "Thanks for completing this form. Now create your own form." ], "id": "GSCcVIG1kffM", "kind": "thank_you", "layout": null, "properties": null, "title": [ "Thank you!" ], "validations": null } ] }