curl -X POST "https://api.nextdns.io/profiles" \
-H "X-Api-Key: $NEXTDNS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Home",
"settings": { "logs": { "enabled": false } },
"denylist": [{ "id": "example.com" }]
}'
{
"data": {
"id": "c2ke6y",
"fingerprint": "c2ke6y",
"role": "owner",
"name": "Home"
}
}
Profiles
Create a profile
Create a profile with the filtering and logging settings you choose.
POST
/
profiles
curl -X POST "https://api.nextdns.io/profiles" \
-H "X-Api-Key: $NEXTDNS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Home",
"settings": { "logs": { "enabled": false } },
"denylist": [{ "id": "example.com" }]
}'
{
"data": {
"id": "c2ke6y",
"fingerprint": "c2ke6y",
"role": "owner",
"name": "Home"
}
}
Send a JSON object with the settings you want to set. Omitted fields use the profile defaults. An empty object (
{}) creates an unnamed profile. Your account becomes the owner.
curl -X POST "https://api.nextdns.io/profiles" \
-H "X-Api-Key: $NEXTDNS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Home",
"settings": { "logs": { "enabled": false } },
"denylist": [{ "id": "example.com" }]
}'
{
"data": {
"id": "c2ke6y",
"fingerprint": "c2ke6y",
"role": "owner",
"name": "Home"
}
}
Request body
A name of 1 to 255 characters, unique among the owner’s profiles. Use
null for an unnamed profile.Set
linkedIp.ddns to a dynamic DNS hostname. Its first IPv4 address must match the IPv4 address making the request. Use null to clear the hostname. See DNS setup and Linked IP.DNS threat protections, such as
googleSafeBrowsing. See Security.Blocklist selections, native tracking protection, and tracker settings. See Privacy and parental controls.
Service and category rules, SafeSearch, and the recreation time schedule.
Domains to block. Each entry takes a domain in
id and an optional active flag that defaults to true.Domains to allow. Entries have the same fields as the Denylist. See Allowlist and Denylist.
Logging, the block page, and performance and other settings.
Response
Each successful request creates a new profile. Usedata.id in subsequent requests. The creation response repeats that ID in fingerprint. To get the stored fingerprint, read the new profile.
If you already own a profile with the requested name, the API returns HTTP 200 with {"errors":[{"code":"duplicate"}]}. See Responses and errors.