Skip to content

location.created webhook event

Sent when a location is created. The webhook owner must hold the locations:read scope. This page maps the delivery headers and the JSON body so you can verify, deduplicate and store the event correctly.

Scope and trigger

A delivery is sent when a location is created. The webhook owner needs the locations:read scope. The event type is location.created, and the body type field is restricted to location.created or location.updated for this payload shape.

Delivery headers

Every delivery carries required headers. VT-Signature carries the signed timestamp and HMAC entries; its exact format is defined in the signature contract module below. For 24 hours after a secret rotation it also carries a second v1 entry signed with the previous secret. VT-Webhook-Id identifies the webhook. VT-Event-Id matches the body id and is the field to use for skipping duplicate deliveries. VT-Event-Type matches the body type. VT-Delivery-Id is unique per delivery and stays the same across retries. VT-Delivery-Attempt is an integer starting at 1. The User-Agent is a fixed, versioned webhook string defined in the header contract module.

Request body fields

The body is application/json. Required top-level fields are id (deterministic event ID, same as VT-Event-Id), type, apiVersion (value "2"), createdAt (ISO 8601 date-time), companyId, and data. The data object describes the affected resource in the same shape the matching GET endpoint returns; its exact location shape is defined in the payload contract module below. An optional apiClient object appears only when the change was made through the API; its exact subfields are defined in the same payload contract module.

Implementation checklist

  1. Confirm the webhook owner has locations:read before subscribing. 2. Verify VT-Signature against the raw body before parsing. 3. Store VT-Event-Id (or body id) to skip duplicates; do not use VT-Delivery-Id for deduplication because it changes per delivery. 4. Use VT-Delivery-Attempt to distinguish retries of the same delivery. 5. Treat timezone as optional and apiClient as present only for API-originated changes. 6. During the 24-hour rotation window, accept a signature that validates against either the current or previous secret.

Duplicate vs retry vs rotation

A duplicate delivery repeats the same event and therefore the same VT-Event-Id; skip it. A retry repeats the same VT-Delivery-Id but increments VT-Delivery-Attempt; process it only if the earlier attempt did not succeed. A signature failure during the 24-hour rotation window may mean the delivery was signed with the previous secret; validate against both before rejecting.

Header and body field map
FieldLocationRequiredPurpose
VT-SignatureHeaderYesSigned timestamp and HMAC entries; second v1 entry during 24h rotation
VT-Webhook-IdHeaderYesID of the webhook the delivery is for
VT-Event-IdHeaderYesEvent ID; same as body id; use to skip duplicates
VT-Event-TypeHeaderYesEvent type; same as body type
VT-Delivery-IdHeaderYesUnique per delivery; kept across retries
VT-Delivery-AttemptHeaderYesAttempt number, starting at 1
User-AgentHeaderYesFixed, versioned webhook string
idBodyYesDeterministic event ID; same as VT-Event-Id
typeBodyYeslocation.created or location.updated
apiVersionBodyYesValue "2"
createdAtBodyYesISO 8601 date-time of event creation
companyIdBodyYesID of the company
dataBodyYesAffected resource in GET endpoint shape
apiClientBodyNoPresent only for API-originated changes

Header and body field requirements as documented for the location.created event.

Frequently asked questions

Which scope does the webhook owner need for location.created?

The webhook owner needs locations:read.

Should I deduplicate on VT-Event-Id or VT-Delivery-Id?

Use VT-Event-Id (or the body id, which is the same value). It is deterministic, so the same change always has the same ID. VT-Delivery-Id is unique per delivery and is kept across retries, so it identifies a delivery rather than the underlying change.

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. Validate against both during that window.

When is apiClient present in the payload?

Only when the change was made through the API. Its exact subfields are defined in the payload contract module.

VT-Signature

FieldTypeRequiredDescriptionConstraints
VT-SignaturestringYest= ,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

FieldTypeRequiredDescriptionConstraints
VT-Webhook-IdstringYesthe ID of the webhook the delivery is for.

VT-Event-Id

FieldTypeRequiredDescriptionConstraints
VT-Event-IdstringYesthe event ID, the same as id in the body. Use it to skip duplicate deliveries.

VT-Event-Type

FieldTypeRequiredDescriptionConstraints
VT-Event-TypestringYesthe event type, the same as type in the body.Allowed values: $3b

VT-Delivery-Id

FieldTypeRequiredDescriptionConstraints
VT-Delivery-IdstringYesthe delivery ID, unique per delivery and kept across retries of the same delivery.

VT-Delivery-Attempt

FieldTypeRequiredDescriptionConstraints
VT-Delivery-AttemptintegerYesthe attempt number of this delivery, starting at 1.1 <= value