List all the domains
GET
https://api.vercel.com/v5/domainsRetrieves a list of domains registered for the authenticated user or team. By default it returns the last 20 domains if no limit is provided.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.domains.getDomains({ limit: 20, since: 1609499532000, until: 1612264332000, teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
{ "domains": [ { "boughtAt": "1613602938882", "createdAt": "1613602938882", "creator": { "customerId": "example_id", "email": "user@example.com", "id": "icfg_1234567890", "isDomainReseller": "false", "username": "string" }, "customNameservers": [], "echMode": "auto", "expiresAt": "123", "id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", "intendedNameservers": [], "name": "example.com", "nameservers": [], "renew": "true", "serviceType": "zeit.world", "teamId": "example_id", "transferredAt": "1613602938882", "transferStartedAt": "1613602938882", "userId": "example_id", "verified": "true" } ], "pagination": { "count": "20", "next": "1540095775951", "prev": "1540095775951" }}AuthorizationbearerToken
Default authentication mechanism
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
409Error
410Error