# Webhooks (Actions) Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Webhook**, **Webhooks (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

> \[!NOTE]
>
> This page is about the Webhooks (Actions) Destination. See below for information about other versions of the Webhooks destination:
>
> * [Webhooks (Classic)](/docs/segment/connections/destinations/catalog/webhooks)

Segment's Webhooks (Actions) destination uses internet protocol and HTTP callback to submit real-time user data to your own HTTP endpoints. With this destination, you can `POST`, `PUT`, or `PATCH` data to any webhook URL.

## Getting started

1. From the Segment web app, navigate to **Connections > Catalog**.
2. Search for **Webhooks (Actions)** in the Destinations Catalog, and select the destination.
3. Click **Configure Webhooks (Actions)**.
4. Select the source that will send data to Webhooks (Actions) and follow the steps to name your destination.
5. If you require authentication, add in a shared secret on the **Settings** > **Advanced Settings** tab. If you provide a shared secret, Segment will sign requests with an HMAC in the "X-Signature" request header. The HMAC is a hex-encoded SHA1 hash generated using the shared secret and the request body.
6. Follow the steps in the Destinations Actions documentation on to [customize mappings](/docs/segment/connections/destinations/actions#customize-mappings). You can create up to 5 mappings, each of which can send to a different webhook URL.
7. Enable the destination and configured mappings.

## Destination Settings

| Field         | Description                                                                                                                                                                       | Required | Type     |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Shared Secret | If set, Segment will sign requests with an HMAC in the "X-Signature" request header. The HMAC is a hex-encoded SHA1 hash generated using this shared secret and the request body. | No       | password |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Webhooks-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Send](#send-1)

### Send

Send an HTTP request.

Send is a **Cloud** action.

| Field            | Description                                                                         | Required | Type    |
| ---------------- | ----------------------------------------------------------------------------------- | -------- | ------- |
| URL              | URL to deliver data to.                                                             | Yes      | STRING  |
| Method           | HTTP method to use.                                                                 | Yes      | STRING  |
| Batch Size       | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |
| Headers          | HTTP headers to send with each request. Only ASCII characters are supported.        | No       | OBJECT  |
| Data             | Payload to deliver to webhook URL (JSON-encoded).                                   | No       | OBJECT  |
| Enable Batching? | When enabled, Segment will send events in batches.                                  | No       | BOOLEAN |

## Batch size limits

In Webhook Actions mapping, the default value of batch size is 1000. You can change this value, but there's a maximum batch size limit of 4000.

## Shared secret with batching

If you have batching enabled and are using a shared secret to authenticate your requests, Segment signs the *first* event in the batch rather than the whole batch. When verifying the `X-Signature` header in your code, ensure you're only signing the first event in the batch to match the signature with what Segment creates.

## FAQs

#### Why is a Webhooks (Actions) destination helpful with end-to-end tests?

The easiest way to test whether a source's events are sending through the Segment pipeline is with an end-to-end test. Use the steps below to monitor the events arriving to your Segment source and whether they're successfully sending to your destinations. Connecting a Webhooks (Actions) Destination to your sources makes these requests easy to see. For example, if you connect a Webhooks Destination (Webhook Actions Destination) to your source, you'd be able to see the events received by that source and sent to that destination.

#### Connect a Webhook Actions destination to your workspace

1. [Add a new Webhook (Actions) destination](https://app.segment.com/goto-my-workspace/destinations/catalog/actions-webhook) to your source. Make sure you select the intended source to connect this destination to.
2. Visit the webhook's site, and copy the endpoint to your clipboard. An example site you can use is [https://webhook.site/#!/](https://webhook.site/#!/), but use whichever webhooks site you prefer.
3. Add a mapping to the Webhook Actions destination, and configure Step 1's conditions to allow for all types of events that you're currently sending through that source.
4. Add the endpoint you copied from Step 2 to the Webhook Actions Mapping's URL in Step 3.
5. Enable the Mapping.
6. Enable the Webhook Actions destination.
7. Begin sending events to your source.
8. Verify those events throughout the Segment pipeline (source debugger or event delivery).
9. Verify the webhook's website which shows the raw JSON for all of the events successfully received by your Segment source and its Webhooks Actions destination.
