Webhooks

Webhooks are an essential part of any headless content management system. Webhooks enable you to perform custom business logic, detached from the core workings of GraphCMS.

You can attach webhooks to one or more model, and when any data is added, updated, deleted, published or unpublished. Webhooks can also be triggered per content stage.

When a webhook is invoked, a custom specified URL is triggered, along with any custom configured headers.

Webhooks are great for, and not limited to:

  • Syncing data to external search engine,
  • Syncing data with external PIM,
  • Redeploying your static website when content or assets change,
  • Triggering email campaigns based on new content added.

Webhooks are a paid upgrade. See pricing for further details.


Working with Webhooks

Create a Webhook

  1. Navigate to Webhooks in the sidebar. Webhooks are in the lower group of icons.

  2. Press "Create" in the upper right corner of the window.

  3. Fill out the details for your Webhook:

    • A name for organzing and finding your webhooks
    • A short description to inform others what your webhook does
    • Toggle if you want to include the payload or not
    • The URL to be called
    • The content model(s) that will be watched
    • The content stage to be watched
    • The action to be watched
    • Any additional headers to pass along

    Note, if you leave Model, Stage or Action empty, it will behave as a wildcard.

  4. Press Create

Enable / Disable a Webhooks

  1. Navigate to Webhooks in the sidebar.
  2. Move your cursor to the title of the webhook, and click the pencil icon that appears.
  3. Switch the the "Active" toggle in the upper right corner to switch between on or off.

Delete a Webhook

  1. Navigate to Webhooks in the sidebar.
  2. Move your cursor to the title of the webhook, and click the trash icon that appears.
  3. Confirm you want to delete the webhook.

This site uses cookies to provide you with a better user experience. For more information, refer to our Privacy Policy