DNSFilter icon

DNSFilter

**Note:** If you are a distributor integrating with DNSFilter, please check out our [Distributors Development Guide](/docs/distributors).### Authentication- Authentication is required for most, but not all, endpoints.- Authentication is done by setting the `Authorization` request header. The header value is the API key itself. For example: `Authorization: eyJ...`- An API key can be obtained through the DNSFilter dashboard under Account Settings. For additional information see [this KB article](https://help.dnsfilter.com/hc/en-us/articles/21169189058323-API-Tokens).### Rate Limiting- All endpoints are rate limited.- The limits may vary by endpoint, but are generally consistent.- When the rate limit is exceeded the API will return the standard `429` HTTP status.- The following headers will also be provided in the response: `Retry-After`, `RateLimit-Policy`, `RateLimit`, `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`. For details on the values of these headers, see the following articles [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After), [here](https://www.ietf.org/archive/id/draft-ietf-httpapi-ratelimit-headers-08.html), and [here](https://www.ietf.org/archive/id/draft-polli-ratelimit-headers-05.html).- For additional information see [this KB article](https://help.dnsfilter.com/hc/en-us/articles/38202811088403-API-Rate-Limits).### Error Handling- The API uses standard HTTP status codes to indicate success or failure.- For _V1_ endpoints the response format is: ```json { "error": "string", "type": "string(optional)" } ```- For _V2_ endpoints the response format is: ```json { "error": { "message": "string", "type": "string(optional)" } } ```### PaginationFor the _V1_ endpoints, the pagination parameters are nested. That is to say,if passed as JSON they look like this: `{"page[number]": 1, "page[size]": 10}`.To pass this information in the URL query string, it would be formatted likethis: `...?page%5Bnumber%5D=1&page%5Bsize%5D=10`.In this guide, the UI will indicate that `page` is an `object` and if youwant to set values when trying the request, you must enter it as if it wasthe JSON above.### A Quick ExampleThe following will return information about the currentlyauthenticated user.```bash% curl -H 'Authorization: ***' https://api.dnsfilter.com/v1/users/self{ "data": { "id": "12345", "type": "users", "attributes": { "name": "John Doe", "email": "john@example.com", ...additional fields...}}}```

Actions328

Overview

This node updates an existing policy in the DNSFilter system using the PATCH /v1/policies/{id} endpoint. It is useful for modifying policy settings such as allowlists, blocklists, categories, applications, and other policy attributes. For example, a user can update a policy to append new domains to the allowlist or change the policy's relationships.

Use Case Examples

  1. Update a policy by specifying its ID and providing the updated policy JSON data.
  2. Append new allowlist or blocklist domains to an existing policy by setting the append_domains flag.
  3. Include or exclude relationships in the response by toggling the include_relationships option.

Properties

Name Meaning
Id The unique identifier of the policy to update.
Policy The JSON object containing the policy update parameters.
Additional Fields Optional fields to include in the update request, such as including relationships in the response or appending domains to existing lists.

Output

JSON

  • json - The JSON response from the API containing the updated policy information.

Dependencies

  • An API key credential for DNSFilter to authenticate requests.

Troubleshooting

  • Ensure the policy ID is valid and exists in the DNSFilter system to avoid 404 errors.
  • Verify the JSON structure of the policy update parameters to prevent request validation errors.
  • Check API rate limits and handle 429 status codes by respecting Retry-After headers.
  • Enable debug option to see the actual request URL, headers, and body for troubleshooting.

Links

Discussion