Loading...
Loading...
Learn how to use Vercel webhooks and deploy hooks. Track deployments, monitor build status, and trigger rebuilds from external services.
Vercel offers two types of webhook functionality: Event Webhooks that notify you when things happen (deployments, domain changes), and Deploy Hooks that let you trigger new deployments from external services.
Receive notifications when deployments complete, fail, or when project settings change. Perfect for CI/CD integrations and monitoring.
URLs that trigger new deployments when called. Ideal for CMS content updates, scheduled rebuilds, or custom CI pipelines.
deployment.created - New deployment starteddeployment.succeeded - Deployment completed successfullydeployment.ready - Deployment is ready and livedeployment.failed - Deployment faileddeployment.canceled - Deployment was canceleddeployment.error - Error during deploymentproject.created - New project createdproject.removed - Project deleteddomain.created - Domain added to projectGo to your Vercel dashboard, select your project, and navigate to Settings → Git → Deploy Hooks.
Click Create Hook. Give it a name (e.g., "CMS Publish") and select the Git branch to deploy (usually main or production).
You'll get a URL like https://api.vercel.com/v1/integrations/deploy/.... A POST request to this URL triggers a new deployment.
Send a POST request to your deploy hook to trigger a new build:
curl -X POST https://api.vercel.com/v1/integrations/deploy/prj_xxx/yyy
Common use cases for deploy hooks:
Here's what a deployment.succeeded webhook looks like:
{
"id": "uev_xxx",
"type": "deployment.succeeded",
"createdAt": 1705312200000,
"payload": {
"deployment": {
"id": "dpl_xxx",
"name": "my-app",
"url": "my-app-xxx.vercel.app",
"meta": {
"githubCommitRef": "main",
"githubCommitSha": "abc123...",
"githubCommitMessage": "Update homepage"
}
},
"project": {
"id": "prj_xxx",
"name": "my-app"
},
"target": "production"
}
}Use Webhook.it to capture and inspect Vercel webhook events:
Vercel signs webhooks with the x-vercel-signature header. Verify in production:
// Node.js verification example
const crypto = require('crypto');
function verifyVercelSignature(payload, signature, secret) {
const hash = crypto
.createHmac('sha1', secret)
.update(payload)
.digest('hex');
return hash === signature;
}Webhooks notify you WHEN events happen (deployment completed, domain added). Deploy hooks TRIGGER deployments - they're URLs you call to start a new build, useful for CMS content updates or scheduled rebuilds.
Go to your Vercel project Settings > Git > Deploy Hooks to create deploy hooks. For event webhooks, go to Account Settings > Webhooks (or use the Vercel API) to receive notifications about deployments, domains, and more.
Use Webhook.it to get a public URL. Configure it as your webhook endpoint in Vercel. Trigger a deployment or event, and inspect the payload in Webhook.it to understand the data structure.
Vercel sends webhooks for: deployment.created, deployment.succeeded, deployment.failed, deployment.canceled, deployment.error, project.created, project.removed, domain.created, and integration events.
Vercel includes an x-vercel-signature header with HMAC-SHA1 signature. Verify by computing the hash of the request body using your webhook secret and comparing with the signature header.