Webhooks API Reference
Vercel Integrations allow you to subscribe to certain trigger-based events through webhooks. An example use-cases for webhooks might be cleaning up resources after someone removes your Integration.
The webhook payload is a JSON object with the following keys.
Key | Type | Description |
---|---|---|
type | String | The event type. |
id | ID | The ID of the webhook delivery. |
createdAt | Date | The webhook delivery timestamp. |
region | String | The region the event occurred in (possibly null). |
payload | Object | The payload of the webhook. See Supported Event Types for more information. |
Occurs whenever a deployment is canceled.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.project.id | ID | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
Occurs when a user has requested for a check to be rerun after it failed.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.deployment.id | ID | The ID of the deployment. |
payload.check.id | ID | The ID of the check. |
Occurs whenever a deployment is created.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.alias | List | An array of aliases that will get assigned when the deployment is ready. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.project.id | ID | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
Occurs whenever a deployment has failed.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.project.id | ID | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
Occurs when an integration deployment action or the deployment itself is canceled.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.resourceId | ID | The ID of the integration resource for which the action is canceled. |
payload.action | String | The action slug, declared by the integration |
payload.deployment.id | ID | The ID of the deployment. |
Occurs when a deployment that executed an integration deployment action is cleaned up, such as due to the deployment retention policy.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.resourceId | ID | The ID of the integration resource for which the action is cleaned up. |
payload.action | String | The action slug, declared by the integration |
payload.deployment.id | ID | The ID of the deployment. |
Occurs when a deployment starts an integration deployment action.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.resourceId | ID | The ID of the integration resource for which the action is started. |
payload.action | String | The action slug, declared by the integration |
payload.deployment.id | ID | The ID of the deployment. |
Occurs whenever a deployment is promoted.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.project.id | ID | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
Occurs whenever a deployment is successfully built and your integration has registered at least one check.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.project.id | ID | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
Occurs whenever a deployment is ready.
This event gets fired after all blocking Checks have passed. See
deployment-prepared
if you registered
Checks.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.project.id | ID | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
Occurs whenever a domain has been created.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The Domain name created. |
payload.domain.delegated | Boolean | Whether or not the domain was delegated/shared. |
Occurs whenever a domain's auto-renewal setting is changed.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain. |
payload.previous | Boolean | The previous auto-renewal setting. |
payload.next | Boolean | The new auto-renewal setting. |
Occurs whenever a new SSL certificate is added for a domain.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.cert | Object | The certificate object containing certificate details. |
Occurs whenever adding a new SSL certificate for a domain fails.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.dnsNames | List | An array of DNS names for which the certificate addition failed. |
Occurs whenever an SSL certificate is deleted for a domain.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.cert | Object | The certificate object containing certificate details. |
Occurs whenever an SSL certificate is renewed for a domain.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.cert | Object | The certificate object containing certificate details. |
Occurs whenever renewing an SSL certificate for a domain fails.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.dnsNames | List | An array of DNS names for which the certificate renewal failed. |
Occurs whenever DNS records for a domain are modified.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.zone | String | The DNS zone that was modified. |
payload.changes | List | An array of changes made to the DNS records. |
Occurs whenever a domain is renewed.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain that was renewed. |
payload.price | String | The renewal price as a decimal number. |
payload.expirationDate | Date | The new expiration date of the domain. |
payload.renewedAt | Date | The timestamp when the domain was renewed. |
Occurs whenever a domain renewal fails.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain for which renewal failed. |
payload.errorReason | String | The reason why the renewal failed. |
payload.failedAt | Date | The timestamp when the renewal failed. |
Occurs whenever a domain transfer into Vercel is completed.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain that was transferred. |
Occurs whenever a domain transfer into Vercel fails.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain for which the transfer failed. |
Occurs whenever a domain transfer into Vercel is initiated.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain for which the transfer was started. |
Occurs whenever a domain is added to a project.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.domain.name | String | The name of the domain that was added to the project. |
Occurs whenever a domain is removed from a project.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.domain.name | String | The name of the domain that was removed from the project. |
Occurs whenever a domain is moved from one project to another.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.domain.name | String | The name of the domain that was moved. |
payload.from.projectId | ID | The ID of the project the domain was moved from. |
payload.to.projectId | ID | The ID of the project the domain was moved to. |
payload.isRedirect | Boolean | Whether the move created a redirect. |
Occurs whenever a project domain becomes unverified.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.domain.name | String | The name of the domain that became unverified. |
Occurs whenever a project domain is updated.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.previous.domain | String | The previous domain name. |
payload.previous.redirect | String | The previous redirect URL (possibly null). |
payload.previous.redirectStatusCode | Number | The previous redirect status code (possibly null). |
payload.previous.gitBranch | String | The previous git branch (possibly null). |
payload.next.domain | String | The new domain name. |
payload.next.redirect | String | The new redirect URL (possibly null). |
payload.next.redirectStatusCode | Number | The new redirect status code (possibly null). |
payload.next.gitBranch | String | The new git branch (possibly null). |
Occurs whenever a project domain is verified.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.domain.name | String | The name of the domain that was verified. |
Occurs whenever the user changes the project permission for an integration.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.configuration.id | ID | The ID of the configuration. |
payload.configuration.projectSelection | String | A String representing the permission for projects. Possible values are all or selected . |
payload.configuration.projects | List | An array of project IDs. |
payload.projects.added | List | An array of added project IDs. |
payload.projects.removed | List | An array of removed project IDs. |
Occurs whenever an integration has been removed.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.configuration.id | ID | The ID of the configuration. |
payload.configuration.projectSelection | String | A String representing the permission for projects. Possible values are all or selected . |
payload.configuration.projects | List | An array of project IDs. |
Occurs whenever the user confirms pending scope changes.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.configuration.id | ID | The ID of the configuration. |
payload.configuration.scopes | List | List of all scopes (after confirmation). |
Occurs whenever the user connects the integration resource to a project.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.resourceId | ID | The ID of the resource. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | The name of the project. |
payload.projectId | ID | The ID of the project (same as project.id). |
payload.targets | List | The list of the deployment targets. |
Occurs whenever the user disconnects the integration resource to a project.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.resourceId | ID | The ID of the resource. |
payload.project.id | ID | The ID of the project. |
payload.projectId | ID | The ID of the project (same as project.id). |
payload.targets | List | The list of the deployment targets. |
Occurs when an invoice was created and sent to the customer.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.invoiceId | ID | The ID of the Marketplace invoice. |
payload.externalInvoiceId | ID | The ID of the Marketplace invoice, provided by integrator. Possibly null . |
payload.period.start | IsoDate | The invoice's period start date. |
payload.period.end | IsoDate | The invoice's period end date. |
payload.invoiceDate | IsoDate | The invoice's date. |
payload.invoiceTotal | String | The invoice's total as a decimal number. |
Occurs when an invoice was not paid after a grace period.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.invoiceId | ID | The ID of the Marketplace invoice. |
payload.externalInvoiceId | ID | The ID of the Marketplace invoice, provided by integrator. Possibly null . |
payload.period.start | IsoDate | The invoice's period start date. |
payload.period.end | IsoDate | The invoice's period end date. |
payload.invoiceDate | IsoDate | The invoice's date. |
payload.invoiceTotal | String | The invoice's total as a decimal number. |
Occurs when an invoice was paid.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.invoiceId | ID | The ID of the Marketplace invoice. |
payload.externalInvoiceId | ID | The ID of the Marketplace invoice, provided by integrator. Possibly null . |
payload.period.start | IsoDate | The invoice's period start date. |
payload.period.end | IsoDate | The invoice's period end date. |
payload.invoiceDate | IsoDate | The invoice's date. |
payload.invoiceTotal | String | The invoice's total as a decimal number. |
Occurs when an invoice is refunded.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the integration installation. |
payload.installationId | ID | The ID of the integration installation (same as configuration.id ). |
payload.invoiceId | ID | The ID of the Marketplace invoice. |
payload.externalInvoiceId | ID | The ID of the Marketplace invoice, provided by integrator. Possibly null . |
payload.period.start | IsoDate | The invoice's period start date. |
payload.period.end | IsoDate | The invoice's period end date. |
payload.amount | String | The amount being refunded as a decimal number. |
payload.reason | String | The reason for why the refund has been issued. |
Occurs whenever a project has been created.
This event is sent only when the Integration has access to all projects in a Vercel scope.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
Occurs whenever a project has been removed.
This event is sent only when the integration has access to all projects in a Vercel scope.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
Occurs whenever a rolling release stage is approved and progresses to the next stage.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
payload.rollingRelease | Object | The current rolling release configuration. |
payload.rollingRelease.projectId | ID | The ID of the project. |
payload.rollingRelease.ownerId | ID | The ID of the team or user that owns the rolling release. |
payload.rollingRelease.deploymentIds | List | Array of deployment IDs involved in the rolling release. |
payload.rollingRelease.state | String | The current state of the rolling release. Possible values are ACTIVE , COMPLETE , ABORTED . |
payload.rollingRelease.activeStageIndex | Number | The index of the currently active stage. |
payload.rollingRelease.default | Object | The default deployment configuration. |
payload.rollingRelease.default.baseDeploymentId | ID | The ID of the base deployment. |
payload.rollingRelease.default.targetDeploymentId | ID | The ID of the target deployment. |
payload.rollingRelease.default.targetPercentage | Number | The target percentage of traffic to route to the target deployment. |
payload.rollingRelease.default.targetStartAt | Number | The timestamp when the target deployment started. |
payload.rollingRelease.default.targetUpdatedAt | Number | The timestamp when the target deployment was last updated. |
payload.rollingRelease.config | Object | The rolling release configuration. |
payload.rollingRelease.config.target | String | The target environment for the rolling release. |
payload.rollingRelease.config.stages | List | Array of stage configurations. |
payload.rollingRelease.writtenBy | String | The source that triggered the rolling release update. |
payload.prevRollingRelease | Object | The previous rolling release configuration before the approval. |
Occurs whenever a rolling release is completed successfully.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
payload.rollingRelease | Object | The completed rolling release configuration. |
payload.rollingRelease.projectId | ID | The ID of the project. |
payload.rollingRelease.ownerId | ID | The ID of the team or user that owns the rolling release. |
payload.rollingRelease.deploymentIds | List | Array of deployment IDs involved in the rolling release. |
payload.rollingRelease.state | String | The state of the rolling release (will be COMPLETE ). |
payload.rollingRelease.activeStageIndex | Number | The index of the final stage. |
payload.rollingRelease.default | Object | The final deployment configuration. |
payload.rollingRelease.default.baseDeploymentId | ID | The ID of the base deployment. |
payload.rollingRelease.default.targetDeploymentId | ID | The ID of the target deployment. |
payload.rollingRelease.default.targetPercentage | Number | The final target percentage (will be 100). |
payload.rollingRelease.default.targetStartAt | Number | The timestamp when the target deployment started. |
payload.rollingRelease.default.targetUpdatedAt | Number | The timestamp when the target deployment was last updated. |
payload.rollingRelease.config | Object | The rolling release configuration. |
payload.rollingRelease.config.target | String | The target environment for the rolling release. |
payload.rollingRelease.config.stages | List | Array of stage configurations. |
payload.rollingRelease.writtenBy | String | The source that completed the rolling release. |
payload.prevRollingRelease | Object | The previous rolling release configuration before completion. |
Occurs whenever a rolling release is aborted.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
payload.rollingRelease | Object | The aborted rolling release configuration. |
payload.rollingRelease.projectId | ID | The ID of the project. |
payload.rollingRelease.ownerId | ID | The ID of the team or user that owns the rolling release. |
payload.rollingRelease.deploymentIds | List | Array of deployment IDs involved in the rolling release. |
payload.rollingRelease.state | String | The state of the rolling release (will be ABORTED ). |
payload.rollingRelease.activeStageIndex | Number | The index of the stage when aborted. |
payload.rollingRelease.default | Object | The deployment configuration at the time of abortion. |
payload.rollingRelease.default.baseDeploymentId | ID | The ID of the base deployment. |
payload.rollingRelease.default.targetDeploymentId | ID | The ID of the target deployment. |
payload.rollingRelease.default.targetStartAt | Number | The timestamp when the target deployment started. |
payload.rollingRelease.default.targetUpdatedAt | Number | The timestamp when the rolling release was aborted. |
payload.rollingRelease.config | Object | The rolling release configuration. |
payload.rollingRelease.config.target | String | The target environment for the rolling release. |
payload.rollingRelease.config.stages | List | Array of stage configurations. |
payload.rollingRelease.writtenBy | String | The source that aborted the rolling release. |
payload.prevRollingRelease | Object | The previous rolling release configuration before abortion. |
Occurs whenever a rolling release is started.
Key | Type | Description |
---|---|---|
payload.team.id | ID | The ID of the event's team (possibly null). |
payload.user.id | ID | The ID of the event's user. |
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
payload.rollingRelease | Object | The started rolling release configuration. |
payload.rollingRelease.projectId | ID | The ID of the project. |
payload.rollingRelease.ownerId | ID | The ID of the team or user that owns the rolling release. |
payload.rollingRelease.deploymentIds | List | Array of deployment IDs involved in the rolling release. |
payload.rollingRelease.state | String | The state of the rolling release (will be ACTIVE ). |
payload.rollingRelease.activeStageIndex | Number | The index of the initial stage (usually 0). |
payload.rollingRelease.default | Object | The initial deployment configuration. |
payload.rollingRelease.default.baseDeploymentId | ID | The ID of the base deployment. |
payload.rollingRelease.default.targetDeploymentId | ID | The ID of the target deployment. |
payload.rollingRelease.default.targetPercentage | Number | The initial target percentage for the first stage. |
payload.rollingRelease.default.targetStartAt | Number | The timestamp when the rolling release started. |
payload.rollingRelease.default.targetUpdatedAt | Number | The timestamp when the rolling release was last updated. |
payload.rollingRelease.config | Object | The rolling release configuration. |
payload.rollingRelease.config.target | String | The target environment for the rolling release. |
payload.rollingRelease.config.stages | List | Array of stage configurations. |
payload.rollingRelease.writtenBy | String | The source that started the rolling release. |
payload.prevRollingRelease | Object | The previous rolling release configuration (if any) before starting the new one. |
The legacy webhook payload is a JSON object with the following keys.
Key | Type | Description |
---|---|---|
type | String | The legacy event type. |
id | ID | The ID of the webhook delivery. |
createdAt | Number | The webhook delivery timestamp. |
region | String | The region the event occurred in (possibly null). |
clientId | ID | The ID of integration's client. |
ownerId | ID | The ID of the event owner (user or team). |
teamId | ID | The ID of the event's team (possibly null). |
userId | ID | The ID of the event's users. |
webhookId | ID | The ID of the webhook. |
payload | Object | The payload of the webhook. See Legacy Event Types for more information. |
The following event types have been deprecated and webhooks that listen for them can no longer be created. Vercel will continue to deliver the deprecated events to existing webhooks.
This event is replaced by deployment.created.
Occurs whenever a deployment is created.
Key | Type | Description |
---|---|---|
payload.alias | List | An array of aliases that will get assigned when the deployment is ready. |
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.projectId | String | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
This event is replaced by deployment.succeeded.
Occurs whenever a deployment is ready.
This event gets fired after all blocking checks have passed. See
deployment-prepared
if you
registered Checks.
Key | Type | Description |
---|---|---|
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.projectId | String | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
This event is replaced by deployment.ready.
Occurs whenever a deployment is successfully built and your integration has registered at least one check.
Key | Type | Description |
---|---|---|
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.projectId | String | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
This event is replaced by deployment.canceled.
Occurs whenever a deployment is canceled.
Key | Type | Description |
---|---|---|
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.projectId | String | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
This event is replaced by deployment.error.
Occurs whenever a deployment has failed.
Key | Type | Description |
---|---|---|
payload.deployment.id | ID | The ID of the deployment. |
payload.deployment.meta | Map | A Map of deployment metadata. |
payload.deployment.url | String | The URL of the deployment. |
payload.deployment.name | String | The project name used in the deployment URL. |
payload.links.deployment | String | The URL on the Vercel Dashboard to inspect the deployment. |
payload.links.project | String | The URL on the Vercel Dashboard to the project. |
payload.target | String | A String that indicates the target. Possible values are production , staging or null . |
payload.projectId | String | The ID of the project. |
payload.plan | String | The plan type of the deployment. |
payload.regions | List | An array of the supported regions for the deployment. |
This event is replaced by deployment.check-rerequested.
Occurs when a user has requested for a check to be rerun after it failed.
Key | Type | Description |
---|---|---|
payload.deployment.id | ID | The ID of the deployment. |
payload.check.id | ID | The ID of the check. |
This event has been removed. deployment.succeeded can be used for the same purpose.
Occurs when all checks for a deployment have completed. This does not indicate that they have all passed, only that they are no longer running. It is possible for webhook to occur multiple times for a single deployment if any checks are re-requested.
Key | Type | Description |
---|---|---|
payload.deployment.id | ID | The ID of the deployment. |
payload.checks | List | Information about the Checks. |
Each item in checks
has the following properties:
Key | Type | Description |
---|---|---|
payload.id | ID | The unique identifier of the check. Always prepended with check_ . |
payload.name | String | The name of the check. |
payload.status | String | The status of the check. One of registered , running or completed |
payload.conclusion | String | The conclusion of the check. One of cancelled , failed , neutral , succeeded or skipped . |
payload.blocking | Boolean | Whether a deployment should be blocked or not. |
payload.integrationId | String | The unique identifier of the integration. |
This event is replaced by project.created.
Occurs whenever a project has been created.
This event is sent only when the Integration has access to all projects in a Vercel scope.
Key | Type | Description |
---|---|---|
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
This event is replaced by project.removed.
Occurs whenever a Project has been removed.
This event is sent only when the Integration has access to all Projects in a Vercel scope.
Key | Type | Description |
---|---|---|
payload.project.id | ID | The ID of the project. |
payload.project.name | String | Name of the project. |
This event is replaced by integration-configuration.removed.
Occurs whenever an integration has been removed.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the configuration. |
payload.configuration.projects | List | An array of project IDs. |
This event is replaced by integration-configuration.permission-upgraded .
Occurs whenever the user changes the project permission for an integration.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the configuration. |
payload.configuration.projectSelection | String | A String representing the permission for projects. Possible values are all or selected . |
payload.configuration.projects | List | An array of project IDs. |
payload.projects.added | List | An array of added project IDs. |
payload.projects.removed | List | An array of removed project IDs. |
This event is replaced by integration-configuration.scope-change-confirmed .
Occurs whenever the user confirms pending scope changes.
Key | Type | Description |
---|---|---|
payload.configuration.id | ID | The ID of the configuration. |
payload.configuration.scopes | List | List of all scopes (after confirmation). |
This event is replaced by domain.created.
Occurs whenever a domain has been created.
Key | Type | Description |
---|---|---|
payload.domain.name | String | The Domain name created. |
payload.domain.delegated | String | Whether or not the domain was delegated/shared. |
Once your server is configured to receive payloads, it will listen for any payload sent to the endpoint you configured. By knowing the URL of your webhook, anybody can send you requests. Therefore, it is recommended to check whether the requests are coming from Vercel or not.
The recommended method to check is to use the x-vercel-signature
security header you receive with each request. The value of this header corresponds to the sha1
of the request body using your client secret.
For example, you can validate a webhook request as follows:
import crypto from 'crypto';
export async function GET(request: Request) {
const { INTEGRATION_SECRET } = process.env;
if (typeof INTEGRATION_SECRET != 'string') {
throw new Error('No integration secret found');
}
const rawBody = await request.text();
const rawBodyBuffer = Buffer.from(rawBody, 'utf-8');
const bodySignature = sha1(rawBodyBuffer, INTEGRATION_SECRET);
if (bodySignature !== request.headers.get('x-vercel-signature')) {
return Response.json({
code: 'invalid_signature',
error: "signature didn't match",
});
}
const json = JSON.parse(rawBodyBuffer.toString('utf-8'));
switch (json.type) {
case 'project.created':
// ...
}
return new Response('Webhook request validated', {
status: 200,
});
}
function sha1(data: Buffer, secret: string): string {
return crypto.createHmac('sha1', secret).update(data).digest('hex');
}
You can compute the signature using an HMAC hexdigest from the secret token of OAuth2 and request body, then compare it with the value of the x-vercel-signature
header to validate the payload.
You should consider this HTTP request to be an event. Once you receive the request, you should schedule a task for your action.
This request has a timeout of 30 seconds. That means if a 2XX
HTTP response is not received within 30 seconds, the request will be aborted.
If your HTTP endpoint does not respond with a 2XX
HTTP status code, we attempt to deliver the webhook event up to 24 hours with an exponential backoff. Events that could not be delivered within 24 hours will not be retried and will be discarded.
Was this helpful?