vercel deploy-hooks
The vercel deploy-hooks command manages Deploy Hooks. A deploy hook is a URL that, when called with an HTTP POST, triggers a new deployment of a specific Git branch. They are useful for triggering redeploys from external systems like content management systems and cron schedulers.
vercel deploy-hooks [subcommand]Using the vercel deploy-hooks command to manage deploy hook URLs for the
current project.
Lists deploy hooks for the current (or specified) project.
vercel deploy-hooks list
vercel deploy-hooks list --json
vercel deploy-hooks list --project my-app--json for machine-readable output.| Option | Type | Description |
|---|---|---|
--json | Boolean | Output as JSON |
-p, --project <NAME_OR_ID> | String | Project to list deploy hooks for (defaults to the linked project) |
Creates a new deploy hook for a Git branch. The CLI returns the hook URL.
vercel deploy-hooks create cms-rebuild --git-branch mainCreate a deploy hook named cms-rebuild that deploys the main branch when
the URL is called.
| Argument | Required | Description |
|---|---|---|
name | No | Display name for the deploy hook |
| Option | Type | Description |
|---|---|---|
--git-branch <BRANCH> | String | Git branch to deploy when the hook URL is triggered |
-p, --project <NAME_OR_ID> | String | Project to create the deploy hook in (defaults to the linked project) |
Deletes a deploy hook by ID. Use vercel deploy-hooks list first to find the hook ID.
vercel deploy-hooks delete hook_abc123| Argument | Required | Description |
|---|---|---|
id | Yes | ID of the deploy hook to delete |
| Option | Type | Description |
|---|---|---|
-p, --project <NAME_OR_ID> | String | Project containing the deploy hook (defaults to the linked project) |
-y, --yes | Boolean | Skip the confirmation prompt. Takes effect with --non-interactive |
vercel deploy-hooks create cms-rebuild --git-branch mainWire the returned URL into your CMS's publish webhook to trigger a production redeploy whenever content changes.
vercel deploy-hooks list --jsonvercel deploy-hooks delete hook_abc123 --yes --non-interactiveThe following global options can be passed when using the vercel deploy-hooks command:
For more information on global options and their usage, refer to the options section.
Was this helpful?