> ## Documentation Index
> Fetch the complete documentation index at: https://your-third-ep5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up Webhooks for Real-Time Events

> Configure webhooks in Mintlify to receive real-time HTTP notifications when documentation events like publishes and updates occur.

Webhooks let you receive real-time HTTP notifications whenever key events happen in your Mintlify project. Instead of polling for changes, your systems can react instantly when pages are published, updated, or deleted. You can use webhooks to trigger CI pipelines, update search indexes, notify external dashboards, or log activity in your own infrastructure.

## Available events

| Event             | Description                                                         |
| ----------------- | ------------------------------------------------------------------- |
| `page.published`  | Fired when a new page is published and becomes publicly visible.    |
| `page.updated`    | Fired when an existing page is edited and the changes are deployed. |
| `page.deleted`    | Fired when a page is removed from the project.                      |
| `build.completed` | Fired when a documentation build finishes successfully.             |
| `build.failed`    | Fired when a documentation build fails and errors are available.    |

## Create a webhook endpoint

<Steps>
  <Step title="Open project settings">
    In the Mintlify dashboard, select your project and click **Settings**.
  </Step>

  <Step title="Go to the Webhooks tab">
    Navigate to **Webhooks** in the settings sidebar, then click **Add endpoint**.
  </Step>

  <Step title="Enter your endpoint URL">
    Provide the HTTPS URL where Mintlify should send event payloads. This must be a publicly accessible endpoint that can accept POST requests.
  </Step>

  <Step title="Select events to receive">
    Choose one or more events from the list above. You can subscribe to all events or limit notifications to only the ones your system needs.
  </Step>

  <Step title="Save and verify">
    Click **Save**. Mintlify sends a test payload to confirm the endpoint responds with a 2xx status code.
  </Step>
</Steps>

## Sample webhook payload

Here is an example payload for a `page.published` event:

```json theme={null}
{
  "event": "page.published",
  "project": "acme-docs",
  "timestamp": "2024-05-21T14:32:10Z",
  "data": {
    "page": {
      "id": "page_abc123",
      "path": "/guides/authentication",
      "title": "Authenticate with Acme",
      "author": "jane.doe@example.com",
      "url": "https://docs.acme.com/guides/authentication"
    }
  }
}
```

<Warning>
  Always verify webhook signatures or use a secret token to authenticate requests. Mintlify includes a `X-Mintlify-Signature` header with every payload. Reject any request that does not include a valid signature to protect your endpoint from spoofed traffic.
</Warning>
