Department updated webhook: settings and approver changes
Subscribe to department.updated to react when a department's configuration changes or its approvers are modified. That includes activating or deactivating an approver, so downstream systems can refresh routing, permissions, or approval workflows without polling.
What triggers the event
Fires after department configuration is edited or its approver roster is altered — for example an approver is switched on or off. The webhook owner must hold departments:read. Treat it as a change notification for the affected department, not as a creation or deletion: use department.created for a new department and department.deleted for removal.
Headers to check first
Every delivery carries VT-Signature, VT-Webhook-Id, VT-Event-Id, VT-Event-Type, VT-Delivery-Id, VT-Delivery-Attempt, and User-Agent. Verify the signature before trusting the payload: it uses a timestamp and HMAC-SHA256 over the timestamp and raw body, and during the 24 hours after a secret rotation a second signature entry signed with the previous secret may be present. VT-Event-Id matches id in the body and VT-Event-Type matches type, so cross-check headers against the JSON rather than parsing only one of them. VT-Delivery-Attempt starts at 1 and increments on retries, while VT-Delivery-Id remains stable for the same delivery.
Body fields and the data payload
The JSON body is application/json and contains id, type, apiVersion, createdAt, companyId, and data, with apiClient present only when the change was made through the API. For this event type is department.updated and apiVersion is 2. createdAt is an ISO 8601 date-time for when the event was created, and companyId identifies the company. Inside data, expect the department's id, name, isDefault, and createdAt, in the same shape as the matching GET endpoint returns, except that parent and approvers are omitted. That omission matters: if you need the current approver list, fetch it separately instead of assuming the payload contains it. When apiClient is present, it identifies the API key that made the change by keyId, ownerId, and optionally name.
Handling checklist
A practical handler checklist: 1) Verify VT-Signature against the raw body before parsing. 2) Confirm VT-Event-Type and body type both read department.updated. 3) Deduplicate on the deterministic event ID, since the same change always produces the same ID. 4) Log VT-Delivery-Id and VT-Delivery-Attempt to distinguish a retry from a new change. 5) Apply the department fields from data, then fetch parent and approvers separately if your workflow needs them. 6) If apiClient is present, record which key caused the change for audit purposes. A successful receipt is a 2XX response.
Frequently asked questions
When is department.updated sent?
This event fires when department settings change or when its approver list changes, including an approver being turned on or off. The webhook owner needs departments:read.
How should duplicate deliveries be handled?
Use the event ID from VT-Event-Id, which matches id in the body. It is deterministic for the same change, so storing processed IDs lets you ignore a repeated delivery. Delivery ID and attempt number are separate: delivery ID stays the same across retries, while the attempt number increases from 1.
How does this differ from created and deleted department events?
department.created covers a new department, department.updated covers a change to settings or approvers, and department.deleted covers removal, where data carries only the deleted department's ID.
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 |