Webhooks
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.
REST API Documentation and Examples
What Resources Listen for Webhooks
Instances API
- Content Models
- Content Model Items
- Content Model Fields
- Views
- Stylesheets
- Scripts
- Redirects
- Languages
- Instance Setting
Accounts API
- Role
- Instance Roles
- Instance Domains
- Invites
Webhook for Publish Actions do not trigger for any publish event greater than 30 days out.
POST https://accounts.api.zesty.io/v1/webhooks
This endpoint allows you to create webhooks.
GET https://accounts.api.zesty.io/v1/instances/:instance_zuid/webhooks
Retrieves a list of all webhooks.
Retrieve Webhooks by Instance ZUID
GET https://accounts.api.zesty.io/v1/webhooks/:webhook_zuid
DELETE https://accounts.api.zesty.io/v1/webhooks/:webhook_zuid
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 |
Creating, Updating and Deleting Content Models
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new content model | INSTANCE_ZUID | models | CREATE | POST /content/model | |
Update a specific content model | INSTANCE_ZUID | MODEL_ZUID | UPDATE | PUT /content/model/MODEL_ZUID | |
Updating any content model | INSTANCE_ZUID | models | UPDATE | PUT /content/model/MODEL_ZUID | |
Deleting a specific content model | INSTANCE_ZUID | MODEL_ZUID | DELETE | DELETE /content/model/MODEL_ZUID | |
Deleting any content model | INSTANCE_ZUID | models | DELETE | DELETE /content/model/MODEL_ZUID |
Creating, Updating and Deleting Fields
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new field | INSTANCE_ZUID | fields | CREATE | POST /content/model/MODEL_ZUID/fields | |
Creating a new field for a given content model | INSTANCE_ZUID | MODEL_ZUID | fields | CREATE | POST /content/model/MODEL_ZUID/fields |
Updating a specific field | INSTANCE_ZUID | FIELD_ZUID | UPDATE | PUT /content/model/MODEL_ZUID/fields/FIELD_ZUID | |
Updating any field for a given content model | INSTANCE_ZUID | MODEL_ZUID | fields | UPDATE | PUT /content/model/MODEL_ZUID/fields/FIELD_ZUID |
Updating any field | INSTANCE_ZUID | fields | UPDATE | PUT /content/model/MODEL_ZUID/fields/FIELD_ZUID | |
Deleting a specific field | INSTANCE_ZUID | FIELD_ZUID | DELETE | DELETE | DELETE /content/model/MODEL_ZUID/fields/FIELD_ZUID |
Deleting any field for a given content model | INSTANCE_ZUID | MODEL_ZUID | fields | DELETE | DELETE /content/model/MODEL_ZUID/fields/FIELD_ZUID |
Deleting any field | INSTANCE_ZUID | fields | DELETE | DELETE /content/model/MODEL_ZUID/fields/FIELD_ZUID |
Creating, Updating and Deleting Views
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new view | INSTANCE_ZUID | views | CREATE | POST /web/views | |
Update a specific view | INSTANCE_ZUID | VIEW_ZUID | UPDATE | PUT /web/views/VIEW_ZUID | |
Updating any view | INSTANCE_ZUID | views | UPDATE | PUT /web/views/VIEW_ZUID | |
Deleting a specific view | INSTANCE_ZUID | VIEW_ZUID | DELETE | DELETE /web/views/VIEW_ZUID | |
Deleting any view | INSTANCE_ZUID | views | DELETE | DELETE /web/views/VIEW_ZUID |
Creating, Updating and Deleting Stylesheets
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new stylesheet | INSTANCE_ZUID | stylesheets | CREATE | POST /web/scripts | |
Update a specific stylesheet | INSTANCE_ZUID | STYLESHEET_ZUID | UPDATE | PUT /web/scripts/SCRIPT_ZUID | |
Updating any stylesheet | INSTANCE_ZUID | scripts | UPDATE | PUT /web/scripts/SCRIPT_ZUID | |
Deleting a specific stylesheet | INSTANCE_ZUID | SCRIPT_ZUID | DELETE | DELETE /web/scripts/SCRIPT_ZUID | |
Deleting any stylesheet | INSTANCE_ZUID | scripts | DELETE | DELETE /web/scripts/SCRIPT_ZUID |
Creating, Updating and Deleting Scripts
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new script | INSTANCE_ZUID | scripts | CREATE | POST /web/scripts | |
Update a specific script | INSTANCE_ZUID | SCRIPT_ZUID | UPDATE | PUT /web/scripts/SCRIPT_ZUID | |
Updating any script | INSTANCE_ZUID | scripts | UPDATE | PUT /web/scripts/SCRIPT_ZUID | |
Deleting a specific script | INSTANCE_ZUID | SCRIPT_ZUID | DELETE | DELETE /web/scripts/SCRIPT_ZUID | |
Deleting any script | INSTANCE_ZUID | scripts | DELETE | DELETE /web/scripts/SCRIPT_ZUID |
Creating, Updating and Deleting Redirects
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new redirect | INSTANCE_ZUID | redirects | CREATE | POST /web/redirects | |
Update a specific redirect | INSTANCE_ZUID | REDIRECT_ZUID | UPDATE | PUT /web/redirects/REDIRECT_ZUID | |
Updating any redirect | INSTANCE_ZUID | redirects | UPDATE | PUT /web/redirects/REDIRECT_ZUID | |
Deleting a specific redirect | INSTANCE_ZUID | REDIRECT_ZUID | DELETE | DELETE /web/redirects/REDIRECT_ZUID | |
Deleting any redirect | INSTANCE_ZUID | redirects | DELETE | DELETE /web/redirects/REDIRECT_ZUID |
Creating, Updating and Deleting Langs
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new language | INSTANCE_ZUID | langs | CREATE | POST /env/langs | |
Update a specific language | INSTANCE_ZUID | LANG_ID | UPDATE | PUT /env/langs/LANG_ID | |
Updating any language | INSTANCE_ZUID | langs | UPDATE | PUT /env/langs/LANG_ID | |
Deleting a specific language | INSTANCE_ZUID | LANG_ID | DELETE | DELETE /env/langs/LANG_ID | |
Deleting any language | INSTANCE_ZUID | langs | DELETE | DELETE /env/langs/LANG_ID |
Creating, Updating and Deleting Settings
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new setting | INSTANCE_ZUID | settings | CREATE | POST /env/settings | |
Update a specific setting | INSTANCE_ZUID | SETTINGS_ZUID | UPDATE | PUT /env/settings/SETTINGS_ZUID | |
Updating any setting | INSTANCE_ZUID | settings | UPDATE | PUT /env/settings/SETTINGS_ZUID | |
Deleting a specific setting | INSTANCE_ZUID | SETTINGS_ZUID | DELETE | DELETE /env/settings/SETTINGS_ZUID | |
Deleting any setting | INSTANCE_ZUID | settings | DELETE | DELETE /env/settings/SETTINGS_ZUID |
Creating, Updating and Deleting Leads
Accounts API Webhook
Roles
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Creating a new role | INSTANCE_ZUID | roles | CREATE | POST /roles |
Instance Roles
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Generating a new Instance Role | INSTANCE_ZUID | INSTANCE_ZUID | roles | CREATE | POST /instances/INSTANCE_ZUID/roles |
Instance Domains
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Create domain for a given instance | INSTANCE_ZUID | domains | CREATE | POST /instances/INSTANCE_ZUID/domains | |
Update a specific domain for a given instance | INSTANCE_ZUID | DOMAIN_ZUID | UPDATE | PUT /instances/INSTANCE_ZUID/domains/DOMAIN_ZUID | |
Update any domain for a given instance | INSTANCE_ZUID | domains | UPDATE | PUT /instances/INSTANCE_ZUID/domains/DOMAIN_ZUID | |
Delete a specific domain for a given instance | INSTANCE_ZUID | DOMAIN_ZUID | DELETE | DELETE /instances/INSTANCE_ZUID/domains/DOMAIN_ZUID | |
Delete any domain for a given instance | INSTANCE_ZUID | domains | DELETE | DELETE /instances/INSTANCE_ZUID/domains/DOMAIN_ZUID |
Invite
Condition | Scoped Resource | Parent Resource | Resource | Action | Request URL |
---|---|---|---|---|---|
Create Invite | INSTANCE_ZUID | invites | CREATE | POST /invites | |
Respond to Invite | INSTANCE_ZUID | INVITE_ZUID | UPDATE | PUT /invites/INVITE_ZUID | |
Delete Invite | INSTANCE_ZUID | INVITE_ZUID | DELETE | DELETE /invites/INVITE_ZUID |
Updated about 1 month ago