DNSFilter Policies API
The Policies API from DNSFilter — 16 operation(s) for policies.
The Policies API from DNSFilter — 16 operation(s) for policies.
openapi: 3.0.0
info:
title: DNSFilter Agent Local User Bulk Deletes Policies API
description: "\n**Note:** If you are a distributor integrating with DNSFilter, please check\n out our [Distributors Development Guide](/docs/distributors).\n\n### Authentication\n\n- Authentication is required for most, but not all, endpoints.\n\n- Authentication is done by setting the `Authorization` request header.\n The header value is the API key itself.\n For example: `Authorization: eyJ...`\n\n- An API key can be obtained through the DNSFilter dashboard under\n Account Settings. For additional information see\n [this KB article](https://help.dnsfilter.com/hc/en-us/articles/21169189058323-API-Tokens).\n\n### Rate Limiting\n\n- All endpoints are rate limited.\n\n- The limits may vary by endpoint, but are generally consistent.\n\n- When the rate limit is exceeded the API will return the standard `429` HTTP status.\n\n- The following headers will also be provided in the response:\n `Retry-After`, `RateLimit-Policy`, `RateLimit`, `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`.\n For details on the values of these headers, see the following articles\n [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After),\n [here](https://www.ietf.org/archive/id/draft-ietf-httpapi-ratelimit-headers-08.html),\n and [here](https://www.ietf.org/archive/id/draft-polli-ratelimit-headers-05.html).\n\n- For additional information see [this KB article](https://help.dnsfilter.com/hc/en-us/articles/38202811088403-API-Rate-Limits).\n\n### Error Handling\n\n- The API uses standard HTTP status codes to indicate success or failure.\n\n- For _V1_ endpoints the response format is:\n ```json\n { \"error\": \"string\", \"type\": \"string(optional)\" }\n ```\n- For _V2_ endpoints the response format is:\n ```json\n { \"error\": { \"message\": \"string\", \"type\": \"string(optional)\" } }\n ```\n\n### Pagination\n\nFor the _V1_ endpoints, the pagination parameters are nested. That is to say,\nif passed as JSON they look like this: `{\"page[number]\": 1, \"page[size]\": 10}`.\n\nTo pass this information in the URL query string, it would be formatted like\nthis: `...?page%5Bnumber%5D=1&page%5Bsize%5D=10`.\n\nIn this guide, the UI will indicate that `page` is an `object` and if you\nwant to set values when trying the request, you must enter it as if it was\nthe JSON above.\n\n### A Quick Example\n\nThe following will return information about the currently\nauthenticated user.\n\n```bash\n% curl -H 'Authorization: ***' https://api.dnsfilter.com/v1/users/self\n\n{ \"data\": {\n \"id\": \"12345\",\n \"type\": \"users\",\n \"attributes\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n ...additional fields...\n}}}\n```\n"
version: '2026-07-13'
servers:
- url: https://api.dnsfilter.com
description: Production
tags:
- name: Policies
description: ''
paths:
/v1/policies:
get:
tags:
- Policies
operationId: V1_Policies-index
parameters:
- name: include_global_policies
description: include global policies to listing
required: false
in: query
schema:
type: boolean
- name: organization_id
description: Organization ID
required: false
in: query
schema:
type: integer
- name: page
description: Page number and size
required: false
in: query
schema:
type: object
properties:
number:
type: integer
size:
type: integer
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: Policies basic information
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PolicySpec'
links:
$ref: '#/components/schemas/Links'
description: Gets user associated policies basic information.
summary: Get extant
security:
- header_authorization: []
x-controller: v1/policies
x-action: index
post:
tags:
- Policies
operationId: V1_Policies-create
parameters: []
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not create policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'201':
description: Created policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Creates a new policy with the specified data.
summary: Create
security:
- header_authorization: []
x-controller: v1/policies
x-action: create
requestBody:
description: Policy information
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyCreateSpec'
/v1/policies/all:
get:
tags:
- Policies
operationId: V1_Policies-all
parameters:
- name: include_global_policies
description: include global policies to listing
required: false
in: query
schema:
type: boolean
- name: organization_id
description: Organization ID
required: false
in: query
schema:
type: integer
- name: page
description: Page number and size
required: false
in: query
schema:
type: object
properties:
number:
type: integer
size:
type: integer
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: Policies basic information
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PolicySpec'
links:
$ref: '#/components/schemas/Links'
description: Gets ALL user associated policies basic information.
summary: Get all
security:
- header_authorization: []
x-controller: v1/policies
x-action: all
/v1/policies/{id}:
get:
tags:
- Policies
operationId: V1_Policies-show
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
- name: include_relationships
description: Include relationships in the response true/false, defaults to true
required: false
in: query
schema:
type: boolean
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Gets basic information of the specified policy.
summary: Show policy
security:
- header_authorization: []
x-controller: v1/policies
x-action: show
patch:
tags:
- Policies
operationId: V1_Policies-update
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Updated policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Updates a policy with the specified data.
summary: Update
security:
- header_authorization: []
x-controller: v1/policies
x-action: update
requestBody:
description: Policy information
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyCreateSpec'
delete:
tags:
- Policies
operationId: V1_Policies-destroy
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'204':
description: No Content
description: Deletes a policy.
summary: Delete
security:
- header_authorization: []
x-controller: v1/policies
x-action: destroy
/v1/policies/application:
get:
tags:
- Policies
operationId: V1_Policies-application
parameters:
- name: application_id
description: Application ID
required: true
in: query
schema:
type: integer
- name: name
description: Name or partial name of a policy to query
required: false
in: query
schema:
type: string
- name: organization_id
description: Organization ID
required: true
in: query
schema:
type: integer
- name: policy_ids
description: List of Policy IDs
required: false
in: query
schema:
type: array
items:
type: integer
explode: true
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Updated policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicyApplicationSpec'
description: Gets policies information for a specific application.
summary: Get application
security:
- header_authorization: []
x-controller: v1/policies
x-action: application
/v1/policies/application_update:
post:
tags:
- Policies
operationId: V1_Policies-application_update
parameters:
- name: allow_policies
description: List of Policy IDs to be allowed on an specific application
required: true
in: query
schema:
type: array
items:
type: integer
explode: true
- name: application_id
description: Application ID
required: true
in: query
schema:
type: integer
- name: block_policies
description: List of Policy IDs to be blocked on an specific application
required: true
in: query
schema:
type: array
items:
type: integer
explode: true
- name: organization_id
description: Organization ID
required: true
in: query
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Updated policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicyApplicationSpec'
description: Updates a policy with the specified application data.
summary: Update application
security:
- header_authorization: []
x-controller: v1/policies
x-action: application_update
/v1/policies/{id}/add_blacklist_domain:
post:
tags:
- Policies
operationId: V1_Policies-add_blacklist_domain
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Adds a single domain to the blocklist.
summary: Add block domain
security:
- header_authorization: []
x-controller: v1/policies
x-action: add_blacklist_domain
requestBody:
description: Domain to add
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleDomainSpec'
/v1/policies/{id}/remove_blacklist_domain:
post:
tags:
- Policies
operationId: V1_Policies-remove_blacklist_domain
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Removes a single domain from the blocklist.
summary: Remove block domain
security:
- header_authorization: []
x-controller: v1/policies
x-action: remove_blacklist_domain
requestBody:
description: Domain to remove
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleDomainSpec'
/v1/policies/{id}/add_whitelist_domain:
post:
tags:
- Policies
operationId: V1_Policies-add_whitelist_domain
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Adds a single domain to the allowlist.
summary: Add allow domain
security:
- header_authorization: []
x-controller: v1/policies
x-action: add_whitelist_domain
requestBody:
description: Domain to add
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleDomainSpec'
/v1/policies/{id}/remove_whitelist_domain:
post:
tags:
- Policies
operationId: V1_Policies-remove_whitelist_domain
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Removes a single domain from the allowlist.
summary: Remove allow domain
security:
- header_authorization: []
x-controller: v1/policies
x-action: remove_whitelist_domain
requestBody:
description: Domain to remove
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleDomainSpec'
/v1/policies/{id}/add_blacklist_category:
post:
tags:
- Policies
operationId: V1_Policies-add_blacklist_category
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Adds a single category to the blocklist.
summary: Add block category
security:
- header_authorization: []
x-controller: v1/policies
x-action: add_blacklist_category
requestBody:
description: Category to add
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleCategorySpec'
/v1/policies/{id}/remove_blacklist_category:
post:
tags:
- Policies
operationId: V1_Policies-remove_blacklist_category
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Removes a single category from the blocklist.
summary: Remove block category
security:
- header_authorization: []
x-controller: v1/policies
x-action: remove_blacklist_category
requestBody:
description: Category to remove
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleCategorySpec'
/v1/policies/{id}/add_allowed_application:
post:
tags:
- Policies
operationId: V1_Policies-add_allowed_application
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Adds a single application to the allow list.
summary: Add allow category
security:
- header_authorization: []
x-controller: v1/policies
x-action: add_allowed_application
requestBody:
description: Application to add
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleApplicationSpec'
/v1/policies/{id}/remove_allowed_application:
post:
tags:
- Policies
operationId: V1_Policies-remove_allowed_application
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Removes a single application from the allow list.
summary: Remove allow category
security:
- header_authorization: []
x-controller: v1/policies
x-action: remove_allowed_application
requestBody:
description: Application to remove
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleApplicationSpec'
/v1/policies/{id}/add_blocked_application:
post:
tags:
- Policies
operationId: V1_Policies-add_blocked_application
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Adds a single application to the block list.
summary: Add block application
security:
- header_authorization: []
x-controller: v1/policies
x-action: add_blocked_application
requestBody:
description: Application to add
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyUpdateSingleApplicationSpec'
/v1/policies/{id}/remove_blocked_application:
post:
tags:
- Policies
operationId: V1_Policies-remove_blocked_application
parameters:
- name: id
description: Policy ID
required: true
in: path
schema:
type: integer
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Can not update policy with the specified data
content:
application/json:
schema:
type: array
items:
type: string
'200':
description: Policy basic information
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PolicySpec'
description: Removes a single application from the block list.
# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/dnsfilter/refs/heads/main/openapi/dnsfilter-policies-api-openapi.yml