> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nextdns.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Profile settings

> Read and change security, privacy, parental control, logging, and performance settings.

Profile settings paths are relative to `/profiles/{profile}`. Anyone with access to the profile can read a section with `GET`. Owners and editors can update it with `PATCH`. A successful read returns the section in `data`, and a successful update returns `204 No Content`.

For example, this request turns on Cache Boost and preserves the other performance settings.

```bash theme={null}
curl --request PATCH \
  "https://api.nextdns.io/profiles/$PROFILE_ID/settings/performance" \
  --header "X-Api-Key: $NEXTDNS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"cacheBoost":true}'
```

## Security

Use `/security` to read or update these boolean protections. Set a field to `true` to enable it.

| Field | Protection |
| - | - |
| `threatIntelligenceFeeds` | Domains identified by threat intelligence feeds |
| `aiThreatDetection` | AI-driven threat detection, including IDN homographs and typosquatting |
| `googleSafeBrowsing` | Malware and phishing domains identified by Google Safe Browsing |
| `cryptojacking` | Cryptocurrency mining |
| `dnsRebinding` | DNS responses containing local network addresses |
| `nrd` | Newly registered domains |
| `newlyActiveDomains` | Domains that are newly or rarely accessed |
| `algorithmicallyGeneratedDomains` | Algorithmically generated domains |
| `ddns` | Dynamic DNS hostnames |
| `freeHostingDomains` | Subdomains provided by free hosting services |
| `tunnelingEndpoints` | Public tunneling endpoints |
| `dataDropServices` | Services for sharing or collecting data (preview) |
| `residentialHosting` | Domains hosted on residential connections (preview) |
| `untrustedCertificates` | Domains serving certificates from untrusted authorities |
| `dnsPayloadDelivery` | Payload delivery through DNS responses (preview) |
| `decentralizedWebGateways` | Public gateways to decentralized networks |
| `highRiskTlds` | Domains under automatically selected high-risk top-level domains |
| `parking` | Parked domains |

For manual blocking of a particular top-level domain, add it to the profile's [Denylist](https://docs.nextdns.io/api-reference/profiles/domain-lists.md).

The legacy fields `idnHomographs`, `typosquatting`, and `dga` always read as `false`. The API accepts and ignores writes to them. For the legacy `tlds` collection, see [Manual TLD compatibility](https://docs.nextdns.io/api-reference/profiles/legacy-tlds.md).

## Privacy and parental controls

| Path | Field | Effect |
| - | - | - |
| `/privacy` | `disguisedTrackers` | Block disguised third-party trackers. |
| `/privacy` | `rotatingAdDomains` | Block rotating advertising domains. |
| `/privacy` | `allowAffiliate` | Enable exceptions for supported tracking and affiliate links. |
| `/parentalControl` | `safeSearch` | Enforce SafeSearch. |
| `/parentalControl` | `youtubeRestrictedMode` | Enforce YouTube Restricted Mode. |
| `/parentalControl` | `blockBypass` | Block known methods for bypassing DNS filters. |

### Select blocklists, devices, services, or categories

To find available IDs, use the catalog path on its own, such as `GET /privacy/blocklists`. To manage a profile’s selections, prefix the path with `/profiles/{profile}`.

| Path | Fields to send |
| - | - |
| `/privacy/blocklists` | `id`, such as `nextdns-recommended` |
| `/privacy/natives` | `id`, such as `samsung` for native tracking protection |
| `/parentalControl/services` | `id`, such as `tiktok`, plus optional `active` and `recreation` |
| `/parentalControl/categories` | `id`, such as `social-networks`, plus optional `active` and `recreation` |

Use `GET` to read the selected entries. To add one, `POST` an object to the collection. To remove one, `DELETE` its `/{id}` path. Successful writes return `204 No Content`.

To replace the entire selection, `PUT` an array to the collection. Sending the array in a profile or section `PATCH` has the same effect. An empty array clears the selection.

For example, add the NextDNS Ads & Trackers Blocklist while keeping every other selected blocklist.

```bash theme={null}
curl --request POST \
  "https://api.nextdns.io/profiles/$PROFILE_ID/privacy/blocklists" \
  --header "X-Api-Key: $NEXTDNS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"id":"nextdns-recommended"}'
```

For services and categories, `active` defaults to `true` and `recreation` defaults to `false`. Setting `recreation` to `true` suspends that entry's blocking rule during the profile's recreation time. You can change an entry with `PATCH /parentalControl/services/{id}` or `PATCH /parentalControl/categories/{id}`. Send both booleans to preserve your intended state, because the API applies defaults to omitted fields on these updates.

### Set recreation time

Send a `recreation` object to `PATCH /profiles/{profile}/parentalControl`. Specify an IANA time zone and the full weekly schedule, using lowercase weekday names and local times in `HH:MM:SS` format. Use half-hour increments. An end time of `00:00:00` means midnight at the end of the selected day. For example, this schedule sets recreation time on Saturdays from 9 a.m. to noon in Paris.

```json theme={null}
{
  "recreation": {
    "timezone": "Europe/Paris",
    "times": {
      "saturday": { "start": "09:00:00", "end": "12:00:00" }
    }
  }
}
```

Replacing the schedule removes omitted days. Sending `{"recreation":{"times":{}}}` clears the schedule and resets the recreation flag on all selected services and categories.

## Logging

Read or update log settings at `/settings/logs`.

| Field | Accepted values |
| - | - |
| `enabled` | Boolean. Enable or disable query logging. |
| `drop.ip` | Boolean. Set to `true` to omit the connecting client's IP address (`clientIp`) and DNS client name (`client`) from new log entries. Devices that report their own local IP can still include it in `device.localIp`. |
| `drop.domain` | Boolean. Set to `true` to omit queried and matched domain names, DNS query types, and destination IPs from new log entries. |
| `retention` | Seconds. Supported values are `3600`, `21600`, `86400`, `604800`, `2592000`, `7776000`, `15552000`, `31536000`, and `63072000`. |
| `location` | `us` (United States), `eu` (European Union), or `ch` (Switzerland). Changing the storage location makes the previous location's logs and analytics unavailable in the profile. |

For example, send `{"drop":{"ip":true},"retention":604800}` to omit client IPs and retain logs for one week. You can also read or update `ip` and `domain` directly at `/settings/logs/drop`.

## Performance and other settings

| Path | Boolean field | Effect |
| - | - | - |
| `/settings/performance` | `ecs` | Enable anonymized EDNS Client Subnet. |
| `/settings/performance` | `cacheBoost` | Enforce a minimum DNS TTL. |
| `/settings/performance` | `cnameFlattening` | Flatten CNAME chains. |
| `/settings/blockPage` | `enabled` | Display a block page for blocked domains. |
| `/settings` | `bav` | Enable the Bypass Age Verification setting. |
| `/settings` | `web3` | Enable Web3 domain resolution. |
| `/settings` | `csam` | Block domains hosting child sexual abuse material. |

Use `settings.csam` in profile requests. The legacy `security.csam` field reads and writes the same setting. If a profile `POST` or `PATCH` supplies both fields, their values must match. Conflicting values return HTTP `400` with error code `conflictingCsamValues`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.