Claim Domain Ownership
POST
https://api.vercel.com/v9/domains/{domain}/claimClaim ownership of a domain for the authenticated team by verifying a TXT record. The caller must first add a TXT record to
_vercel.{domain} (obtained from GET /domains/:domain/verification), then call this endpoint to complete the ownership transfer. If the TXT record is verified, the domain ownership will be transferred to the caller's team, even if the domain is currently owned by another user or team.Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.domains.claimDomainOwnership({ domain: "example.com", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
{ "domain": { "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" }}AuthorizationbearerToken
Default authentication mechanism