v14

latestOpenAPI 3.0.32026-08-04377889.4 MB
aliases

Assign an Alias

Creates a new alias for the deployment resolved from the given deployment or alias ID or URL. The authenticated user or team must own this deployment. If the desired alias is already assigned to another deployment, then it will be removed from the old deployment and assigned to the new one.

post/v2/deployments/{id}/aliases

Path parameters

idstring required

The deployment or alias ID or URL to assign from

Example:dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa

The deployment or alias ID or URL to assign from

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

aliasstring

The alias we want to assign to the deployment defined in the URL

redirectstring nullable

The redirect property will take precedence over the deployment id from the URL and consists of a hostname (like test.com) to which the alias should redirect using status code 307

Example request

{
  "alias": "my-alias.vercel.app"
}

Response

The alias was successfully assigned to the deployment

uidstring required

The unique identifier of the alias

aliasstring required

The assigned alias name

createdstring date-time required

The date when the alias was created

oldDeploymentIdstring nullable

The unique identifier of the previously aliased deployment, only received when the alias was used before

Example response

{
  "uid": "2WjyKQmM8ZnGcJsPWMrHRHrE",
  "alias": "my-alias.vercel.app",
  "created": "2017-04-26T23:00:34.232Z",
  "oldDeploymentId": "dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa"
}