curl --request POST \
--url https://dev.namify.host/api/v1/dns/txt-record \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_id": 124680932,
"value": "v=spf1 include:_spf.google.com ~all",
"host": "@"
}
'{
"status": "SUCCESS",
"message": "Record added successfully"
}Add TXT
Adds a TXT record to the domain’s DNS zone. TXT records store arbitrary text data and are widely used for domain verification and email authentication.
Common use cases:
- Domain verification: Prove ownership to Google Search Console, Stripe, and similar services (e.g.
google-site-verification=abc123). - SPF: Define authorised mail senders to reduce spam (e.g.
v=spf1 include:_spf.google.com ~all). - DKIM: Publish a public key for email signing (typically on a
selector._domainkeyhost). - DMARC: Set email authentication policy (typically on
_dmarchost).
Prerequisite: DNS service must be activated for the domain via POST /api/v1/dns/activate before records can be added.
curl --request POST \
--url https://dev.namify.host/api/v1/dns/txt-record \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_id": 124680932,
"value": "v=spf1 include:_spf.google.com ~all",
"host": "@"
}
'{
"status": "SUCCESS",
"message": "Record added successfully"
}Authorizations
A personal access token. Obtain one from the dashboard under Settings > API Key. Include it in the Authorization header as Bearer <token>. Unauthenticated requests to protected routes return 401 Unauthorized.
Body
Order ID of the domain.
124680932
Text content of the record.
"v=spf1 include:_spf.google.com ~all"
Subdomain label relative to the zone. Use @ or omit for the apex, or a specific label for targeted records (e.g. _dmarc, google._domainkey).
"@"
TTL in seconds. Minimum 300. Omit to use the zone default.
300