---
title: "Work with webhooks"
slug: "work-with-webhooks"
abstract: "Choose, create, test, edit, and delete a webhook, which defines the destination of form data, in the form settings."
---
# Work with webhooks

A webhook defines the destination for the form data. You can connect to a third-party product, such as Connect or Zapier, in order to create workflows.

In form editor, you can [edit the form settings](https://doc.sitecore.com/sai/en/users/sitecoreai/design-components/forms/edit-form-settings.html "Edit form settings") and webhook settings for a specific form.

> [!tip]
> You can also access and manage all your webhooks on the Webhooks tab, on the top menu of the dashboard.

## Choose a webhook

You can choose a webhook from a list of webhooks that have been previously defined in Forms. If the webhook you need isn't available, then you can create a new webhook.

To select a webhook for your form:

1. Open a form in the form editor, and on the top menu of the editor, click **Settings**.
2. Click the **Choose webhook** drop-down list and select one of your previously defined webhooks.
3. Click **Add**.

## Create a webhook

If the webhook you need isn't already defined, you can create one.

When configuring a webhook, the endpoint URL must meet the following requirements:

- The URL must use HTTPS.
- Only TLS 1.2 and TLS 1.3 are supported.
- The endpoint must use port 443 or 8443.
- The endpoint must be publicly accessible.
- Localhost isn't supported.
- Private network addresses are not supported.
- The endpoint hostname must resolve successfully.
- The webhook endpoint must present a valid SSL/TLS certificate.

The following endpoint types aren’t supported:

- localhost
- Private network IP addresses
- Unresolvable hostnames
- Endpoints that use HTTP instead of HTTPS

To create a webhook:

1. Open a form in the editor, and on the top menu of the editor, click **Settings**.
2. On the **Settings** page, under the **Webhook** field, click **Manage webhooks**.
3. Click **Add**.
4. On the **Create Webhook** page, fill in the fields, depending on the chosen authentication type:
    - **Authentication Type** - choose between **OAuth 2**, **Basic**, **Api key**, or **No authentication** (not recommended).
    - **Name** - enter the name of the webhook.
    - **URL** - the destination of the transferred data.
5. Click **Submit**.

You will receive a notification stating if the webhook was created.



## Test a webhook

We recommend that you submit the form data to the webhook to test it before you activate your form.

To test a webhook:

1. Open a form in the editor, and on the top menu of the editor, click **Settings**.
2. On the **Settings** page, under the **Webhook** field, click **Test webhook**.
3. Your form is displayed. Fill in the fields and click **Submit**.
4. Inspect the **Test Form Submission** dialog, which shows the URL that the data from your form will be sent to, the payload (the data that’s being transported), and the request headers (the format of the message).

    > [!note]
    > The data will contain the code line `"test": true`, which will enable you to filter out test data from customer data.

    ![The Test Webhook page showing the payload.](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/Forms_TestWebhook.jpg)

5. Click **Submit**.

A notification message will inform you if the test was successful.

> [!tip]
> You can also test a webhook in [preview mode](https://doc.sitecore.com/sai/en/users/sitecoreai/design-components/forms/saving-a-form/preview-your-form-design.html "Preview your form design").

When a form submission returns **Negative response from the webhook**, it means:

- XM Cloud successfully sent the payload to the configured webhook endpoint.
- The endpoint responded (often HTTP 200).
- However, the webhook returned a failure response (`isSuccessful: false`).

In this situation, the issue is typically related to the payload structure, a validation error on the receiving endpoint, or a mismatch between form field keys and webhook expectations.

To prevent similar issues:

- Use consistent field naming conventions.
- Avoid spaces or special characters in field keys.
- Document webhook validation rules.
- Test new forms with a minimal payload first.
- Enable detailed logging on webhook endpoints.
- Validate payload structure before deployment.
- Compare failing forms with working ones field-by-field.

## Edit a webhook

If the destination URL for your data changes, you might need to update your webhook.

To edit a webhook:

1. Open a form in the editor, and on the top menu of the editor, click **Settings**.
2. On the **Settings** page, under **Choose webhook**, click **Manage Webhooks**.
3. On the **Webhooks** page, navigate to the webhook that you want to delete and click **More** :mdiDotsHorizontal: > **Edit**.
4. In the webhook dialog, you can edit:
    - **Authentication Type**
    - **Name**
    - **URL**
5. Click **Submit**.

## Delete a webhook

> [!note]
> You can only delete webhooks that are not already used by a form. Webhooks that are being used are marked as In use on the Webhooks page.

To delete a webhook:

1. Open a form in the editor, and on the top menu of the editor, click **Settings**.
2. On the **Settings** page under **Choose webhook**, click **Manage Webhooks**.
3. On the **Webhooks** page, navigate to the webhook that you want to delete and click **More** :mdiDotsHorizontal: > **Delete**.