A webhook is an automatic message sent to a URL when a selected event happens. Suppose a customer submits a quote form. The form service sends a message to a receiving URL, and your automation can use it to create a lead in your CRM. The receiving URL might be supplied by the automation tool, so a simple setup may need no custom code.

Follow one message from the form to the CRM
- Event. The form service detects a submission that matches your settings.
- Delivery. It sends an HTTP request to your receiving URL. The request body, often JSON, carries selected details such as a submission ID.
- Action. Your receiver checks the message, maps the form fields and attempts to create the lead. Its own log or activity history shows what it actually did.
Those are separate checkpoints. If the form service shows a successful response, the receiving URL acknowledged the request. The CRM can still be missing the lead because a required field was empty or a later step failed. Check the delivery and the final record.
What a webhook payload looks like
The body of the request is usually a small JSON document. This shortened example follows the shape MailerLite documents for its subscriber.created event, with invented values:
{
"event": "subscriber.created",
"id": "31897397363737859",
"email": "dummy@example.com",
"status": "active",
"created_at": "2026-11-16 09:12:44",
"fields": {
"name": "Dummy",
"company": "Example Ltd"
}
}
Your receiver reads the event name to decide what to do and uses the id to tell one subscriber from another. The fields object holds the values you map into the next system, such as the name column in your CRM.
Webhook or API request?
Use a webhook when you want to react to a new event, such as the next submission. Use a normal API request when you need to look up an existing order or fetch older records. Many systems combine them. The webhook tells your app which record changed, then the app asks the API for that record’s current state.
| Webhook | API polling | |
|---|---|---|
| Who starts the request | The sending service, when the event happens | Your app, on a schedule |
| Delay | Usually seconds after the event | Up to one polling interval |
| Requests when nothing changes | None | One per interval |
| What you need | A public URL that answers quickly | An API key and a scheduled job |
| Missed events | Depend on the sender's retries; check its delivery log | Picked up on the next poll |
Webhooks in common site tools
- WPForms: the Webhooks addon, included with the Elite license, adds Settings > Webhooks to each form in the builder. You paste the Request URL, choose the method and JSON format, map form fields into the Request Body and can add conditional logic so only some submissions are sent. The WPForms webhooks documentation walks through each field, and our WPForms page compares the licenses.
- MailerLite: webhooks report subscriber and campaign events, such as
subscriber.created,subscriber.unsubscribedandcampaign.sent, to your URL. The MailerLite webhook documentation lists every event; our MailerLite page covers the plans. - Payment providers: a confirmed payment usually arrives as a webhook, which is how a shop can send a file only after the money clears. Our guide to delivering a paid PDF with payment webhooks shows that flow.
Test your first webhook
- Use a test destination and an obviously hypothetical entry. Choose one event so you know which delivery to expect.
- Open the sender’s delivery history. Check the event, time, response and any field needed by the next step. Avoid copying personal information into shared logs.
- Check the receiving workflow and its result. If the sender supports signing, configure the receiver to verify the signature using the sender’s documented method before relying on the event.
A retry can create a second delivery for the same event. If the workflow sends email, moves money or changes inventory, check how it avoids repeating that action.
Answer fast, verify the sender and ignore duplicates
- Answer with a 2xx status quickly. Senders treat a timeout or an error status as a failed delivery and send the event again. MailerLite, for example, asks for a response in under 3 seconds and retries three more times after 10, 100 and 1,000 seconds. Save the event, reply, and do the slow work afterwards.
- Check the signature. When the sender signs requests, it hashes the body with a shared secret and puts the result in a header. MailerLite uses an HMAC-SHA256 hash in a
Signatureheader. Compute the same hash on your side and reject requests that do not match. - Record each event ID before acting. Store the event or record ID with the action you took. When the same ID arrives again, reply with 2xx and skip the action, so a retry does not send a second email or create a second order.