Skip to main content
PUT
/
policy
/
{policy}
Update DNS Policy
curl --request PUT \
  --url https://api.altostrat.io/content/policy/{policy} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Default Home Policy",
  "applications": [
    "a1b2c3d4-e5f6-7890-1234-567890abcdef"
  ],
  "safe_search": [
    {
      "id": "b2c3d4e5-f6a7-8901-2345-67890abcdef0",
      "option": "TRUE"
    }
  ],
  "dns_whitelist": [
    "allow.example.com"
  ],
  "dns_blacklist": [
    "manual-block.com"
  ],
  "block_adult": true,
  "sites": [
    "c3d4e5f6-a7b8-9012-3456-7890abcdef01"
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "applications": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "resolvers": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "forward_to": "127.0.0.1",
      "ip_address": "127.0.0.1"
    }
  ],
  "records": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "A",
      "fqdn": "<string>",
      "target": "192.0.2.10"
    }
  ],
  "created_at": "2025-04-07T09:00:21+10:00",
  "safe_search": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "option": "<string>"
    }
  ],
  "split_horizon_domains": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "fqdn": "<string>"
    }
  ],
  "attachments": 123,
  "sites": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "dns_whitelist": [
    "<string>"
  ],
  "dns_blacklist": [
    "<string>"
  ],
  "block_adult": true,
  "dnr_policy_overlap": true
}

Authorizations

Authorization
string
header
required

Enter the Bearer token (obtained via authentication or provided internally).

Path Parameters

policy
string<uuid>
required

Body

application/json
name
string
required

A user-friendly name for the DNS policy.

Example:

"Default Home Policy"

block_adult
boolean
required

Whether to block known adult content categories.

Example:

true

applications
string<uuid>[]

List of Application UUIDs to be blocked by this policy.

List of safe search enforcement rules.

dns_whitelist
string<hostname>[]

List of FQDNs to explicitly allow, overriding category blocks (max 50).

Maximum length: 50

A fully qualified domain name.

dns_blacklist
string<hostname>[]

List of FQDNs to explicitly block (max 50).

Maximum length: 50

A fully qualified domain name.

sites
string<uuid>[] | null

List of Site UUIDs to attach this policy to. Existing attachments not in the list will be removed.

Response

DNS policy updated successfully.

id
string<uuid>
name
string
applications
string<uuid>[]
resolvers
object[]
records
object[]
created_at
string<date-time>

Policy creation timestamp (timezone adjusted by resource).

Example:

"2025-04-07T09:00:21+10:00"

split_horizon_domains
object[]
attachments
integer

Number of sites currently attached to this policy.

sites
string<uuid>[]

List of site UUIDs attached to this policy.

dns_whitelist
string<hostname>[]
dns_blacklist
string<hostname>[]
block_adult
boolean
dnr_policy_overlap
boolean

Indicates if any sites attached to this DNS policy also have a DNR policy assigned.

I