Skip to content

Create a DNS record

POST
/api/organizations/{organizationId}/domains/{domainId}/dns-records

Create a new DNS record in the given managed domain. The record is created at the DNS provider and returned.

The type field determines which additional fields are permitted; sending a field that is not allowed for the chosen type is rejected:

  • A, AAAA, CNAME - allow monitorType, weight.
  • CAA - allow flags, tag.
  • MX, HTTPS, SVCB - allow priority.
  • SRV - allow priority, weight, port.
  • Other types (TXT, NS, PTR, Redirect, Flatten, PullZone, Script) accept only name, value, ttl and comment.

name and value are required. ttl, when supplied, must be between 15 and 86400 (defaults to 3600). priority, weight and port accept 0-65535, and flags accepts 0-255.

Authorizations

ApiToken

Long-lived API token created via POST /api/api-tokens (returned once in plaintext).

Type
API Key (header: X-API-TOKEN)
or
JWT

JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer .

Type
HTTP (bearer)

Parameters

Path Parameters

organizationId*

Organization identifier

Type
string
Required
domainId*

dns-record identifier

Type
string
Required

Request Body

JSON
{
  
"type": 0,
  
"ttl": 3600,
  
"value": "192.0.2.1",
  
"name": "www",
  
"weight": 0,
  
"priority": 10,
  
"port": 0,
  
"flags": 0,
  
"tag": "issue",
  
"monitorType": 0,
  
"comment": "Primary web server"
}

Responses

dns-record resource created

JSON
{
  
"@context": "string",
  
"@id": "string",
  
"@type": "string",
  
"recordId": 123456,
  
"domainId": "0f8fad5b-d9cb-469f-a165-70867728950e",
  
"type": 0,
  
"ttl": 3600,
  
"value": "192.0.2.1",
  
"name": "www",
  
"weight": 0,
  
"priority": 10,
  
"port": 0,
  
"flags": 0,
  
"tag": "issue",
  
"monitorStatus": 0,
  
"monitorType": 0,
  
"comment": "Primary web server",
  
"id": "0f8fad5b-d9cb-469f-a165-70867728950e:123456",
  
"typeString": "A"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI