Create a new DNS record for a domain

Add new DNS records (like TXT, A, CNAME, MX) to an existing domain zone. This is necessary for configuring services such as SSL certificates, email delivery, or domain verification. The API returns a unique ID for the created record, which can be used in subsequent calls to manage or verify the record.

Path Parameters

zoneId integer · min: 1 required Example

Unique zone identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
name string required
type string · enum required
A
AAAA
ALIAS
CAA
CNAME
MX
SRV
TXT
value string required
ttl integer
priority integer
weight integer
port integer

Responses

200
success boolean
timestamp string
requestId string
data object
400
error string
message string
code string
timestamp string
requestId string
requiresEmailForwardingDisable boolean
415
error string
message string
code string
timestamp string
requestId string
POST https://cloud.hostup.se/api/dns/zones/{zoneId}/records
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/dns/zones/505/records" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "type": "A",
    "value": "string",
    "ttl": 0,
    "priority": 0,
    "weight": 0,
    "port": 0
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "record": {
      "id": "string",
      "type": "string",
      "name": "string",
      "value": "string",
      "ttl": 0,
      "status": "string"
    }
  }
}
Request Body
{
  "name": "string",
  "type": "A",
  "value": "string",
  "ttl": 0,
  "priority": 0,
  "weight": 0,
  "port": 0
}