> For the complete documentation index, see [llms.txt](https://docs.metacopier.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metacopier.io/features/basic-features/webhook.md).

# Webhook

The **Webhook** feature sends real-time HTTP POST notifications to your endpoint when trading events occur on your accounts. It can be configured at the **account level** (via Features) or at the **project level** (applies to all accounts in the project).

## Key capabilities

* **Events:** Position Opened, Position Closed, History Updated
* **Authentication:** None, HMAC-SHA256 (with optional timestamp for replay protection), or Bearer Token
* **Delivery:** Configurable retries (0–5), retry delay, request timeout, and rate limiting
* **Payload options:** Choose whether to include position details and account metadata
* **Custom headers:** Add up to 10 custom HTTP headers to each request

{% hint style="info" %}
When configured at the project level, the webhook is active for **all accounts** in that project.
{% endhint %}

## Webhook as notification channel

A project-level webhook also appears on the [Channels](https://docs.metacopier.io/features/basic-features/notification-channels.md) page and can be selected as a target in [notification rules](https://docs.metacopier.io/features/basic-features/notifications.md). It then additionally receives the matching notifications (for example errors, risk or news events) as JSON with the fields `eventType`, `timestamp`, `projectId`, `accountId`, `logLevelId`, `title`, `body` and `data`.

For a detailed setup guide with client-side implementation examples, see the [Webhook Tutorial](https://docs.metacopier.io/tutorials/webhook.md).
