location.updated: Location and Work Week Change Webhook
The location.updated webhook fires when a location's settings change or when its work week changes. This page documents the delivery headers, the JSON body, the fields inside data, and the practical steps for verifying and deduplicating deliveries. The subscribing API key owner must hold the locations:read scope.
When this event fires
A delivery is sent for two kinds of change: an edit to a location's settings, and a change to that location's work week. The event type in the body is either location.created or location.updated, so a receiver subscribed to this topic should match on location.updated. A location deletion is a separate event and carries only the deleted location's ID; users from a deleted location are moved to the default location, which produces user.updated deliveries instead. If a work week change is made per user rather than at the location level, expect user.updated rather than location.updated.
Delivery headers
Every delivery carries a set of headers that identify the webhook, the event, the delivery, and the retry attempt. The signature header must be verified against the raw request body before the payload is trusted. The event ID header matches the id field in the body and is the correct key for duplicate suppression; the delivery ID stays the same across retries of one delivery, while the attempt counter increments from 1. The event type header matches the type field in the body. The User-Agent value is fixed for this webhook version.
Request body
The body is JSON and follows the location webhook event shape. Top-level fields identify the event, the API version, the creation time, and the company. The data object holds the affected location in the same shape the matching GET endpoint returns, with the location ID, name, optional IANA time zone, default-location flag, and creation timestamp. An apiClient object appears only when the change was made through the API; it names the key ID, the integration name when one is set, and the owning user ID.
Field and header map
Use this map when building a receiver. Requiredness follows the event contract: id, type, apiVersion, createdAt, companyId, and data are always present; apiClient is optional. Inside data, id, name, isDefault, and createdAt are always present, while timezone is omitted when no zone is stored. The type value for this topic is location.updated, and apiVersion is the string "2".
Deduplication and retry handling
The event ID is deterministic: the same underlying change always produces the same ID, so a retried delivery of that change carries the same event ID. Store processed event IDs and skip any delivery whose event ID is already recorded. The delivery ID is different — it is unique per delivery and remains stable across retries of that delivery — so it is useful for tracing a single delivery through retry attempts, not for suppressing duplicates. The attempt counter starts at 1 and increases on each retry. Test deliveries use a random event ID and the webhook.test type, which cannot be subscribed to.
Signature verification
The signature header carries a timestamp and one or more v1 entries. Each v1 entry is a hex HMAC-SHA256 over the timestamp, a dot, and the raw request body. During the 24 hours after a secret rotation, the header carries a second v1 entry signed with the previous secret, so a receiver should accept a delivery if any v1 entry validates. Compute the HMAC over the exact raw bytes received, not a re-serialized JSON object.
Receiver checklist
Before going live, confirm the following: the subscribing key owner holds locations:read; the receiver reads the raw body before parsing; the signature is checked against every v1 entry; the event ID is recorded before side effects run; the delivery ID and attempt number are logged for tracing; the type field is matched against location.updated; and the apiClient field is treated as optional. Also confirm that a work week change made per user is expected to arrive as user.updated, not location.updated, so the receiver does not silently drop it.
| Header | Type | Required | Meaning |
|---|---|---|---|
| VT-Signature | string | yes | Timestamp and one or more v1 HMAC-SHA256 entries over the raw body; a second entry appears for 24 hours after a secret rotation. |
| VT-Webhook-Id | string | yes | ID of the webhook the delivery is for. |
| VT-Event-Id | string | yes | Event ID, same as id in the body; use to skip duplicate deliveries. |
| VT-Event-Type | string | yes | Event type, same as type in the body. |
| VT-Delivery-Id | string | yes | Delivery ID, unique per delivery and stable across retries of the same delivery. |
| VT-Delivery-Attempt | integer | yes | Attempt number of this delivery, starting at 1; range 1 <= value. |
| User-Agent | string | yes | Fixed value for this webhook version. |
Header names and requiredness are part of the event contract and must not be altered.
| Field | Type | Required | Meaning |
|---|---|---|---|
| id | string | yes | Event ID, same as VT-Event-Id; deterministic per change; random for webhook.test. |
| type | string | yes | Event type; value is location.created or location.updated. |
| apiVersion | string | yes | API version of the data shape; value is "2". |
| createdAt | string (date-time) | yes | ISO 8601 timestamp of when the event was created. |
| companyId | string | yes | ID of the company. |
| data | object | yes | Affected location in the same shape the matching GET endpoint returns. |
| data.id | string | yes | Location ID. |
| data.name | string | yes | Location name. |
| data.timezone | string | no | Location's IANA time zone; omitted when none is stored. |
| data.isDefault | boolean | yes | Whether this is the company's default location. |
| data.createdAt | string (date-time) | yes | ISO 8601 timestamp. |
| apiClient | object | no | Present only when the change was made through the API. |
| apiClient.keyId | string | yes (within apiClient) | ID of the API key. |
| apiClient.name | string | no | Integration name shown to users; absent when the key has none. |
| apiClient.ownerId | string | yes (within apiClient) | ID of the user who owns the API key. |
Field names, types, and requiredness are part of the event contract and must not be altered.
Frequently asked questions
Which scope does the subscribing key owner need?
The owner of the API key that subscribes to this event needs the locations:read scope.
Should I deduplicate on the event ID or the delivery ID?
Use the event ID. It is deterministic for a given change, so retries of the same change carry the same value. The delivery ID is unique per delivery and stays the same across retries of that delivery, which makes it useful for tracing rather than duplicate suppression.
Why does VT-Signature sometimes contain two v1 entries?
For 24 hours after a secret rotation, the header carries a second v1 entry signed with the previous secret. A receiver should accept the delivery if any v1 entry validates.
Will a work week change always arrive as location.updated?
No. A change to a location's work week is covered by this event, but a work week change made per user arrives as user.updated. A receiver that only handles location.updated will not see the per-user case.
What happens to users when a location is deleted?
A location deletion is a separate event that carries only the deleted location's ID. Its users are moved to the default location, which produces user.updated deliveries. This event does not fire for the deletion itself.
Can I subscribe to webhook.test?
No. webhook.test is sent only by test deliveries and cannot be subscribed to. Test events also get a random event 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 |