5

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
    • 2 yrs ago
    • Reported - view
    • What are the allowed types for .../analytics/destinations?
    • .../analytics/gafam returns 404 Not Found
      • NextDNs
      • 2 yrs ago
      • Reported - view

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

      • iOS Developer
      • Rob
      • 2 yrs 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
      • 1 yr ago
      • Reported - view

       

    • Maciej_Bieniek
    • 2 yrs 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
      • 2 yrs ago
      • Reported - view

      NextDNS Please help.

      • NextDNs
      • 2 yrs ago
      • Reported - view

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

      • Maciej_Bieniek
      • 2 yrs 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
      • 2 yrs 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
      • 2 yrs ago
      • Reported - view

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

    • Josh_N
    • 2 yrs 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
      • 2 yrs ago
      • Reported - view

      Josh N what do you mean by active profile?

    • Deadlynjdj
    • 2 yrs 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
    • 2 yrs 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
    • 2 yrs 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
    • 1 yr ago
    • Reported - view

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

    • Justin_Freitag
    • 1 yr ago
    • Reported - view

    Changing the key and removing API access would be great

    • Andre.1
    • 1 yr ago
    • Reported - view

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

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

      It doesn't seem like it at the moment