Webhook
Definition
A webhook is an automated HTTP callback that sends real-time data from one application to another when a specific event occurs. Unlike APIs which require you to poll for data, webhooks push data to you instantly, making them event-driven and highly efficient.
How It Works
Event occurs
A user submits a form on WittyForm.
Payload created
The form data is packaged as a JSON payload.
HTTP POST sent
The payload is sent to your configured URL endpoint.
Your server processes
Your application receives the data and takes action (save to DB, send email, update CRM, etc.).
POST https://your-app.com/api/form-webhook
Content-Type: application/json
{"formId": "abc123", "email": "[email protected]", "name": "Jane Doe"}
Why It Matters for Forms and Surveys
- Instant notifications: get alerted the moment a form is submitted.
- CRM integration: push new leads directly to Salesforce, HubSpot, or your custom system.
- Workflow automation: trigger email sequences, Slack messages, or task creation automatically.
- Data sync: keep your database in real-time sync with form submissions.
- No polling overhead: webhooks are more efficient than repeatedly checking for new submissions.
Webhook vs. API
| Aspect | Webhook | API |
|---|---|---|
| Direction | Push (server sends to you) | Pull (you request from server) |
| Trigger | Event-driven (automatic) | Request-driven (manual/scheduled) |
| Real-time | Yes, instant | Depends on polling frequency |
| Best for | Notifications, syncing | Querying, bulk operations |
Related Terms