Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to NextDNS

Scalekit connector
Open markdown

The NextDNS connector lets your AI agent act in each user's NextDNS account. Each user connects their own NextDNS API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 59 tools.

Tools
59
What they doRead · write · destructive
30 · 20 · 930 read20 write9 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the NextDNS connection

    In AgentKit > Connections, create a NextDNS connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'nextdns'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize NextDNS:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'nextdns_profiles_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their NextDNS credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • nextdns_allowlist_listList a profile's always-allowed domains.Read-only

    List Allowlist

    List a profile's always-allowed domains. Returns data, meta. Get the profile ID from nextdns_profiles_list.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
  • nextdns_analytics_destinations_getGet a profile's query counts by destination country or by big-tech company (type countries or gafam) for a date range, optionally for one device.Read-only

    Get Analytics: Destinations

    Get a profile's query counts by destination country or by big-tech company (type countries or gafam) for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    tostring
    End date (exclusive), same formats as from. Example: now
    typestring
    countries or gafam. One of: countries, gafam. Example: countriesone of countriesgafam
  • nextdns_analytics_devices_getGet a profile's query counts by device for a date range, optionally for one device.Read-only

    Get Analytics: Devices

    Get a profile's query counts by device for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    tostring
    End date (exclusive), same formats as from. Example: now
  • nextdns_analytics_dnssec_getGet a profile's query counts by DNSSEC validation for a date range, optionally for one device.Read-only

    Get Analytics: DNSSEC

    Get a profile's query counts by DNSSEC validation for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    tostring
    End date (exclusive), same formats as from. Example: now
  • nextdns_analytics_domains_getGet a profile's top queried domains, filterable by status, root domain and block reason for a date range, optionally for one device.Read-only

    Get Analytics: Top Domains

    Get a profile's top queried domains, filterable by status, root domain and block reason for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    reasonstring
    Only domains for this reason ID from the reasons endpoint, e.g. blocklist:nextdns-recommended. Example: blocklist:nextdns-recommended
    rootboolean
    Group by root domain. Example: true
    statusstring
    Only domains with this status. One of: default, blocked, allowed. Example: blockedone of defaultblockedallowed
    tostring
    End date (exclusive), same formats as from. Example: now
  • nextdns_analytics_encryption_getGet a profile's query counts by encrypted versus unencrypted for a date range, optionally for one device.Read-only

    Get Analytics: Encryption

    Get a profile's query counts by encrypted versus unencrypted for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    tostring
    End date (exclusive), same formats as from. Example: now
  • nextdns_analytics_ip_versions_getGet a profile's query counts by IPv4 and IPv6 for a date range, optionally for one device.Read-only

    Get Analytics: IP Versions

    Get a profile's query counts by IPv4 and IPv6 for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    tostring
    End date (exclusive), same formats as from. Example: now
  • nextdns_analytics_ips_getGet a profile's query counts by client IP with network and location for a date range, optionally for one device.Read-only

    Get Analytics: Client IPs

    Get a profile's query counts by client IP with network and location for a date range, optionally for one device. Returns data, meta. Use nextdns_analytics_series_get for the same data over time.

    Inputs

    profilestringrequired
    NextDNS profile ID (the 6-character ID in the dashboard URL, e.g. abc123). List profiles with nextdns_profiles_list. Example: abc123
    cursorstring
    Pagination cursor from meta.pagination.cursor. Example: j2k3zl3b4v
    devicestring
    Device ID, or __UNIDENTIFIED__. Example: 8TD1G
    fromstring
    Start date (inclusive): ISO 8601, Unix seconds or ms, relative (-6h, -1d, -3M) or a date. Example: -7d
    limitinteger
    Results per page (1-500, default 10). Example: 50
    tostring
    End date (exclusive), same formats as from. Example: now