NextDNS API documentation is available at https://nextdns.io/api. You can find your API key at the bottom of your account page.

14replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • What are the allowed types for .../analytics/destinations?
    • .../analytics/gafam returns 404 Not Found
    • Rob we will improve the doc, thanks for the feedback.

      Like 1
      • Rob
      • iOS Developer
      • Rob
      • 6 mths ago
      • Reported - view

      NextDNS Thank you for updating the documentation.

      Using the new/proper(ly documented) URL parameters destination (countries & GAFAM) requests now return useful data. 

  • Can you show me an example of how to change the performance settings? These attempts are not working:

    curl -X PATCH -H "X-Api-Key: redacted"  --data "cnameFlattenig=false" https://api.nextdns.io/profiles/<profile_id>/settings/performance
    curl -X PATCH -H "X-Api-Key: redacted"  -H "content-type: application/json" --data '{"cnameFlattenig": false}' https://api.nextdns.io/profiles/<profile_id>/settings/performance
    • NextDNS Please help.

    • Maciej Bieniek You have a typo, it's "cnameFlattening".

    • NextDNS Even if I fix the typo, this doesn't work. Can you give an example how to turn on/off some settings?

    • Maciej Bieniek The following works:

      curl -X PATCH -H "Content-Type: application/json" -H "X-Api-Key: xxx" --data '{"cnameFlattening": true}' "https://api.nextdns.io/profiles/abc123/settings/performance"

      What error are you getting?

    • NextDNS Awkward... today it just works, maybe the reason was "not enough coffee". Thanks for the help.

  • How does one set the current active profile using the API? The docs show how to create/read existing profiles, but it's unclear how a profile can be set as the active profile.

    • Josh N what do you mean by active profile?

  • I do not under understanding  what you mean by 

    …or add a domain to the Denylist by POST‘ing at: https://api.nextdns.io/profiles/:profile/denylist

    what do we post?

  • @NextDNS Could you show me the list of supported protocols that can occur in /analytics/protocols?
    I found those DNS-over-HTTPS, DNS-over-QUIC, DNS-over-TLS, TCP, UDP. Anything else?


    Similar request for statuses from /analytics/status, I found "allowed", "blocked", "default", "relayed".

  • Are you planning to use the API to build more functionality into the native mobile apps like logs, charts etc ?


    In that case, it would be very helpful to add allowlist / blocklist CRUD operations to the API.

    Alongside with logs, this can be very helpful in temporarily allowing URLS for websites that break (and then block them again).

    Today the only way to do that is via the web app