cs-icon.svg

Create a Webhook

Contentstack allows you to create and 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.
    • Email Addresses 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.

    • Stack-level Scope: Specify conditions for creating, deleting, assigning, or unassigning branches or branch aliases
    • Branch-level Scope: Select the branch for which this webhook is applicable and configure trigger conditions for the specific branch.create_webhook_with_branches.png

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

    • Trigger Conditions (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

      Additional Resource: Refer the Webhook Events documentation for more information on the events that you can add.

  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 Create a Webhook 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?
^