GET
/
v4
/
aliases
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.aliases.listAliases({
    domain: "my-test-domain.com",
    from: 1540095775951,
    limit: 10,
    projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
    since: 1540095775941,
    until: 1540095775951,
    rollbackDeploymentId: "dpl_XXX",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "aliases": [
    {
      "alias": "my-alias.vercel.app",
      "created": "2017-04-26T23:00:34.232Z",
      "createdAt": 1540095775941,
      "creator": {
        "uid": "96SnxkFiMyVKsK3pnoHfx3Hz",
        "email": "john-doe@gmail.com",
        "username": "john-doe"
      },
      "deletedAt": 1540095775941,
      "deployment": {
        "id": "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx",
        "url": "my-instant-deployment-3ij3cxz9qr.now.sh",
        "meta": {}
      },
      "deploymentId": "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx",
      "projectId": "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
      "redirect": "<string>",
      "redirectStatusCode": 301,
      "uid": "<string>",
      "updatedAt": 1540095775941,
      "protectionBypass": {}
    }
  ],
  "pagination": {
    "count": 20,
    "next": 1540095775951,
    "prev": 1540095775951
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

domain

Get only aliases of the given domain name

Maximum length: 20
Example:

"my-test-domain.com"

from
number
deprecated

Get only aliases created after the provided timestamp

Example:

1540095775951

limit
number

Maximum number of aliases to list from a request

Example:

10

projectId
string

Filter aliases from the given projectId

Example:

"prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB"

since
number

Get aliases created after this JavaScript timestamp

Example:

1540095775941

until
number

Get aliases created before this JavaScript timestamp

Example:

1540095775951

rollbackDeploymentId
string

Get aliases that would be rolled back for the given deployment

Example:

"dpl_XXX"

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

200
application/json
The paginated list of aliases

The response is of type object.