leave.approved Webhook Event
The leave.approved event fires when an approver, location admin, or admin approves a leave request. This reference covers the delivery headers, the JSON body shape, which fields are conditional, and how to handle retries and duplicates.
When leave.approved fires
The event is sent when an approver, a location admin, or an admin approves a leave. The owner needs the leaves:read scope. The autoApproved boolean in the body indicates whether the leave request was automatically approved. The separate leave.added event covers an approved leave being added or a leave being auto-approved; it is a distinct event, not a replacement for leave.approved.
Delivery headers
Every delivery carries these headers. The signature header is the one to check before trusting the payload.
Request body
The body is JSON. The top-level envelope contains the event ID, type, API version, creation timestamp, company ID, and the data object. The data object carries the affected resource, shaped the same way as the matching GET endpoint's response. When a resource has been deleted, data uses WebhookDeletedResourceData instead; operation events use OperationWebhookData. The webhooks section lists the data schema for each event. A webhook.test event instead carries { "webhookId", "message" }. The apiClient field is present only when the change was made through the API.
Conditional fields in the leave data
Several fields in the data object are present only under specific conditions. The table below maps each conditional field to its trigger.
Handling deliveries
A practical sequence for processing a leave.approved delivery:
Example payload
A representative leave.approved body for a full-day leave approved by a manager. Field values are illustrative; the shape matches the contract.
| Field | Type | When present | Notes |
|---|---|---|---|
| approverId | string | Only when the leave request is approved | Absent otherwise |
| autoApproved | boolean | Optional (required: false) | Indicates whether the leave request was automatically approved |
| startHour / endHour / startMinute / endMinute | number | Only when isFullDayLeave is false | In the user's time zone, 24h format |
| reason | string | null | Always (may be null) | Requires leaves:read-reason scope; with the scope, an empty string when the user gave no reason; without the scope, null |
| statusReason | string | null | Always (may be null) | Requires leaves:read-reason scope; null when none was given; without the scope, null |
| approvedLevel | string | null | Always (may be null) | FIRST/SECOND/THIRD; null outside multi-level approval. An OPEN leave with approvedLevel FIRST is waiting for the second-level approver. |
| user | object | Only when expand includes user | Full user object |
| approver | object | Only when expand includes approver | The approver, including location and department |
| leaveType | object | Only when expand includes leaveType | id, name, isDefault |
| apiClient | object | Only when change made via API | keyId, name, ownerId |
Field presence conditions are taken from the contract schema. The expand parameter controls inclusion of user, approver, leaveType, location, department, and holidays objects.
Frequently asked questions
When does the leave.approved webhook fire?
It fires when an approver, location admin, or admin approves a leave. The owner needs the leaves:read scope. The autoApproved boolean indicates whether the approval was automatic. The separate leave.added event covers an approved leave being added or a leave being auto-approved.
How do I avoid processing the same approval twice?
Use the VT-Event-Id header (identical to the body's id). For non-test events the ID is deterministic, so the same change always produces the same value. Skip any delivery whose event ID you have already processed. webhook.test events get a random ID and are not deterministic. The VT-Delivery-Id stays constant across retries of one delivery, while VT-Delivery-Attempt increments from 1.
Why is the reason field null?
The reason and statusReason fields require the leaves:read-reason scope on the owner. Without that scope, both are null. With it, reason is an empty string when the user gave no reason, and statusReason is null when none was given.
What does the VT-Signature header contain?
It has the form t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">. If the signing secret was rotated within the last 24 hours, the header also includes a second v1 entry produced with the previous secret. Signature verification is covered at the top of this document.
Can I subscribe to webhook.test?
No. webhook.test is sent only by test deliveries and cannot be subscribed to. Test events get a random ID rather than a deterministic one.
VT-Signature
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Signature | string | Yes | t= ,v1= . "> . For 24 hours after a secret rotation it carries a second v1 entry signed with the previous secret. See Signature verification at the top of this document. |
VT-Webhook-Id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Webhook-Id | string | Yes | the ID of the webhook the delivery is for. |
VT-Event-Id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Event-Id | string | Yes | the event ID, the same as id in the body. Use it to skip duplicate deliveries. |
VT-Event-Type
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Event-Type | string | Yes | the event type, the same as type in the body. | Allowed values: $3b |
VT-Delivery-Id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Delivery-Id | string | Yes | the delivery ID, unique per delivery and kept across retries of the same delivery. |
VT-Delivery-Attempt
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Delivery-Attempt | integer | Yes | the attempt number of this delivery, starting at 1. | 1 <= value |