> **Source:** https://knowledge.leegality.com/document-execution/api/webhooks-v4/webhook-v4-introduction > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # Webhooks 4.0 When you send a pack for eSigning using the v4 Document Execution API, webhooks can notify you the moment an invitee completes or fails a signing action — they sign, approve, reject, or fail signature verification — without you having to poll the [Check Pack Details](https://knowledge.leegality.com/document-execution/api/check-pack-details) API. Leegality sends a JSON payload to the URL you configured on the pack, containing the event type, the pack, document, group and invitee involved, and their current status. The payload does not include the signed document or audit trail — use [Check Pack Details](https://knowledge.leegality.com/document-execution/api/check-pack-details) and the document-fetch endpoints to retrieve those once you've received the webhook. ## What's new in 4.0 Webhook 4.0 replaces the per-event payloads of earlier versions with a single, predictable shape: - **One flat envelope for every outcome.** Success and failure, signers and reviewers — every event uses the same key set and the same nesting. Nothing is renamed or restructured between events, so you write one parser. - **Two discriminators.** `webhookType` tells you which route delivered the event; `eventType` tells you what happened. You branch your handling on `eventType`. - **Pack-aware.** The payload carries the `pack`, `document`, `invitationGroup` and `invitee` the event belongs to, so you can reconcile directly against the v4 object model. - **Every key is always present.** A value that does not apply is sent as JSON `null`, never omitted. ## How it works 1. You configure a success URL, an error URL, or both — along with the payload version — on the combination when you create the pack. 2. A pack is sent using that configuration. 3. When an invitee completes or fails an action on a document, Leegality POSTs a JSON payload to the matching URL: success events to the success URL, failure events to the error URL. 4. Your server processes the payload and returns any 2XX response to acknowledge it. ## Requirements for your endpoint - Must be **publicly accessible** over HTTPS. - Must accept **POST** requests with `Content-Type: application/json`. - Must return **any 2XX** status code (for example, 200, 201, or 202) to acknowledge the request. ## Configuring Webhook 4.0 Webhook configuration is set **per combination** when you create the pack, under `combinations[].combinationSettings.webhooks`. It has four fields: - `successWebhook` — the URL that receives success events. - `errorWebhook` — the URL that receives failure events. - `webhookVersion` — the payload version; set this to the 4.0 value to receive Webhook 4.0 payloads. - `webhookProfileId` — optional; the UUID of a pre-configured webhook profile that applies transport-level security (custom headers, OAuth2, or mTLS) to the delivery. Configure the `webhooks` object as part of the [Send Pack for eSigning](https://knowledge.leegality.com/document-execution/api/create-pack) request — see that page for the full request schema and the accepted `webhookVersion` values. ## Next steps - [Event Types](https://knowledge.leegality.com/document-execution/api/webhooks-v4/webhook-v4-event-types) — the seven events and how each is routed. Each event's own page documents its exact payload.