Webhooks

Webhooks in Penzle are HTTP callbacks that can be used to send notifications when data in Penzle is changed. This allows external systems to react to these changes and trigger actions such as triggering a website rebuild or sending a notification to a chat application.

Content Events

Webhooks from the following entities in Penzle are used to monitor when the state of any content has been edited or updated:

Type Archive Create Delete Publish Save Unarchived
Asset ✔️ ✔️ ✔️ ✔️
Data template ✔️ ✔️ ✔️
Entry ✔️ ✔️ ✔️ ✔️ ✔️ ✔️

HTTP Verb Selection

In Penzle, webhooks support various HTTP verbs to specify the type of the request. These include:

  • GET
  • POST
  • PUT
  • DELETE
  • PATCH
  • HEAD

Creating a Webhook

In Penzle, you can create a webhook under the Development module in the web application. Navigate to Development → Webhooks. Click on Add webhook, and configure the remote host.

Topics

In Penzle, topics represent types of actions that occur in the system. When creating a webhook, you have to specify which types of actions you want your webhook to be called for. Unlike some systems.

Here are the topics you can specify in Penzle:

Topic Description
EntryCreate Triggered when a new entry is created
EntrySave Triggered when an existing entry is saved
EntryArchive Triggered when an entry is archived
EntryUnarchived Triggered when an archived entry is unarchived
EntryPublish Triggered when an entry is published
EntryDelete Triggered when an entry is deleted
AssetCreate Triggered when a new asset is created
AssetSave Triggered when an existing asset is saved
AssetArchive Triggered when an asset is archived
AssetUnarchived Triggered when an archived asset is unarchived
AssetPublish Triggered when an asset is published
AssetDelete Triggered when an asset is deleted

ContentTypeCreateTriggered when a new content type is createdContentTypeSaveTriggered when an existing content type is savedContentTypeArchiveTriggered when a content type is archivedContentTypeUnarchivedTriggered when an archived content type is unarchivedContentTypePublishTriggered when a content type is publishedContentTypeDeleteTriggered when a content type is deleted

Headers

By default, for the POST, PUT, and PATCH events, Penzle sends the 'Content-Type' header with a value of 'application/json'. No other default headers are sent by Penzle.

However, users can add additional headers manually for security and content specification. Here's how to do it:

To ensure the security of your webhook connection, please add 'Authorization' or 'Basic Security' in the headers. This step is crucial in protecting your data.

Example messages for the two types of headers might look like:

  • For Authorization: Add 'Authorization' header with a value of 'Bearer your_token_here' to provide secure access to your application.
  • For Basic Security: Add 'Authorization' header with a value of 'Basic your_base64_credentials' to apply a basic level of security to your data transmission.

Please remember to replace `your_token_here` and `your_base64_credentials` with the actual token and Base64 encoded credentials (username:password) respectively.