A description on Zesty Webhooks and how to use them in production.
Open Perpetual Beta: Webhooks are available to all instances. We plan on expanding the payload of the webhook to include the data an meta data of affected resource.
Introduction
Webhooks allow for actions performed within the Zesty.io platform to trigger external actions via RESTful HTTP API calls. An example of such a use case would be to send out email or text message alerts to customers when a new blog article being published.
Webhook for Publish Actions do not trigger for any publish event greater than 30 days out.
post
https://accounts.api.zesty.io
/v1/webhooks
Create Webhook
get
https://accounts.api.zesty.io
/v1/instances/:instance_zuid/webhooks
Retrieve Webhooks by Instance ZUID
get
https://accounts.api.zesty.io
/v1/webhooks/:webhook_zuid
Retrieve Webhook by ZUID
delete
https://accounts.api.zesty.io
/v1/webhooks/:webhook_zuid
Webhook Deletion
Webhook Conditions
Webhooks are executed by calling API endpoints. In order to create webhooks that will be triggered and executed by API calls, create webhooks with the following parameters. When an action occurs, such as content item creation, a search for the corresponding webhook will occur.
Example:
An item 7-ABCD-1234 corresponding to content model 6-ABCD-1234 has been updated in instance 8-ABCD-1234. Webhooks will be triggered based on the following action conditions.
Update on an item with ZUID 7-ABCD-1234 on an instance with ZUID 8-ABCD-1234
Update on any item belonging to content model 6-ABCD-1234 in instance 8-ABCD-1234
Update on any item in instance 8-ABCD-1234
Instances API Webhook
Create, Update, Delete and Publish Items
Condition
Scoped Resource
Parent Resource
Resource
Action
Request URL
Creating a new item
INSTANCE_ZUID
​
items
CREATE
POST /content/model/MODEL_ZUID/items
Creating a new item for a given content model
INSTANCE_ZUID
MODEL_ZUID
items
CREATE
POST /content/model/MODEL_ZUID/items
Updating a specific item
INSTANCE_ZUID
​
ITEM_ZUID
UPDATE
PUT /content/model/MODEL_ZUID/items/ITEM_ZUID
Updating any item for a given content model
INSTANCE_ZUID
MODEL_ZUID
items
UPDATE
PUT /content/model/MODEL_ZUID/items/ITEM_ZUID
Updating any item
INSTANCE_ZUID
​
items
UPDATE
PUT /content/model/MODEL_ZUID/items/ITEM_ZUID
Deleting a specific item
INSTANCE_ZUID
​
ITEM_ZUID
DELETE
DELETE /content/model/MODEL_ZUID/items/ITEM_ZUID
Deleting any item for a given content model
INSTANCE_ZUID
MODEL_ZUID
items
DELETE
DELETE /content/model/MODEL_ZUID/items/ITEM_ZUID
Deleting any item
INSTANCE_ZUID
​
items
DELETE
DELETE /content/model/MODEL_ZUID/items/ITEM_ZUID
Publishing any item for a given content model
INSTANCE_ZUID
MODEL_ZUID
items
PUBLISH
POST /content/model/MODEL_ZUID/items/ITEM_ZUID/publishings
Publishing a specific item
INSTANCE_ZUID
​
ITEM_ZUID
PUBLISH
POST /content/model/MODEL_ZUID/items/ITEM_ZUID/publishings
Publishing any item
INSTANCE_ZUID
​
items
PUBLISH
POST /content/model/MODEL_ZUID/items/ITEM_ZUID/publishings