Privacy

What is a webhook? A beginner’s guide

Follow a form submission from one app to another and learn how to tell whether the message and the intended action both worked.

Made by Pagember · Editorial policy

Primary sources + editorial analysisPublished Updated Sources

The short answer

A webhook is an automatic HTTP message that one service sends to a receiving URL when a chosen event happens, such as a form submission that creates a CRM lead. A successful delivery only means the URL acknowledged the request, so check both the sender's delivery log and the final record. Receivers should answer quickly, verify signatures and ignore duplicate event IDs.

On this page7 sections

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.

A blue checkout device sends a single signal to a navy receiving tray beside a small parcel.

Follow one message from the form to the CRM

  1. Event. The form service detects a submission that matches your settings.
  2. Delivery. It sends an HTTP request to your receiving URL. The request body, often JSON, carries selected details such as a submission ID.
  3. 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.

WebhookAPI polling
Who starts the requestThe sending service, when the event happensYour app, on a schedule
DelayUsually seconds after the eventUp to one polling interval
Requests when nothing changesNoneOne per interval
What you needA public URL that answers quicklyAn API key and a scheduled job
Missed eventsDepend on the sender's retries; check its delivery logPicked 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.unsubscribed and campaign.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

  1. Use a test destination and an obviously hypothetical entry. Choose one event so you know which delivery to expect.
  2. 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.
  3. 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 Signature header. 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.