> ## Documentation Index
> Fetch the complete documentation index at: https://help-center-starter-replace-template-content.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment webhooks

> Trigger and receive events around Mintlify deployments.

Mintlify integrates with webhooks in two directions: it receives webhooks from GitHub and GitLab to trigger deployments, and you can configure outgoing webhooks to notify external systems when deployments complete.

## Incoming: GitHub and GitLab webhooks

Mintlify automatically configures a webhook on your repository when you connect it. Every push to your default branch (or a configured branch) triggers a new deployment. Pull request events trigger preview deployments.

You don't need to configure these manually — they're set up when you install the GitHub App or connect GitLab.

### Custom branch triggers

By default, Mintlify deploys from your default branch. To change the branch or add additional triggers, go to **Project Settings → Git → Deployment triggers**.

## Outgoing: deployment status notifications

You can use GitHub Actions or GitLab CI to send notifications to external systems after a Mintlify deployment completes.

A common pattern is to call a webhook endpoint after a successful push:

```yaml theme={null}
- name: Notify on deploy
  run: |
    curl -X POST https://your-endpoint.example.com/hooks/docs \
      -H "Content-Type: application/json" \
      -d '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
```

### Verifying payloads

If your endpoint receives events from GitHub (not just Mintlify), always validate the `X-Hub-Signature-256` header using your webhook secret before processing the payload.
