Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
Get Information for a Single Domain
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",
});
// Handle the result
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"
],
"customNameservers": [
"ns1.nameserver.net",
"ns2.nameserver.net"
],
"creator": {
"id": "ZspSRT4ljIEEmMHgoDwKWDei",
"username": "vercel_user",
"email": "demo@example.com"
},
"teamId": "<string>",
"boughtAt": 1613602938882,
"name": "example.com",
"createdAt": 1613602938882,
"expiresAt": 1613602938882,
"id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1",
"orderedAt": 1613602938882,
"renew": true,
"serviceType": "zeit.world",
"transferredAt": 1613602938882,
"transferStartedAt": 1613602938882,
"userId": "<string>"
}
}
Authorizations
Default authentication mechanism
Path Parameters
The name of the domain.
"example.com"
Query Parameters
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"
Response
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.
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"]
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
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",
});
// Handle the result
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"
],
"customNameservers": [
"ns1.nameserver.net",
"ns2.nameserver.net"
],
"creator": {
"id": "ZspSRT4ljIEEmMHgoDwKWDei",
"username": "vercel_user",
"email": "demo@example.com"
},
"teamId": "<string>",
"boughtAt": 1613602938882,
"name": "example.com",
"createdAt": 1613602938882,
"expiresAt": 1613602938882,
"id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1",
"orderedAt": 1613602938882,
"renew": true,
"serviceType": "zeit.world",
"transferredAt": 1613602938882,
"transferStartedAt": 1613602938882,
"userId": "<string>"
}
}