Skip to main content

Overview

The domains client manages the registration and ownership-verification lifecycle for custom domains on your Grantex account. Register a domain, verify ownership via a DNS TXT record, list registered domains, and remove them.
Today the API covers registration, DNS verification, listing, and deletion. Runtime traffic routing — having Grantex consent UI and API endpoints actually served from your verified domain — is on the roadmap; both still resolve under *.grantex.dev.
Access the domains client via client.domains.

Create

Register a new custom domain. Returns a verification token that you must add as a DNS TXT record before calling verify().

Parameters

DomainRegistration

List

List all registered custom domains for the authenticated developer.

ListDomainsResponse

Verify

Verify ownership of a registered domain by checking the DNS TXT record. Call this after adding the verification token to your DNS configuration.
DNS propagation can take up to 48 hours. If verification fails, wait and try again. The verification token does not expire.

Parameters

DomainVerifyResponse

Delete

Remove a custom domain registration. The domain is immediately disassociated from your Grantex endpoints.

Parameters

The method returns None. A GrantexApiError is raised if the domain does not exist.

Example: Domain Setup Flow

Last modified on April 14, 2026