> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook

> Hightouch Events Webhook integration

## Overview

Hightouch supports ingesting events via webhook HTTP requests sent to a webhook endpoint hosted by Hightouch. This allows you to send events from any system that supports webhooks (eg. Stripe, Iterable, Shopify).

Once you create a webhook event source, Hightouch automatically creates a custom webhook endpoint that will extract, transform, and load webhook data into Hightouch Events. Your data can then be synced to your warehouse or streamed to our catalog of realtime destinations.

## Setup

To get started, [**create an event source**](https://app.hightouch.com/events/sources/new?from=docs), select **Webhook** and follow the steps below.

## Event Structure

All webhooks are ingested into Hightouch as `track` events. The HTTP request `headers` and `body` (JSON) are exposed as custom `properties` on the `track` event.

For example, the following webhook:

```json theme={null}
{
  "name": "Order Completed",
  "data": {
    "user_id": "user_123",
    "order_id": "order_456",
    "amount": 123.45
  }
}
```

Will be ingested into Hightouch as:

```json theme={null}
{
  "type": "track",
  "event": "Order Completed",
  "properties": {
    "body": {
      "name": "Order Completed",
      "data": {
        "user_id": "user_123",
        "order_id": "order_456",
        "amount": 123.45
      }
    },
    "headers": {}
  },
  "context": {
    "ip": "0.0.0.0"
  },
  "timestamp": "2024-07-29T14:52:37.648Z"
}
```

### Field mappings

You can configure how Hightouch transforms incoming webhooks to Hightouch [`track` events](https://docs.hightouch.com/events/event-spec#track-events). Mappings can be configured for the following fields:

* `event` - When providing a path to the field you want to use for the event name, please reference the path relative to the webhook request body, not the event object displayed in the Hightouch debugger.

You can also transform your events using Functions in order to standardize the schema or enrich its contents.

### Schema Enforcement

[Event Contracts](https://docs.hightouch.com/events/contracts/management.md) can be attached to Webhook sources just like any other Event Source.
