---
title: "Webhooks"
slug: "webhooks"
abstract: "Overview of the available webhooks."
---
# Webhooks

You can receive real-time notifications about events or [workflow](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/workflow.html "Workflow") actions that occur in [/xmc/en/users/xm-cloud/en/sitecoreai.html](https://doc.sitecore.com/sai/en/users/sitecoreai/sitecoreai.html), by adding a webhook. You can also use a webhook to run external validation on item workflow state changes.

You can create a webhook that tracks a system event or workflow action. When a tracked event occurs or a workflow action runs, sends event details in an HTTP POST request to a specified endpoint. The webhook request payload can be sent as JSON or XML.

> [!note]
> To view or create webhooks, you must have a developer or admin role.

In , there are three types of webhooks:

- Webhook event handler
- Webhook submit action
- Webhook validation action

<details>
<summary><h2>Webhook event handler</h2></summary>

You can receive information about [supported system events](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/webhook-event-handler-configuration-fields.html#UUID-6ca1c12a-59f3-47a2-dbf3-ef37908f5565_section-idm4582546154470433140652700487 "Supported events") by [creating a webhook event handler](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/walkthrough--creating-and-configuring-a-webhook-event-handler.html "Walkthrough: Creating and configuring a webhook event handler").

For example, you can configure a webhook event handler to send a request to a specified endpoint when an item with the `webpage` template is created.

</details>

<details>
<summary><h2>Webhook submit action</h2></summary>

You can receive information when an item changes workflow state or when a workflow command runs by [adding a webhook submit action](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/walkthrough--adding-and-configuring-a-webhook-submit-action.html "Walkthrough: Adding and configuring a webhook submit action").

For example, you can insert a webhook submit action in the approved state of a workflow. Then when an item using the workflow moves to the `approved` state, the webhook sends an HTTP request to a specified endpoint.

</details>

<details>
<summary><h2>Webhook validation action</h2></summary>

You can provide a third-party service the ability to approve or reject changes in the workflow state of an item, by [adding a webhook validation action](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/walkthrough--adding-and-configuring-a-webhook-validation-action.html "Walkthrough: Adding and configuring a webhook validation action"). When a webhook validation action sends a request, the third-party service must return a [response](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/webhook-validation-action-http-response.html "Webhook validation action HTTP response").

For example, you can add a webhook validation action to a command item of a workflow that changes the state from `in review` to `approved`. When the command is executed, the webhook sends an HTTP request to the specified endpoint.

The endpoint must then return a response validating the command. If the endpoint does not validate the command, the item will not change its state.

</details>

<details>
<summary><h2>Authorization item</h2></summary>

If the destination endpoint requires authentication, you must [create an authorization item](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/walkthrough--using-an-authorization-item.html "Walkthrough: Using an authorization item") and assign it to the webhook.

</details>

<details>
<summary><h2>Error handling</h2></summary>

If you receive an error when sending a request, check the log file for error information.

> [!note]
> does not support resending a request when an error occurs at the destination endpoint.

</details>

<details>
<summary><h2>Timeouts</h2></summary>

The default maximum time to send all webhooks in a particular request is 10 seconds.

</details>

<details>
<summary><h2>Testing a webhook</h2></summary>

If you haven’t set up an endpoint, you can use a [webhook testing](https://www.google.com/search?q=test+webhook) website to create an endpoint to test your webhook.

</details>