The SDK is currently in active development. For more details, see the U301 Postman docs.

Get Domain Details

Get your domain details for DNS record

After domain is created, you can get your domain details for DNS record. Add a cname record to your DNS provider. If your domain is hosted on Cloudflare, you can use the Cloudflare auth url to add the record with just one click.

u301.domains.getDetails
import { U301 } from 'u301';

const apiKey = '<YOUR_API_KEY>';
const workspaceId = '<YOUR_WORKSPACE_ID>';

const u301 = new U301({
  apiKey,
  workspaceId,
});
const details = await u301.domains.getDetails('t.example.com'); // [!code highlight]
console.log(details);

response

Request

NameLocationTypeRequiredDefaultDescription
AuthorizationHeaderstringBearer token used for authentication.
workspaceIdQuerystringWorkspace identifier for multi‑tenant routing.
domainPathstringDomain for the short link.

Response

NameTypeDescription
domainstringDomain for the short link.
isValidbooleanWhether the domain is valid.
isArchivedbooleanWhether the domain is archived.
lastCheckedAtstringLast checked time.
randomCodeLengthnumberRandom code length.
workspaceIdstringWorkspace identifier for multi‑tenant routing.
homePageRedirectUrlstringHome page redirect url.
notFoundPageRedirectUrlstringNot found page redirect url.
createdAtstringCreated at time.
updatedAtstringUpdated at time.
isPrimarybooleanWhether the domain is primary.
isGlobalbooleanWhether the domain is global.
dnsSettingsobjectDNS settings.
dnsSettings.cnameValuestringCNAME value.
dnsSettings.isHostedOnCloudflarebooleanWhether the domain is hosted on Cloudflare.
dnsSettings.baseDomainstringBase domain.
dnsSettings.subdomainstringSubdomain.
dnsSettings.domainConnectUrlstringDomain connect url.
dnsSettings.cloudflareAuthUrlstringCloudflare auth url.
example.json
{
    "domain": "t.tealight.uk",
    "isValid": true,
    "isArchived": false,
    "lastCheckedAt": "2025-04-25T11:17:15.459Z",
    "randomCodeLength": 6,
    "workspaceId": "0196684a-3b57-7000-805b-88c32c3c5dc7",
    "homePageRedirectUrl": null,
    "notFoundPageRedirectUrl": null,
    "createdAt": "2025-04-25T11:17:15.459Z",
    "updatedAt": null,
    "isPrimary": false,
    "isGlobal": false,
    "dnsSettings": {
        "cnameValue": "babbette971.bender.u301.com",
        "isHostedOnCloudflare": true,
        "baseDomain": "tealight.uk",
        "subdomain": "t",
        "domainConnectUrl": "api.cloudflare.com/client/v4/dns/domainconnect",
        "cloudflareAuthUrl": "https://dash.cloudflare.com/domainconnect/v2/domainTemplates/providers/u301.com/services/bender/apply?key=_dcpubkeyv1&state=814576&providerId=u301.com&domain=tealight.uk&host=t&subdomain=t&cname=babbette971&sig=STzm%2FoxZcwZAp6DxqTbExk2hN2J6Prs784igsPpqL6oudsfTEAkG1bbQ87E8EhnMh4dmXMzPx35bu3y8BQKvD0tHnIXdA6pjeMYDN9dGB2yLrK72b%2BcFz46DY1ZEL24a9y1kesNSG2hv9zHOFU9Cyr2BkVJPte67r4ypnrNN3OuMeXuIMgdkEMbNjTwXpvZLqnz97wgRQNIc5LYpUkicPnXpZdc6bsswhfanlWG44qzlod09S9tErVWHHg1wmY4qdIWy%2Byz%2Fnp6oVFWSCVDoPa42NJT2p1pySqWkyHztQ21ZmYa1qFhcH0TFrXB3GnAi1xIdsdsfGJZ79vwkdRSIZA%3D%3D"
    }
}

Last updated on

On this page