Sample webhook payloads
This page contains sample payloads for each of the webhook events currently supported by Dynamic Content. This information will be useful to you if you're developing a webhook integration, particularly when adding filters and creating custom payloads.
For information about customizing a webhook payload see custom payloads.
The payload in each webhook event will contain the ID of the item the event applies to. For example, the edition ID for a scheduled, unscheduled, or published edition and the content ID for the content created, updated or status updated events.
Also included in each payload is a set of HAL links, which you can follow for common actions related to the edition, content item or snapshot.
See the Dynamic Content Management API reference for more information about how you can make use of the information included in the payload.
Edition scheduledLink copied!
This webhook event is triggered when an edition is scheduled in Dynamic Content. The payload will include:
- the name of the edition and any comments added
- the start and end date of the edition
- the ID of the event that the edition is part of
- activeEndDate: true if content is marked to expire at the edition's end date
The full example payload for the edition scheduled webhook event is shown below:
Edition unscheduledLink copied!
This web hook event is triggered when an edition is unscheduled. The payload will include:
- the name of the edition and any comments
- the publishing status: for an unscheduled edition this will be set back to Draft
- the start and end date of the edition
- the ID of the event that the edition is part of
- activeEndDate: true if content is marked to expire at the edition's end date
The full example payload for the edition unscheduled webhook event is shown below:
Snapshot publishedLink copied!
The Snapshot published webhook event is triggered in two ways: when a content item is published and when an edition is published on its start date. The information in the payload will vary according to how it was triggered.
The "createdFrom" field in the payload will indicate whether the webhook event was triggered when a content item was published or when an edition was published. For content items, "createdFrom" will be set to "content-item" and for editions it will be set to "edition".
Snapshot published when content item publishedLink copied!
For the Snapshot published event triggered when a content item published, the payload will include:
- the content item ID
- the creation and modification date
- the content type URI of the root content item
- the content item label
- the content item's locale (if one is set)
- the content repository id
- the content repository label
- the createdFrom field will be set to "content-item"
Below is an example payload for the snapshot published - content item published webhook event:
Snapshot published when hierarchy node publishedLink copied!
If you publish a hierarchy node from its menu and choose to publish its descendants as well, then all the descendant nodes will appear in the rootContentItems array.
The payload will include all the fields included for the standard Snapshot published when content item published payload and in addition the following fields will be included:
- The content item id of the primary node. That's the hierarchy that the user selected to publish.
- An array containing the node and each of its descendants if the user chose to publish descendant nodes too.
Note that for hierarchies with a large number of nodes (for example more than 1500), the payload may exceed the 200KB limit and the the webhook may not be triggered. See the Snapshot published not triggered FAQ for more details.
Snapshot published when edition publishedLink copied!
For the Snapshot published event triggered when an edition is published on its start date, the payload will include:
- the ID of the published edition
- the edition creation date
- created from will be set to "edition"
- rootContentItems contains an array of the top level slots contained in the edition that has been published
- the id of each slot
- the content repository id for each slot
- the repository label for each slot
- the content repository id for each content item
- the repository label for each content item
The example below is created from an edition containing both slots and content added directly and not included in a slot.
Below is the full example payload for the snapshot published- edition published webhook event:
Edition publishedLink copied!
The edition published webhook event is triggered when an edition is published on its start date. The payload will include:
- The edition ID
- The edition name, comment, start and end date
- The edition last modified date and the user that modified it
The HAL links will include the API calls to get more information about the published edition.
Below is the full example payload for the edition published webhook event:
Content item createdLink copied!
This webhook event is triggered when a content item is created in Dynamic Content. The payload includes the following:
- the content ID
- the content body for the created item. As shown in the example payload below, it will also include any linked items
- the item version
- the creation and modification dates and who created and modified the item
- the folder id and label for the folder within which the item is stored
- the repository id and label for the repository within which the item is stored
- the workflow status and label if one is set
- the item's locale if one is set
- the ids of any assignees
Below is the full example payload for the content item created webhook event:
Content item updatedLink copied!
This webhook event is triggered when a content item a change is made to a content item and the item is saved. The webhook will also be triggered when the item is published or unpublished.
The payload includes the following:
- the content ID
- the content body for the updated item. This will also include any linked items
- the item version
- the creation and modification dates and who created and modified the item
- the folder id and label for the folder within which the item is stored
- the repository id and label for the repository within which the item is stored
- the workflow state and label if one is set
- the item's locale if one is set
- the ids of any assignees
- the item's publishing status. This will be one of the following:
- NONE. This item has never been published
- EARLY. A previous version of this item has been published
- LATEST. The latest version of the item is published
- UNPUBLISHED. The item was previously been published but has been unpublished
- if the item is unpublished, the date that the item was unpublished
- if the item has been unpublished, the version that was last unpublished
Below is the full example payload for the content item updated webhook event:
Content item workflow updatedLink copied!
This webhook event is triggered when a content item's status is added or updated. The payload will include:
- the id of the content item for which the status has been updated
- the new workflow state id and label
- the content tree for the item updated
- the content item version (changing the status does not create a new version)
- the folder id and label for the folder within which the item is stored
- the repository id and label for the repository within which the item is stored
- the item's locale if one is set
- the ids of any assignees
Below is the full example payload for the content item workflow updated webhook event:
Content item assignee updatedLink copied!
This webhook event is triggered when the assignees of a content item are added or updated.
The payload will include:
- the ID of the content item for which the assignees have been updated
- the current assignees (these are the assignee IDs)
- the previous assignees (these are the assignee IDs)
- the content tree for the item updated
- the content item version (changing the assignee does not create a new version)
Below is the full example payload for the content item assignee updated webhook event: