POST/domains/{domain}/dns

Create DNS record

Auth
Bearer API key
Content-Type
application/json

Request

Body

FieldTypeDescription
typerequired
string

One of: "A", "AAAA", "CNAME", "MX", "TXT", "NS", "SRV", "CAA"

hostrequired
string
valuerequired
string
ttl
integer

Default: 300

priority
integer
Example request body
{
  "type": "A",
  "host": "@",
  "value": "76.76.21.21",
  "ttl": 300
}

Code samples

curl -X POST 'https://namemy.app/api/v1/domains/{domain}/dns' \
  -H 'Authorization: Bearer nma_live_...' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "A",
  "host": "@",
  "value": "76.76.21.21",
  "ttl": 300
}'

Responses

200Record created
FieldTypeDescription
id
string
type
string

One of: "A", "AAAA", "CNAME", "MX", "TXT", "NS", "SRV", "CAA"

host
string
value
string
ttl
integer
priority
integer
Example
{
  "id": "string",
  "type": "A",
  "host": "@",
  "value": "76.76.21.21",
  "ttl": 300,
  "priority": 0
}
400Invalid request parameters
FieldTypeDescription
error
string
Example
{
  "error": "string"
}
401Missing or invalid API key
FieldTypeDescription
error
string
Example
{
  "error": "Unauthorized"
}
403Valid key but missing required permission
FieldTypeDescription
error
string
Example
{
  "error": "Forbidden"
}
404Resource not found
FieldTypeDescription
error
string
code
string
Example
{
  "error": "Not found",
  "code": "not_found"
}
429Rate limit or daily quota exceeded
FieldTypeDescription
error
string
code
string

One of: "rate_limit_exceeded", "daily_quota_exceeded"

tier
string

One of: "explorer", "founder", "agency"

limit
integer
upgrade
string
Example
{
  "error": "string",
  "code": "rate_limit_exceeded",
  "tier": "explorer",
  "limit": 0,
  "upgrade": "https://namemy.app/pricing"
}