Create DNS Record

POST /v1/domains/self/{uuid}/dns-records

Add a DNS record under one of your managed custom domains. The platform proxies the request live to your configured DNS provider (Cloudflare, Route53, DigitalOcean, …) and returns the provider's response normalised into the common record shape.

Type, name, and content are validated client-side and provider-side; the platform supports the eight common record types (A, AAAA, CNAME, TXT, MX, NS, SRV, CAA). Anything else returns 400.

Only available on domains where you've stored DNS-provider credentials. Domains in provider: "none" mode return 400 — you'd manage their DNS at the registrar instead.

Path parameters

uuid string (uuid) Req
Domain UUID.

Request body

type string Req
Record type, uppercased server-side. One of: A, AAAA, CNAME, TXT, MX, NS, SRV, CAA.
name string Req
Record name (subdomain part). Use "@" for the apex.
content string Req
Record value (A: IPv4, AAAA: IPv6, CNAME: hostname, TXT: text, MX: mail server, etc.).
ttl int
Time-to-live in seconds. Defaults to 3600 if omitted or zero.
priority int
Required for MX records (lower = preferred). Ignored on other types.
proxied boolean
Cloudflare-only: enable orange-cloud proxying. Ignored on other providers.

Response (200 OK)

The newly-created record, normalised same as list. Includes provider-assigned id.

Errors

400 Bad Request
Invalid record type, missing name or content, domain has no DNS provider, or invalid JSON.
401 Unauthorized
Missing auth.
404 Not Found
Domain doesn't exist or doesn't belong to the calling user.
502 Bad Gateway
Provider rejected the create call (rare — usually a duplicate-record collision or invalid value the platform's pre-check missed).
Request
curl -X POST "https://api.ngris.com/v1/domains/self/<uuid>/dns-records" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "type": "CNAME", "name": "api", "content": "myapp.ngris.io", "ttl": 3600, "proxied": false }'
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client.domains.create_dns_record("<domain_uuid>", { "type": "CNAME", "name": "api", "content": "myapp.ngris.io", "ttl": 3600, })
Response — 200 OK
{ "id": "abc123-from-cloudflare", "type": "CNAME", "name": "api", "content": "myapp.ngris.io", "ttl": 3600, "proxied": false }
On this page
Create DNS Record
Iris