Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Adtraction

Scalekit connector
Open markdown

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

Tools
33
What they doRead · write · destructive
31 · 2 · 031 read2 write0 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 Adtraction connection

    In AgentKit > Connections, create an Adtraction 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 = 'adtraction'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Adtraction:', 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: 'adtraction_applications_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Adtraction 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
  • adtraction_applications_listList the status of your channels' applications to Adtraction partner programs.Read-only

    List Applications

    List the status of your channels' applications to Adtraction partner programs. Returns each application's program, channel and approval status. Filter by program or channel ID.

    Inputs

    channel_idinteger
    Numerical ID of one of your channels (website, newsletter, social account), from List Channels. Example: 1324738001.
    program_idinteger
    Numerical ID of an Adtraction partner program (advertiser), from Get Programs or List Applications. Example: 1229865361.
  • adtraction_balance_getGet your Adtraction account balance in one currency.Read-only

    Get Account Balance

    Get your Adtraction account balance in one currency. Returns the accumulated commission balance. Use List Payments for paid-out amounts.

    Inputs

    currencystringrequired
    Currency as an ISO 4217 code, e.g. SEK or EUR. Example: SEK.
  • adtraction_channels_listList the approved channels (websites, newsletters, social accounts) in your Adtraction partner account.Read-only

    List Channels

    List the approved channels (websites, newsletters, social accounts) in your Adtraction partner account. Returns each channel's id, name, type and URL. Use a channel ID in tracking links, feeds and statistics.

    Inputs

    This tool takes no inputs.

  • adtraction_clicks_listList the clicks tracked in your Adtraction account for a period.Read-only

    List Clicks

    List the clicks tracked in your Adtraction account for a period. Returns each click with time, program, channel, EPI values and commission. Filter by program, channel, market, EPI or click IDs.

    Inputs

    currencystringrequired
    Currency as an ISO 4217 code, e.g. SEK or EUR. Example: SEK.
    from_datestringrequired
    Start of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-01T00:00:00+0000. Example: 2026-01-01T00:00:00+0000.
    to_datestringrequired
    End of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-31T23:59:59+0000. Example: 2026-01-31T23:59:59+0000.
    channel_idinteger
    Numerical ID of one of your channels (website, newsletter, social account), from List Channels. Example: 1324738001.
    commission_onlyboolean
    If set to true, only clicks with commission will be returned. Example: false.
    epistring
    EPI value (your own tracking parameter in the tracking link). Example: newsletter-jan.
    epi2string
    EPI2 value (second tracking parameter). Example: banner-top.
    epi3string
    EPI3 value (third tracking parameter). Example: campaign-a.
    epi4string
    EPI4 value (fourth tracking parameter). Example: variant-b.
    epi5string
    EPI5 value (fifth tracking parameter). Example: user-42.
    gbraidstring
    Only clicks with this gbraid value. Example: gbraid123.
    gclidstring
    Only clicks with this Google Click ID. Example: Cj0KCQiA1234.
    marketstring
    Market as an ISO 3166-1 alpha-2 country code, e.g. SE. Example: SE.
    program_idinteger
    Numerical ID of an Adtraction partner program (advertiser), from Get Programs or List Applications. Example: 1229865361.
    wbraidstring
    Only clicks with this wbraid value. Example: wbraid123.
  • adtraction_commission_by_payment_status_getGet the commission you earned in Adtraction over a period, grouped by payment status.Read-only

    Get Commission By Payment Status

    Get the commission you earned in Adtraction over a period, grouped by payment status. Returns totals for not invoiced, invoiced, ready for payment and paid. Requires from_date, to_date and currency.

    Inputs

    currencystringrequired
    Currency as an ISO 4217 code, e.g. SEK or EUR. Example: SEK.
    from_datestringrequired
    Start of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-01T00:00:00+0000. Example: 2026-01-01T00:00:00+0000.
    to_datestringrequired
    End of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-31T23:59:59+0000. Example: 2026-01-31T23:59:59+0000.
    channel_idinteger
    Numerical ID of one of your channels (website, newsletter, social account), from List Channels. Example: 1324738001.
    marketstring
    Market as an ISO 3166-1 alpha-2 country code, e.g. SE. Example: SE.
    program_idinteger
    Numerical ID of an Adtraction partner program (advertiser), from Get Programs or List Applications. Example: 1229865361.
  • adtraction_commission_by_transaction_status_getGet the commission you earned in Adtraction over a period, grouped by transaction status.Read-only

    Get Commission By Transaction Status

    Get the commission you earned in Adtraction over a period, grouped by transaction status. Returns totals for approved, pending and rejected transactions. Requires from_date, to_date and currency.

    Inputs

    currencystringrequired
    Currency as an ISO 4217 code, e.g. SEK or EUR. Example: SEK.
    from_datestringrequired
    Start of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-01T00:00:00+0000. Example: 2026-01-01T00:00:00+0000.
    to_datestringrequired
    End of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-31T23:59:59+0000. Example: 2026-01-31T23:59:59+0000.
    channel_idinteger
    Numerical ID of one of your channels (website, newsletter, social account), from List Channels. Example: 1324738001.
    marketstring
    Market as an ISO 3166-1 alpha-2 country code, e.g. SE. Example: SE.
    program_idinteger
    Numerical ID of an Adtraction partner program (advertiser), from Get Programs or List Applications. Example: 1229865361.
  • adtraction_commission_by_type_getGet the commission you earned in Adtraction over a period, grouped by commission type.Read-only

    Get Commission By Type

    Get the commission you earned in Adtraction over a period, grouped by commission type. Returns commission totals per type. Requires from_date, to_date, currency and transaction_status.

    Inputs

    currencystringrequired
    Currency as an ISO 4217 code, e.g. SEK or EUR. Example: SEK.
    from_datestringrequired
    Start of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-01T00:00:00+0000. Example: 2026-01-01T00:00:00+0000.
    to_datestringrequired
    End of the period, as an ISO 8601 UTC timestamp, e.g. 2026-01-31T23:59:59+0000. Example: 2026-01-31T23:59:59+0000.
    transaction_statusintegerrequired
    Which transactions to include: 1 = approved, 2 = pending, 3 = approved + pending, 4 = open claims, 5 = rejected. Impressions and clicks are not affected. Example: 3.one of 012345
    channel_idinteger
    Numerical ID of one of your channels (website, newsletter, social account), from List Channels. Example: 1324738001.
    marketstring
    Market as an ISO 3166-1 alpha-2 country code, e.g. SE. Example: SE.
    program_idinteger
    Numerical ID of an Adtraction partner program (advertiser), from Get Programs or List Applications. Example: 1229865361.
  • adtraction_currencies_listList the currencies active on the Adtraction platform.Read-only

    List Currencies

    List the currencies active on the Adtraction platform. Returns ISO 4217 currency codes. Use one in statistics, balance and payment tools.

    Inputs

    This tool takes no inputs.