# Deploy hooks

Source: https://docs.fortrabbit.com/platform/deployment/deploy-hook
Reviewed: 2026-07-04

> A deploy hook is a URL that triggers a deployment on POST — the way a headless CMS or a cron job can publish without a git push.


Deploy hooks are unique URLs that accept HTTP POST requests to trigger a [deployment](/platform/objects/deployment) on an [environment](/platform/objects/environment).

## Settings

Deploy hooks are configured in the fortrabbit dashboard for each environment.

:BlockLink{title="Deploy hook settings for {{app-env-id}}" path="/environments/{{app-env-id}}/deployment#deploy-hook"}

After enabling a deploy hook, a unique URL is shown. Store it securely and use it to trigger deployments from external services.

## Trigger

To trigger a deployment, send a POST request to the deploy hook URL with a `User-Agent` header. No authentication or payload is required:



```bash
# Trigger
curl -X POST "https://api.fortrabbit.com/webhooks/environments/{{app-env-id}}/deploy/{{SECRET}}" \
  -H "User-Agent: fortrabbit"
```

Upon successful trigger, the server responds with a deployment object:



```json
{
  "data": {
    "publicId": "dp-abc123"
  }
}
```

If an error occurs, the response will look like this:



```json
{
  "error": "Environment not found."
}
```

## Use cases

- Deploy on CMS publish events via webhooks (Contentful, Strapi).
- Scheduled deployments with cron or workflow tools.
- Manual trigger from the CLI with a simple script or alias.
- Automation in GitHub Actions, GitLab CI, or Zapier.

## Example

Triggering a fortrabbit deployment from a GitHub Actions workflow could theoretically work like this:



```yaml
deploy:
  runs-on: ubuntu-latest
  steps:
    - name: Trigger fortrabbit deploy
      run: |
        curl -X POST "${{ secrets.FORTRABBIT_DEPLOY_HOOK_URL }}" \
          -H "User-Agent: fortrabbit"
```

NOTE that this is for demonstrational purposes only. Don't take that example literal. [GitHub Actions](/integrations/git-providers/github) is one kind of integration. Read on for [alternatives](#alternatives).

## Alternatives

The deploy hook is a specific solution for specific workflows.

For most day-to-day usage, the [GitHub integration](/platform/deployment/github-app) with automatic `git push` to deploy is the most convenient way to deploy.

## Security

**Deploy hooks are public!** Anyone with the URL can trigger a deployment. Each deploy hook URL contains a unique identifier. Treat this URL with the same security care as you would a password or API token. If you believe your deploy hook URL has been compromised, you can revoke it from the dashboard and create a new one. Consider rotating it on regular basis.

## Troubleshooting

If a deploy hook fails to trigger a deployment:

- **Invalid URL**: Verify the hook URL is correct and has not been modified
- **Revoked hook**: Check if the hook was revoked or deleted from the dashboard
- **Network issues**: Ensure the external service can reach the fortrabbit deployment API
- **Check status**: View deployment history in the dashboard to confirm if the hook was triggered

You can monitor all deploy hook triggers and their results in the deployment history of your environment.
