POST
/
policy
curl --request POST \
  --url https://api.altostrat.io/content/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).

Body

application/json

Response

201
application/json

DNS policy created successfully.

The response is of type object.