aliases

Retrieves an Alias for the given host name or alias ID.

get/v4/aliases/{idOrAlias}

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v4/aliases/{idOrAlias}
  • Auth: HTTP bearer

Path parameters

idOrAliasstring required

The alias or alias ID to be retrieved

Example:example.vercel.app

Query parameters

fromnumber

Get the alias only if it was created after the provided timestamp

Example:1540095775951
projectIdstring

Get the alias only if it is assigned to the provided project ID

Example:prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB
sincenumber

Get the alias only if it was created after this JavaScript timestamp

Example:1540095775941
untilnumber

Get the alias only if it was created before this JavaScript timestamp

Example:1540095775951
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.

Response

The alias information

aliasstring required

The alias name, it could be a .vercel.app subdomain or a custom domain

createdstring date-time required

The date when the alias was created

createdAtnumber nullable

The date when the alias was created in milliseconds since the UNIX epoch

deletedAtnumber nullable

The date when the alias was deleted in milliseconds since the UNIX epoch

deploymentIdstring nullable required

The deployment ID

projectIdstring nullable required

The unique identifier of the project

protectionBypassobject

The protection bypass for the alias

redirectstring nullable

Target destination domain for redirect when the alias is a redirect

redirectStatusCode301 | 302 | 307 | 308 | null nullable

Status code to be used on redirect

uidstring required

The unique identifier of the alias

updatedAtnumber nullable

The date when the alias was updated in milliseconds since the UNIX epoch

Example response

{
  "alias": "my-alias.vercel.app",
  "created": "2017-04-26T23:00:34.232Z",
  "createdAt": 1540095775941,
  "creator": {
    "email": "john-doe@gmail.com",
    "uid": "96SnxkFiMyVKsK3pnoHfx3Hz",
    "username": "john-doe"
  },
  "deletedAt": 1540095775941,
  "deployment": {
    "id": "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx",
    "url": "my-instant-deployment-3ij3cxz9qr.now.sh"
  },
  "deploymentId": "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx",
  "projectId": "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
  "updatedAt": 1540095775941
}

Changes

    • breaking

      the response property / became optional for the status

    • breaking

      the response property / became optional for the status

    • breaking

      the response property / became optional for the status

    • info

      added the non-success response with the status