Skip to content

automation.created webhook event

The automation.created event fires when any automation type is created. It is one of three automation lifecycle events, alongside automation.updated and automation.deleted. This page covers the headers, the shared event envelope, the required scope, and the fields that differ across the seven automation types.

What triggers automation.created

The event is delivered when an automation of any type is created. The seven supported automation types are blackout period, maximum users away, seniority entitlement, entitlement by role, probation period, leave duration limit, and leave request notice period. The subscription owner must hold the automations:read scope.

The event type field in the body is restricted to automation.created or automation.updated, so a single subscription can cover both creation and later changes. The data.type field is what distinguishes the seven automation shapes.

Headers to expect on every delivery

Each delivery arrives with the header set below. Validate these headers first, then parse the body; they form the transport contract for the event and are not optional metadata. The signature header carries a timestamp and an HMAC-SHA256 digest computed over the timestamp, a literal dot, and the raw request body, so verification must use the raw bytes rather than a re-serialised JSON object; the step-by-step check appears in the verification checklist further down this page. The exact header names and value formats must be treated as fixed contract literals rather than renamed fields. The rotation rule is a fixed 24-hour window: for that period after a secret rotation, the signature header carries a second v1 entry signed with the previous secret, so a receiver may accept either entry while the window is open and should accept only the current secret once it closes. The remaining headers identify the webhook, the event, the delivery and the attempt. The User-Agent value is a fixed product token ending in /2; treat it as a configurable constant that the implementing owner sets to match the sending service, and do not hard-code a vendor name into your receiver logic. The full event catalogue is the allowed set for the event-type header, and it includes automation.created, automation.updated and automation.deleted alongside the other event types.

Shared event envelope

The request body is application/json. Every automation.created delivery shares the same envelope before the type-specific data begins. The id field is the event identifier and matches the VT-Event-Id header; because the same change always produces the same id, a receiver can use it to skip duplicates, while webhook.test deliveries instead carry a random id. The type field is the event type, and webhook.test is sent only by test deliveries and cannot be subscribed to; for this page the value is automation.created or automation.updated. The apiVersion field is the API version of the data shape, with the value in the fixed set containing only the string literal for version 2. The createdAt field is an ISO 8601 date-time timestamp for when the event was created. The companyId field is the ID of the company. The data field is the payload of automation.created and automation.updated for every automation type, and data.type distinguishes the seven automation shapes. The optional apiClient object is present only when the change was made through the API; it contains keyId (string, required), name (string, optional, the key's integration name as shown to users and absent when the key has none), and ownerId (string, required, the ID of the user who owns the API key).

Automation type to payload field map

All seven automation payloads share id, type, name, isActive, ownerId, createdAt, locationIds, departmentIds and labelIds, plus an open [key: string] slot. The table below lists the fields that differ by type so you can branch on data.type and read the right keys.

Field notes worth knowing before you map them:

  • name is unique among the company's automations.
  • isActive reports whether the automation is currently applied.
  • locationIds, departmentIds and labelIds are arrays of IDs; an empty array means all locations, all departments, or users with or without labels respectively.
  • reason may be empty; text that looks like HTML or script fails validation.
  • autoRejectResponse is the message sent to the user when a leave request is automatically rejected by this automation; it may be empty and HTML- or script-like text fails validation.
  • maxUsersAway.type is percentage or absolute; maxUsersAway.value is a number >= 0. A percentage above the maximum the dashboard allows fails validation.
  • seniority-entitlement periods is an array of 1 to 20 objects; years is an integer >= 1; amount is a number in steps of 0.5 and >= 0.5; units is days or hours. calculateFrom is USER_EMPLOYMENT_DATE or TODAY, with TODAY when it was never set. awardSeniorityEntitlementDaysOn is USER_WORK_ANNIVERSARY or BEGINNING_OF_THE_FISCAL_YEAR, with USER_WORK_ANNIVERSARY when it was never set.
  • entitlement-by-role labelId is the ID of the label (role) whose users receive the extra entitlement; an empty string after that label was deleted, and the automation then no longer applies.
  • probation-period lengthDays is counted from the user's employment start date.
  • leave-duration-limit period is exactly two date strings; minimumDuration and maximumDuration are number or null, each > 0 when present, with null meaning no minimum or no maximum.
  • leave-request-notice-period minLeaveDurationForAdvanceNotice is an integer; requiredAdvanceNoticeDays is an integer; leaveTypeIds omitted or empty means all leave types.

Verification and deduplication checklist

Run these checks in order on each delivery.

  1. Reject the delivery if VT-Signature is missing or malformed. The expected shape is t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">.
  2. Compute the HMAC over the literal string "<t>.<raw body>" using the raw body bytes, not a re-serialised JSON object.
  3. Accept a match against either v1 entry during the 24-hour rotation window; after that window only the current secret should match.
  4. Confirm VT-Event-Type equals the body type and VT-Event-Id equals the body id.
  5. Skip the delivery if body id has already been processed. The id is deterministic, so the same change always has the same ID.
  6. If a retry is expected, use VT-Delivery-Id to recognise the same delivery and VT-Delivery-Attempt to count attempts starting at 1.
  7. Branch on data.type to pick the correct payload shape from the type map above.

A useful worked example: a blackout-period automation is created for a company. The delivery arrives with VT-Event-Type automation.created, body type automation.created, apiVersion "2", and data.type blackout-period. The data object carries startDate and endDate in YYYY-MM-DD, a recurring boolean, a reason string that may be empty, and leaveTypeIds. If the same change is delivered again, body id is unchanged and you can drop it. If the automation is later paused, re-enabled or edited, the same subscription receives automation.updated instead, and the payload shape is the same because data.type is unchanged.

Failure distinction and sibling events

automation.created is not a general-purpose automation signal. It fires only on creation. If you need to react to a paused, re-enabled or edited automation, subscribe to automation.updated, which is described as being sent when an automation of any type is changed, paused or re-enabled. If you need to react to removal, subscribe to automation.deleted.

A delivery that fails signature verification is a transport-level rejection, not an automation failure. A delivery that passes verification but whose data.type is unexpected is a payload-shape problem, not a duplicate. Keep those two failure modes in separate logs so retries and dedupe decisions stay clean.

The webhook.test event is sent only by test deliveries and cannot be subscribed to; it carries a random id rather than a deterministic one, so do not use it to test your dedupe path.

Automation payload field map by data.type
data.typeDistinctive fields
blackout-periodleaveTypeIds, startDate, endDate, recurring, reason
maximum-users-awayleaveTypeIds, startDate, endDate, recurring, autoRejectResponse, maxUsersAway { type, value }
seniority-entitlementleaveTypeId, prorate, periods[{ years, amount, units }], calculateFrom, awardSeniorityEntitlementDaysOn
entitlement-by-roleleaveTypeId, startDate, amount, units, labelId
probation-periodleaveTypeIds, lengthDays, reason
leave-duration-limitperiod[start, end], minimumDuration, maximumDuration, units, recurring, autoRejectResponse, leaveTypeIds
leave-request-notice-periodminLeaveDurationForAdvanceNotice, requiredAdvanceNoticeDays, autoRejectResponse, leaveTypeIds

Field names and constraints are taken from the supplied contract schema. The open [key: string] slot on every automation shape is not listed here.

Frequently asked questions

Does automation.created also fire when an automation is paused or edited?

No. automation.created fires only when an automation is created. Pausing, re-enabling or editing an automation is delivered as automation.updated. The body type field is restricted to automation.created or automation.updated, so a single subscription can cover both, and data.type tells you which of the seven automation shapes you received.

How do I deduplicate automation.created deliveries?

Use the body id, which is the same as the VT-Event-Id header. It is deterministic, so the same change always has the same ID. Keep VT-Delivery-Id for retry tracking and VT-Delivery-Attempt for attempt counting; those are per delivery, not per change.

Which scope does the subscription owner need?

The subscription owner needs automations:read. That scope is stated on the event description and applies to the automation lifecycle events.

What changes in VT-Signature during a secret rotation?

For 24 hours after a secret rotation, VT-Signature carries a second v1 entry signed with the previous secret. Accept a match against either entry during that window; after the window only the current secret should match.

Can I subscribe to webhook.test to exercise my automation.created handler?

No. webhook.test is sent only by test deliveries and cannot be subscribed to. It also gets a random id rather than a deterministic one, so it will not exercise your dedupe path the way a real automation.created delivery does.

Where can I get help with this event?

Email the developer support address published on this site's developer documentation.

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