leave.expired: a leave request that expired without a decision
The leave.expired event is delivered when an open leave request reaches its expiry without anyone approving or denying it. It is a signal that the request lapsed rather than being decided, so downstream systems should treat it as a distinct outcome from approval, denial or cancellation. This reference covers when the event fires, the required scope, the delivery headers, and how to read the leave payload.
When leave.expired is delivered
The event is sent when an open leave request expires because no approver approved or denied it in time. The webhook owner must hold the leaves:read scope. The event type is leave.expired, and the body's type field carries the same value as the VT-Event-Type header.
Because the request was never decided, the leave's status is EXPIRED. This is the key difference from leave.denied (a decision was made to refuse) and leave.cancelled (the requester or system withdrew it). Treat the three as separate branches in your handler.
Delivery headers to expect
Each delivery carries a fixed set of headers. VT-Signature is required. Its value is built as t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">, so the signed material is the timestamp, a literal dot, then the raw body. When a secret is rotated, deliveries for the following 24 hours also include a second v1 entry produced with the previous secret. The signature verification section at the top of this document explains how to check it. The other required headers are VT-Webhook-Id, VT-Event-Id, VT-Event-Type, VT-Delivery-Id, VT-Delivery-Attempt and User-Agent. VT-Delivery-Attempt is an integer starting at 1, and VT-Delivery-Id stays the same across retries of the same delivery. Use VT-Event-Id to skip duplicate deliveries.
Reading the leave payload
The body is a LeaveWebhookEvent object. The top-level fields are id, type, apiVersion (value "2"), createdAt (ISO 8601), companyId, data, and an optional apiClient present only when the change was made through the API. The data object is the affected leave in the same shape the matching GET endpoint returns.
Within data, the required fields include id, userId, durationCalendarDays, durationWorkingDays, startDate, endDate, isFullDayLeave, leaveTypeId, locationId, departmentId, status, reason, statusReason, approvedLevel and createdAt. The optional approverId and autoApproved fields appear only where relevant. Part-day fields (startHour, endHour, startMinute, endMinute) are returned only when isFullDayLeave is false. The user, approver and leaveType objects are included only when the corresponding expansion is requested.
Status, approval level and reason fields
The status field is one of APPROVED, OPEN, DENIED, CANCELLED, EXPIRED or DELETED. For a leave.expired event, expect EXPIRED. The approvedLevel field is FIRST, SECOND, THIRD or null; it is meaningful in departments with multi-level approval, and an OPEN leave with approvedLevel FIRST is waiting for the second-level approver.
The reason field is the reason the user gave, an empty string when none was given, and requires the leaves:read-reason scope; without it the value is null. The statusReason field is the reason given when the leave was denied or cancelled, null when none was given, and also requires leaves:read-reason. For an expired request, statusReason is typically null because no decision was recorded.
Worked example: interpreting an expired request
Suppose a two-day leave request in a department with multi-level approval reaches expiry while still at the first approval level. The delivered body would show type of leave.expired, data.status of EXPIRED, data.approvedLevel of FIRST, data.durationCalendarDays of 2, and data.statusReason of null. The approverId would be absent because the request was never approved. A handler that branches on status can route this to a "lapsed, needs re-request" path rather than an "approved" or "denied" path.
Handler checklist
- Verify the
VT-Signatureheader against the raw body before parsing. - Confirm
VT-Event-Typeisleave.expiredand that the bodytypematches. - Deduplicate using
VT-Event-Id(or the bodyid) before processing. - Read
data.statusand confirm it isEXPIRED; branch separately fromDENIEDandCANCELLED. - Check
data.approvedLevelto understand how far the request progressed. - Treat
data.statusReasonasnullfor expired requests unless a reason was recorded. - Request the
leaves:read-reasonscope if you need the user'sreasonvalue. - Handle
VT-Delivery-Attemptgreater than 1 as a retry of the same delivery.
Frequently asked questions
How is leave.expired different from leave.denied?
A leave.denied event means an approver decided to refuse the request. A leave.expired event means the request reached its expiry without any approval or denial. In both cases the leave is no longer open, but the status differs (DENIED versus EXPIRED) and the statusReason field is typically populated for a denial and null for an expiry.
What scope does the webhook owner need for leave.expired?
The webhook owner needs the leaves:read scope. To receive the user's reason and the statusReason values, the owner also needs the leaves:read-reason scope; without it those fields are null.
How do I avoid processing the same expired event twice?
Use the VT-Event-Id header, which matches the body id. The ID is deterministic, so the same change always carries the same ID. Compare it against a store of recently processed IDs and skip any delivery whose ID you have already handled. VT-Delivery-Id stays the same across retries of the same delivery, so it can also help you recognise a retry.
Why are startHour and endHour missing from some expired events?
Those fields are returned only when isFullDayLeave is false. For a full-day leave, the part-day fields are omitted, so your handler should treat them as optional and check isFullDayLeave before reading them.
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 |