API referenceSections

Apply the template to the chosen zones

Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication

POST /api/v1/tenants/{tid}/dns/template/apply

Apply the template to the chosen zones

Authentication: session cookie __Host-panel_session (contract default; see Authentication).

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
X-CSRF-Tokenheaderstringoptional

Required on unsafe requests authenticated by session cookie; API keys do not use it.

Request body

required

Content type: application/json

object
  • mode string optional
    Allowed values: "merge" "replace"
  • zone_ids array<string> required
Example
{
  "mode": "merge",
  "zone_ids": [
    "string"
  ]
}

Responses

200 Results

Content type: application/json

object
  • items array<DNSZonePlan> required
    • zone_id string required
    • tenant_id string required
    • zone string required
    • provider string required
    • state string required
    • changed boolean required
    • add array<DNSRecord> required
      • name string required

        Relative to the zone; @ for the zone itself

      • type string required
        Allowed values: "A" "AAAA" "CNAME" "MX" "TXT" "SRV" "CAA"
      • value string required
      • ttl integer required
      • priority integer optional
      • weight integer optional
      • port integer optional
      • proxied boolean optional

        Cloudflare's proxy; A, AAAA and CNAME in Cloudflare zones only (ADR 0035)

    • remove array<DNSRecord> required

      Fields of DNSRecord are shown above.

    • applied boolean required
    • error string optional
Example
{
  "items": [
    {
      "zone_id": "string",
      "tenant_id": "string",
      "zone": "string",
      "provider": "string",
      "state": "string",
      "changed": true,
      "add": [
        {
          "name": "string",
          "type": "A",
          "value": "string",
          "ttl": 0,
          "priority": 0,
          "weight": 0,
          "port": 0,
          "proxied": true
        }
      ],
      "remove": [
        {
          "name": "string",
          "type": "A",
          "value": "string",
          "ttl": 0,
          "priority": 0,
          "weight": 0,
          "port": 0,
          "proxied": true
        }
      ],
      "applied": true,
      "error": "string"
    }
  ]
}

default Error

Content type: application/json

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required