vercel deploy-hooks
The vercel deploy-hooks command (alias vercel deploy-hook) 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 ls --format json
vercel deploy-hooks ls --project my-app--format json for machine-readable output.| Option | Type | Description |
|---|---|---|
-F, --format <FORMAT> | String | Output format (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 --ref 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 |
|---|---|---|
-r, --ref <BRANCH> | String | Git branch ref 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) |
Removes a deploy hook by ID. Use vercel deploy-hooks list first to find the hook ID.
vercel deploy-hooks rm hook_abc123| Argument | Required | Description |
|---|---|---|
id | Yes | ID of the deploy hook to remove |
| 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 |
vercel deploy-hooks create cms-rebuild --ref mainWire the returned URL into your CMS's publish webhook to trigger a production redeploy whenever content changes.
vercel deploy-hooks ls --format jsonvercel deploy-hooks rm hook_abc123 --yesThe following global options can be passed when using the vercel deploy-hooks command:
--cwd--debug--global-config--help--local-config--no-color--non-interactive--scope--team--token--version
For more information on global options and their usage, refer to the options section.
Was this helpful?