What Is a Webhook? How Webhooks Work, Examples, and Webhook vs. API

Topics

Weekly Newsletter

Get the latest updates, tips, and exclusive offers. Sign up for our weekly newsletter and stay informed!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form."
By clicking “Sign Up” you agree to our TOS and Privacy Policy.

A webhook is a way for one application to automatically notify another when a specific event occurs. When something happens, such as a document being signed or a payment being completed, the source application sends an HTTP POST request to a designated URL. The receiving application can then process the information and take action.

What Is a Webhook?

A webhook is an automated message sent from one application to another when a predefined event happens. Instead of repeatedly checking whether something has changed, an application can receive a notification when the change occurs.

For example, an electronic signature platform can use a webhook to notify a company's system when a customer signs a contract. The company's system can then update the contract status or begin the next step in its workflow.

Webhooks are commonly used to connect applications, synchronize information, and trigger automated actions.

A Plain-Language Analogy

Think of a webhook like a package delivery notification. 

Without notifications, you would need to keep checking the delivery company's website to see whether your package had arrived. With notifications enabled, the company sends you an update when the package is delivered. 

Webhooks work similarly. Rather than asking another system for updates repeatedly, your application receives a message when something important happens.

In technical terms, this approach is known as event-driven communication.

How Do Webhooks Work?

Webhooks typically follow three steps: an event occurs, the source application sends an HTTP request, and the receiving application processes the notification.

1. An Event Happens

A webhook begins with a specific event in the source application.

Examples include:

  • A customer completes a payment.
  • A new contact is added to a CRM.
  • A software build finishes.
  • A recipient views a document.
  • A signer completes an agreement.

The source application monitors the events that have been configured to trigger notifications. For example, an eSignature platform may generate an event when a recipient completes their assigned signing task.

2. The Source App Sends an HTTP POST to Your Webhook URL

When the event occurs, the source application sends an HTTP POST request to a designated URL in the receiving application.

That URL is called the webhook endpoint.

The request typically contains a payload, often formatted as JSON, describing what happened. Depending on the provider, the payload may include an event identifier, event type, timestamp, and information about the affected record.

For example, a document-signing notification might include the event type and an identifier for the signing transaction.

3. Your App Receives the Payload and Takes Action

The receiving application processes the HTTP request and determines what action to take.

For an eSignature event, that might mean:

  • Updating a contract's status in a CRM
  • Notifying an account manager
  • Recording the signing event in a database
  • Starting the next stage of client onboarding
  • Retrieving the completed document when it becomes available

The receiving server also returns an HTTP response to acknowledge delivery. A successful response generally tells the sending application that the notification was received. The exact accepted status codes and retry behavior depend on the webhook provider.

Example Webhook Payload (Sample JSON)

Webhooks commonly use JSON to communicate event information. The following simplified example shows what an eSignature webhook notification might look like:

{
  "event_id": "evt_12345",
  "event_type": "document_signed",
  "timestamp": "2026-11-18T10:30:00Z",
  "document_id": "doc_67890",
  "signer_id": "signer_001"
}

‍

Example only. This is not an actual Blueink webhook payload or Blueink event name.

Here's what the fields represent:

  • event_id: A unique identifier for the event.
  • event_type: The action that triggered the notification.
  • timestamp: When the event occurred.
  • document_id: The document associated with the event.
  • signer_id: The person or signing record associated with the event.

Your application can inspect these values and determine which action to perform. For example, it might use the document identifier to locate a contract in its database and update the status.

Actual payload structures vary by provider. Developers should consult the relevant API documentation rather than assuming that every webhook uses the same fields.

What Is a Webhook Endpoint?

A webhook endpoint is the URL where an application receives event notifications from another service. It is usually an HTTPS address connected to a server or application capable of accepting incoming HTTP requests.

For example, a business might configure a webhook endpoint such as:

https://example.com/webhooks/signatures

When the source application sends a webhook notification to this address, the receiving server processes the request.

A webhook endpoint generally needs to:

  • Accept the expected HTTP request.
  • Verify that the notification comes from the intended sender.
  • Read and validate the payload.
  • Identify the event.
  • Trigger or queue the appropriate action.
  • Return an acknowledgment according to the provider's requirements.

The endpoint should also handle failed requests and repeated deliveries. A webhook URL is not simply a webpage that someone visits. It is a receiving address designed for application-to-application communication.

Webhook vs. API: What's the Difference?

The main difference between a webhook and a traditional API request is how information is exchanged.

An API allows an application to request data or perform an operation on another system. A webhook allows a system to send a notification automatically when a particular event occurs.

Webhooks typically use HTTP, so they are not separate from APIs in a technical sense. They complement request-based API integrations.

Polling vs. Push

One common way to compare webhooks and APIs is to examine polling versus event-driven notifications. 

With polling, an application repeatedly requests information to check whether something has changed. With webhooks, the source application pushes a notification when a relevant event occurs.

Consideration API Polling Webhooks
How it works The receiving application repeatedly requests updates The source application sends notifications when events occur
Communication Request-driven Event-driven
Timing Depends on the polling interval Triggered when the provider processes an event
API requests Repeated requests, even when nothing changes Notifications sent for configured events
Implementation Requires scheduled requests and status checks Requires a receiving endpoint and event handling
Reliability considerations Must manage request failures and API limits Must manage delivery failures, retries, and duplicate events
Typical use Checking current status or retrieving information Reacting to changes and triggering follow-up actions

For example, an application might request a contract's current status every five minutes using an API.

With webhooks, the eSignature platform can notify the application when a signer completes the document. The webhook approach can reduce unnecessary status checks, although notification delivery still depends on network availability and the provider's event-handling system.

When to Use Each

Use API requests when your application needs to retrieve information on demand, create a record, update an existing record, or confirm the current state of an operation.

Use webhooks when your application needs to react to events such as a completed payment, new customer record, or signed agreement.

Many integrations use both. For example, an application might use an API to send a contract, receive a webhook when signing is complete, and then call the API again to retrieve the finished document.

This combination allows the application to react to changes while still accessing the information it needs.

Common Webhook Examples

Webhooks are used across many software categories because applications frequently need to respond to events occurring in other systems.

Payments, CRM, Messaging, and CI/CD

Payment Processing

A payment provider can notify an application when a transaction succeeds, fails, or requires further action. The receiving system might update an order status or notify the appropriate team.

Customer Relationship Management

A CRM can send an event notification when a new lead or customer record is created. Another application might use that information to initiate an internal follow-up process.

Messaging Platforms

A messaging platform may use webhooks to notify other applications about incoming messages or relevant conversation events. The receiving application can then process the event or update its records.

Continuous Integration and Deployment (CI/CD)

Development tools can send webhook notifications when code is pushed, a build completes, or a deployment status changes. These notifications can trigger automated testing, deployment, or internal alerts.

eSignature: Getting Notified When a Document Is Signed

Electronic signature workflows are a practical example of why webhooks are useful.

Signing is often asynchronous. A sender may distribute an agreement in the morning, but the recipient might not open or complete it until later.

Instead of continuously checking its status, an application can receive notifications when relevant events occur.

Consider a service business that sends contracts to new clients:

  1. The business sends a contract for signature.
  2. The client opens the document.
  3. The eSignature platform generates a viewing event.
  4. The client signs the agreement.
  5. The platform generates a signing completion event.
  6. The business's application updates its records and begins the next step.

If several people must sign, the application may need to distinguish between an individual completing their part and the entire agreement being completed.

Blueink supports eSignature webhooks and API events for this type of workflow.

Webhook Security Best Practices

Because webhook endpoints receive requests from external systems, they should be designed to verify incoming notifications and handle failures safely. The following practices apply broadly to webhook integrations.

Use HTTPS

Webhook endpoints should use HTTPS to protect information transmitted between the source application and the receiving server.

HTTPS encrypts data in transit and helps reduce the risk of interception or tampering. However, HTTPS alone does not establish that a request came from the expected webhook provider.

Verify Webhook Signatures

Many webhook providers include a cryptographic signature that receiving applications can use to verify authenticity. A common approach uses a shared secret and a hash-based message authentication code, such as HMAC SHA-256.

The receiving application computes the expected signature using the provider's documented method and compares it with the signature included in the request. If verification fails, the application should reject the request rather than process it.

Keep webhook secrets protected and follow the provider's instructions for signature validation and rotation.

Handle Retries and Failed Deliveries

Webhook delivery can fail because of network interruptions, server errors, or temporary application downtime. Many providers retry failed notifications according to a documented schedule.

The receiving application should return an appropriate acknowledgment and avoid performing unnecessary long-running work before responding.

For more complex processing, the application can acknowledge a securely validated event after it has been reliably queued, then complete the required work separately.

Make Processing Idempotent

Idempotency means that processing the same event more than once does not produce unintended duplicate effects. This matters because a webhook provider may deliver the same event multiple times, particularly when retrying a failed request.

For example, if a completed-signature event triggers a customer notification, repeated deliveries should not cause the same notification to be sent repeatedly.

Applications can use unique event identifiers to recognize events that have already been processed.

Validate Payloads and Monitor Failures

Applications should validate incoming data before using it. Check that the event type is expected, required fields are present, and the payload follows the documented format.

Monitoring is also important. Failed deliveries, unexpected responses, and repeated processing errors should be logged and investigated.

For further technical guidance, see the OWASP Webhook Security Cheat Sheet.

How Blueink Uses Webhooks for Real-Time Signing Updates

Blueink's eSignature API supports webhook notifications for document signing and transaction activity. The platform can notify an application when particular events occur, allowing developers to connect signing activity with internal systems.

According to Blueink's webhook developer documentation, supported events include:

Blueink Event What It Means
bundle_sent The signing envelope has been sent to recipients
packet_viewed An individual signer has viewed their packet
packet_complete An individual signer has completed their packet
bundle_complete All required signers have completed the envelope
bundle_docs_ready Completed documents are ready for download
packet_declined A signer has declined their packet

This table shows a selection of Blueink webhook events, not the complete list. See the developer documentation for all supported events.

Blueink uses the terms bundle and packet in its API. A bundle represents the overall signing transaction, while packets relate to individual signers.

For example, a customer onboarding application might respond to bundle_complete by updating its agreement status, then use bundle_docs_ready to determine when the completed documents can be retrieved.

Blueink also documents HMAC SHA-256 webhook signature verification, timestamp headers, and retry handling using exponential backoff.

Developers should consult the Blueink webhook documentation for exact payload structures, available events, and implementation instructions.

For a broader comparison of integration options, explore our guide to the best eSignature APIs.

Connect Document Signing Events to Your Application with Blueink

Webhooks help applications respond to important events without continuously requesting status updates. For electronic signatures, they can connect document activity to the systems businesses use for tracking agreements, managing customers, and coordinating follow-up tasks.

Blueink's eSignature API supports document signing integrations, including webhook notifications and access to signing records.

Ready to explore the API? Start your free trial with Blueink or learn more about eSignature webhooks and API events.

Frequently Asked Questions

What Is a Webhook?

A webhook is an automated notification sent from one application to another when a particular event occurs. It typically uses an HTTP POST request to deliver information to a designated URL.

The receiving application can then process the event and take an appropriate action, such as updating a record or sending a notification.

How Do Webhooks Work?

Webhooks follow an event-driven process. First, an event occurs in the source application. The application then sends an HTTP POST request containing event information to a configured webhook endpoint.

The receiving application validates the request, processes the information, and responds according to the provider's requirements.

What Is the Difference Between a Webhook and an API?

An API allows software applications to exchange data or perform operations through defined interfaces. A webhook is a mechanism for sending event notifications automatically, often using HTTP.

The practical difference is that traditional API polling requires an application to request updates, while webhooks notify the receiving application when a configured event occurs.

What Is a Webhook Endpoint?

A webhook endpoint is the URL that receives webhook notifications from another application. It typically points to a server-side route that accepts HTTP POST requests.

The endpoint should authenticate or verify incoming notifications, validate their contents, and process events safely.

Are Webhooks Secure?

Webhooks can be implemented securely when appropriate controls are used. Recommended practices include HTTPS, signature verification, secure secret management, payload validation, retry handling, and protection against duplicate processing.

A publicly accessible webhook endpoint should not trust incoming requests simply because they appear to contain valid event information.

How Do eSignature Apps Notify You When a Document Is Signed?

Electronic signature applications can use webhooks to notify connected systems when signers view, complete, or decline documents.

For example, an eSignature platform may send an event when a signer finishes their assigned portion of an agreement and another when all required signatures are complete.

The receiving application can use these events to update records, notify teams, or retrieve completed documents.

Topics