4

API

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

20 replies

null
    • iOS Developer
    • Rob
    • 1 yr ago
    • Reported - view
    • What are the allowed types for .../analytics/destinations?
    • .../analytics/gafam returns 404 Not Found
      • NextDNs
      • 1 yr ago
      • Reported - view

      Rob we will improve the doc, thanks for the feedback.

      • iOS Developer
      • Rob
      • 1 yr 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. 

      • rawulpjr723
      • 7 mths ago
      • Reported - view

       

    • Maciej_Bieniek
    • 1 yr ago
    • Reported - view

    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
    
      • Maciej_Bieniek
      • 1 yr ago
      • Reported - view

      NextDNS Please help.

      • NextDNs
      • 1 yr ago
      • Reported - view

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

      • Maciej_Bieniek
      • 1 yr ago
      • Reported - view

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

      • NextDNs
      • 1 yr ago
      • Reported - view

      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?

      • Maciej_Bieniek
      • 1 yr ago
      • Reported - view

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

    • Josh_N
    • 1 yr ago
    • Reported - view

    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.

      • NextDNs
      • 1 yr ago
      • Reported - view

      Josh N what do you mean by active profile?

    • Deadlynjdj
    • 1 yr ago
    • Reported - view

    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?

    • Maciej_Bieniek
    • 1 yr ago
    • Reported - view

    @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".

    • gumdropcasualty
    • 1 yr ago
    • Reported - view

    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

    • Christopher_C_Bues
    • 1 yr ago
    • Reported - view

    Any way to get the logs for all profiles at the same time, or do you have to use the profile ID and query each profile individually?

    • cloin
    • 10 mths ago
    • Reported - view

    Please implement a way to generate a new API key ASAP.

    • Justin_Freitag
    • 7 mths ago
    • Reported - view

    Changing the key and removing API access would be great

    • Andre.1
    • 4 mths ago
    • Reported - view

    Is there a way to update a rewrite entry through the API?

      • Red.1
      • 2 mths ago
      • Reported - view

      It doesn't seem like it at the moment