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

# Call Webhook

> Send rule and email metadata to an external HTTP endpoint.

The **Call webhook** rule action sends a JSON request to an external service when an email matches a rule.

## Configure the Action

1. Open **Assistant** and edit a rule.
2. Add the **Call webhook** action.
3. Enter a publicly reachable HTTP or HTTPS endpoint.
4. Save the rule.

Inbox Zero validates webhook destinations and rejects unsafe or private-network addresses.

## Request Contract

* **Method:** `POST`
* **Content-Type:** `application/json`
* **Authentication header:** `X-Webhook-Secret`
* **Success response:** Any `2xx` status
* **Timeout:** 1 second

Inbox Zero does not wait for or parse the response body. A timeout, blocked destination, network failure, or non-`2xx` response is logged but does not stop the remaining rule actions. Webhook calls are not retried, so the endpoint should acknowledge quickly and queue longer work asynchronously.

## Payload

```typescript theme={null}
{
  email: {
    threadId: string;
    messageId: string;
    subject: string;
    from: string;
    cc?: string;
    bcc?: string;
    headerMessageId: string;
  };
  executedRule: {
    id: string;
    ruleId: string | null;
    reason: string | null;
    automated: boolean;
    createdAt: string;
  };
}
```

`threadId` and `messageId` are provider-specific Gmail or Outlook identifiers. `createdAt` is an ISO 8601 timestamp. `ruleId` can be `null` if the original rule no longer exists.

## Webhook Secret

Open **Settings**, find the **Developer** section, and generate a Webhook Secret. The secret is shown only when generated, so copy it before closing the dialog. Regenerating it immediately changes the value sent with future requests.

Every request includes the `X-Webhook-Secret` header. Your endpoint should compare the header to the stored secret before processing the payload.
