import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.domains.getDomain({
domain: "example.com",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();{
"domain": {
"suffix": true,
"verified": true,
"nameservers": [
"ns1.nameserver.net",
"ns2.nameserver.net"
],
"intendedNameservers": [
"ns1.vercel-dns.com",
"ns2.vercel-dns.com"
],
"creator": {
"id": "ZspSRT4ljIEEmMHgoDwKWDei",
"username": "vercel_user",
"email": "demo@example.com"
},
"teamId": "<string>",
"boughtAt": 1613602938882,
"name": "example.com",
"createdAt": 1613602938882,
"expiresAt": 1613602938882,
"id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1",
"serviceType": "zeit.world",
"userId": "<string>",
"customNameservers": [
"ns1.nameserver.net",
"ns2.nameserver.net"
],
"registrar": "new",
"orderedAt": 1613602938882,
"renew": true,
"transferredAt": 1613602938882,
"transferStartedAt": 1613602938882
}
}Get information for a single domain in an account or team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.domains.getDomain({
domain: "example.com",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();{
"domain": {
"suffix": true,
"verified": true,
"nameservers": [
"ns1.nameserver.net",
"ns2.nameserver.net"
],
"intendedNameservers": [
"ns1.vercel-dns.com",
"ns2.vercel-dns.com"
],
"creator": {
"id": "ZspSRT4ljIEEmMHgoDwKWDei",
"username": "vercel_user",
"email": "demo@example.com"
},
"teamId": "<string>",
"boughtAt": 1613602938882,
"name": "example.com",
"createdAt": 1613602938882,
"expiresAt": 1613602938882,
"id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1",
"serviceType": "zeit.world",
"userId": "<string>",
"customNameservers": [
"ns1.nameserver.net",
"ns2.nameserver.net"
],
"registrar": "new",
"orderedAt": 1613602938882,
"renew": true,
"transferredAt": 1613602938882,
"transferStartedAt": 1613602938882
}
}Default authentication mechanism
The name of the domain.
"example.com"
The Team identifier to perform the request on behalf of.
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
"my-team-url-slug"
Successful response retrieving an information for a specific domains.
Show child attributes
If the domain has the ownership verified.
true
A list of the current nameservers of the domain.
["ns1.nameserver.net", "ns2.nameserver.net"]A list of the intended nameservers for the domain to point to Vercel DNS.
["ns1.vercel-dns.com", "ns2.vercel-dns.com"]An object containing information of the domain creator, including the user's id, username, and email.
{
"id": "ZspSRT4ljIEEmMHgoDwKWDei",
"username": "vercel_user",
"email": "demo@example.com"
}If it was purchased through Vercel, the timestamp in milliseconds when it was purchased.
1613602938882
The domain name.
"example.com"
Timestamp in milliseconds when the domain was created in the registry.
1613602938882
Timestamp in milliseconds at which the domain is set to expire. null if not bought with Vercel.
1613602938882
The unique identifier of the domain.
"EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1"
The type of service the domain is handled by. external if the DNS is externally handled, zeit.world if handled with Vercel, or na if the service is not available.
zeit.world, external, na "zeit.world"
A list of custom nameservers for the domain to point to. Only applies to domains purchased with Vercel.
["ns1.nameserver.net", "ns2.nameserver.net"]Whether or not the domain is registered with Name.com. If set to true, the domain is registered with Name.com.
new Timestamp in milliseconds at which the domain was ordered.
1613602938882
Indicates whether the domain is set to automatically renew.
true
Timestamp in milliseconds at which the domain was successfully transferred into Vercel. null if the transfer is still processing or was never transferred in.
1613602938882
If transferred into Vercel, timestamp in milliseconds when the domain transfer was initiated.
1613602938882