dots.v2.domains.byDomain_name().get()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.domains.byDomain_name(domain_name).get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithDomain_nameGetResponse>

Description

To get details about a specific domain, send a GET request to /v2/domains/{domain_name}.

Parameters

domain_name string required

Example: example.com

The name of the domain itself.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.domains
    .byDomain_name("example.com").get();

Response Example

Show Response Example
{
  "domain": {
    "name": "example.com",
    "ttl": 1800,
    "zone_file": "$ORIGIN example.com.\n$TTL 1800\nexample.com. IN SOA ns1.digitalocean.com. hostmaster.example.com. 1415982611 10800 3600 604800 1800\nexample.com. 1800 IN NS ns1.digitalocean.com.\nexample.com. 1800 IN NS ns2.digitalocean.com.\nexample.com. 1800 IN NS ns3.digitalocean.com.\nexample.com. 1800 IN A 1.2.3.4\n"
  }
}

More Information

See /v2/domains/{domain_name} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.