Dns Management (Get/Set)

Managing Custom DNS Records: Allows you to configure DNS records. To use this effectively, your domain must currently be set up with UMVA's default registrar DNS nameservers. Update your records in bulk across the root domain and assorted subdomains.

Endpoints:

  • GET /{id}/dns: Retrieve current cached records.
  • POST /{id}/dns: Bulk update your records.

Data Constraints for POST (Case-Insensitive):

Record valid type structures must be strictly verified against the following arrays: ['A', 'AAAA', 'CNAME', 'MX', 'TXT', 'SRV'].

Parameters for POST:

  • id (required, URL parameter): The local ID of the domain
  • ttl (optional, integer): Time-to-Live numeric value in seconds. Constraint: Minimum: 60, Maximum: 86400. Defaults to 300.
  • main_records (optional, array): Array of main records {type, value, priority}
  • subdomains (optional, array): Array of subdomain records {name, type, value, priority}

Example POST Request:

curl -X POST "https://umva.net/api/domain/123/dns" 
  -H "X-API-Key: your_api_key_here" 
  -H "Content-Type: application/json" 
  -d '{
    "ttl": 300,
    "main_records": [{"type": "MX", "value": "mail.site.com", "priority": "10"}],
    "subdomains": [{"name": "app", "type": "A", "value": "1.2.3.4"}]
  }'

Success Response Example (HTTP 200 GET):

{
  "success": true,
  "data": {
    "domain": "example.com",
    "using_dynadot_dns": true,
    "ttl": 300,
    "main_records": [{"type": "MX", "value": "mail.site.com", "priority": "10"}],
    "subdomain_records": [{"name": "app", "type": "A", "value": "1.2.3.4"}]
  }
}

Success Response Example (HTTP 200 POST):

{
  "success": true,
  "message": "DNS records updated successfully.",
  "data": {
    "domain": "example.com",
    "records_set": {
      "main_records": 1,
      "subdomain_records": 1,
      "ttl": 300
    }
  }
}

Error Response Example (HTTP 500):

{
  "success": false,
  "message": "Domain is not using registrar DNS. Please change nameservers first."
}