cs-icon.svg

Create a Webhook

Contentstack allows you to create that send real-time data to any third-party application or service when a set event occurs.

To create a webhook, log in to your Contentstack account, and perform the following steps:

  1. Go to your stack, and click the “Settings” icon on the left navigation panel.
  2. Click Webhooks. You can also use the shortcut key “alt + W” for Windows OS users, and “option + W” for Mac OS users to access Webhooks.
  3. Click the + New Webhook button located at the top of the page.
  4. In the Create Webhook page, provide the following webhook details:
    • Name (mandatory): Provide a suitable name for your webhook.
    • URL to notify (mandatory): Specify the URL or web address where the data will be sent once the webhook is triggered. The URL will receive an HTTP POST request when the selected event happens.
    • HTTP basic auth username (optional): Provide the username of the HTTP basic auth if you intend to use Basic Authentication to secure your webhook.
    • HTTP basic auth password (optional): Provide the password of the HTTP basic auth.
    • Custom headers (optional): This field lets you add any additional header to the HTTP POST request. You can add multiple headers by clicking the + icon.
    • User(s) to Notify (optional): Specify the email addresses of the users you want to notify whenever the Webhook Circuit Breaker disables the webhook.

      Note: You can enter a maximum of 10 email addresses for a single webhook.

    • Scope(mandatory): This field lets you select the branch for which this webhook is applicable.create_webhook_with_branches.png

    • Note: You can select only a single branch at a time.

    • When (mandatory): Set the conditions for the webhook to trigger. Here you need to define the event when the webhook will be triggered. For ease of use, we have two views under it: Conditional View and Code View.

      Create_a_Webhook_Screen.png
  5. Click the Save button.

Note: A webhook will not trigger on local environments such as localhost.

API Reference

To perform this create action via APIs, refer to the API request.

Additional Resource: After creating a webhook, you can refer to our guide that lists various examples of automating particular tasks using Webhooks and third party services/apps.

Was this article helpful?
^