Open navClose nav



Forestry supports outgoing webhooks to notify third-party applications about events that occur in Forestry. This allows developers to trigger custom deployments, send out notifications, and much more.

Events that support webhooks

  • When your site is published
  • When your site is imported

What can you do with a webhook?

  • Trigger cache invalidation every time someone publishes your site
  • Trigger a custom build script when someone publishes your site

Setting up webhooks

Navigate to the Settings page in the CMS, and under Webhook URL specify the URL endpoint that you want outgoing webhooks to post to.,dpr_auto,f_auto,q_80,w_640/

Webhook format

Forestry will make a post to your URL with a JSON payload. For example:

    "event": "post_publish",
    "success": true,
    "error": null

If there is an error, the success parameter will be set to false, and the error parameter will provide the error message. For example:

    "event": "post_publish",
    "success": false,
    "error": "FTP credentials incorrect"

Last updated on June 11, 2020