> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Tapfiliate

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

**Authentication:** API Key
**Categories:** Marketing
**Tools:** 60: 28 read, 21 write, 11 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=TAPFILIATE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Tapfiliate connection

   In **AgentKit > Connections**, create a Tapfiliate connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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 = 'tapfiliate'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Tapfiliate:', 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: 'tapfiliate_affiliate_groups_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "tapfiliate"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Tapfiliate:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="tapfiliate_affiliate_groups_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Tapfiliate credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'tapfiliate_affiliate_balances_get',
  toolInput: {
    affiliate_id: '<affiliate_id>',
  },
  connector: 'tapfiliate',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="tapfiliate_affiliate_balances_get",
    tool_input={
        "affiliate_id": "<affiliate_id>",
    },
    connection_name="tapfiliate",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `tapfiliate_affiliate_balances_get`

Get Affiliate Balances · Read-only

Get what you owe one affiliate per currency: approved commissions minus payments made. Returns balances by currency. Use tapfiliate_balances_list for all affiliates.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_get`

Get Affiliate · Read-only

Get one affiliate by ID with their contact details, company, address and meta data. Returns the affiliate object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_groups_list`

List Affiliate Groups · Read-only

List affiliate groups, newest first, 25 per page. Returns group IDs, titles and affiliate counts.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.

Example input: `{}`

### `tapfiliate_affiliate_meta_data_get`

Get Affiliate Meta Data · Read-only

Get all meta data stored on an affiliate as one key/value object. Returns the object ({} when empty).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_notes_list`

List Affiliate Notes · Read-only

List the internal notes your team wrote on an affiliate, newest first. Returns notes with message, author and date.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_payments_list`

List Affiliate Payments · Read-only

List the payments made to one affiliate, newest first, 25 per page, excluding canceled ones. Returns payments with amount, currency and date.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_programs_list`

List Affiliate Programs · Read-only

List the programs an affiliate belongs to with their approval status, coupon and referral link, 25 per page. Returns program memberships.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_prospect_get`

Get Affiliate Prospect · Read-only

Get one affiliate prospect by ID with their referral link. Returns the prospect object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_prospect_id` (`string`, required): The id of the affiliate prospect. Example: jimprosper.

Example input: `{"affiliate_prospect_id":"<affiliate_prospect_id>"}`

### `tapfiliate_affiliate_prospects_list`

List Affiliate Prospects · Read-only

List affiliate prospects (people you invited who have not signed up), newest first, 25 per page, optionally by email, referral code, program or group. Returns prospects with their referral link.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `email` (`string`, optional): Filter by prospect email address. Example: jane.jameson@example.com.
- `group_id` (`string`, optional): Affiliate group ID, from tapfiliate_affiliate_groups_list. Example: ag_eXampl3.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `program_id` (`string`, optional): Program ID, from tapfiliate_programs_list. Example: my-program-3.
- `referral_code` (`string`, optional): An affiliate prospect's referral code. This corresponds to the value of ref= in their referral link. Example: janejameson.

Example input: `{}`

### `tapfiliate_affiliates_list`

List Affiliates · Read-only

List affiliates, newest first, 25 per page, optionally filtered by email, referral code, click, source, parent or affiliate group. Returns affiliates with their name, email and company. Use tapfiliate_affiliate_get for one affiliate.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_group_id` (`string`, optional): Affiliate group ID, from tapfiliate_affiliate_groups_list. Example: ag_eXampl3.
- `click_id` (`string`, optional): A click id. Example: Y2xpY2tfaWQ.
- `email` (`string`, optional): Filter by affiliate email address. Example: jane.jameson@example.com.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `parent_id` (`string`, optional): Return the children of this parent affiliate ID. Example: johnsmith.
- `referral_code` (`string`, optional): An affiliate's referral code. This corresponds to the value of ref= in their referral link. Example: janejameson.
- `source_id` (`string`, optional): A source id. Example: 1-aaaaaa.

Example input: `{}`

### `tapfiliate_balances_list`

List Balances · Read-only

List what you owe each affiliate with a non-zero balance, per currency, optionally excluding affiliates marked as fraud. Returns balances by affiliate. Use it before recording payouts with tapfiliate_payment_create.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `include_fraud` (`boolean`, optional): false leaves out affiliates you marked as fraud. Default: true. Example: false.

Example input: `{}`

### `tapfiliate_click_get`

Get Click · Read-only

Get one click by ID with device details, country, meta data, affiliate and program. Returns the click object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `click_id` (`string`, required): Click ID, from tapfiliate_clicks_list or tapfiliate_click_create. Example: Y2xpY2tfaWQ.

Example input: `{"click_id":"<click_id>"}`

### `tapfiliate_clicks_list`

List Clicks · Read-only

List clicks on your programs, newest first, 25 per page, optionally filtered by program, affiliate or date. Returns clicks with device, country and meta data. Use tapfiliate_click_get for one click.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, optional): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `date_from` (`string`, optional): Start date (YYYY-MM-DD, UTC). Example: 2026-01-01.
- `date_to` (`string`, optional): End date (YYYY-MM-DD, UTC); a plain date means 00:00 that day, so pass the next day to include it. Example: 2026-01-31.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `program_id` (`string`, optional): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{}`

### `tapfiliate_commission_get`

Get Commission · Read-only

Get one commission by ID with its conversion, affiliate and status. Returns the commission object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `commission_id` (`number`, required): Numeric commission ID, from tapfiliate_commissions_list. Example: 93847.

Example input: `{"commission_id":93847}`

### `tapfiliate_commissions_list`

List Commissions · Read-only

List commissions (regular, recurring, MLM level and bonus), 25 per page, optionally filtered by affiliate, approval status or paid state. Returns commissions with amount, status and conversion. Use tapfiliate_commission_get for one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, optional): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `paid` (`boolean`, optional): 1 returns only commissions in a payout marked as paid, 0 returns all other commissions. Valid values are: 1 | 0. Example: false.
- `status` (`string`, optional): Commission approval status to filter by: approved, disapproved or pending. Example: approved.

Example input: `{}`

### `tapfiliate_conversion_get`

Get Conversion · Read-only

Get one conversion by ID with all its commissions, customer, click and meta data. Returns the conversion object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.

Example input: `{"conversion_id":4815162342}`

### `tapfiliate_conversion_meta_data_get`

Get Conversion Meta Data · Read-only

Get all meta data stored on a conversion as one key/value object. Returns the object ({} when empty).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.

Example input: `{"conversion_id":4815162342}`

### `tapfiliate_conversions_list`

List Conversions · Read-only

List conversions (tracked sales) with their commissions, newest first, 25 per page, optionally filtered by program, external ID, affiliate, pending commissions or date. Returns conversions with amount, affiliate and commissions. Use tapfiliate_conversion_get for one conversion.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, optional): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `date_from` (`string`, optional): Start date (YYYY-MM-DD, UTC). Example: 2026-01-01.
- `date_to` (`string`, optional): End date (YYYY-MM-DD, UTC); a plain date means 00:00 that day, so pass the next day to include it. Example: 2026-01-31.
- `external_id` (`string`, optional): The external Id. This is the unique id from your system or shopping cart. This id was passed when the conversions was first tracked. Example: ORD-2026-0042.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `pending` (`boolean`, optional): Only show conversions that have pending commissions. Example: true.
- `program_id` (`string`, optional): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{}`

### `tapfiliate_customer_get`

Get Customer · Read-only

Get one customer by its Tapfiliate ID with the click it came from and fraud warnings. Returns the customer object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.

Example input: `{"tapfiliate_customer_id":"<tapfiliate_customer_id>"}`

### `tapfiliate_customer_meta_data_get`

Get Customer Meta Data · Read-only

Get all meta data stored on a customer as one key/value object. Returns the object ({} when empty).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.

Example input: `{"tapfiliate_customer_id":"<tapfiliate_customer_id>"}`

### `tapfiliate_customers_list`

List Customers · Read-only

List customers (referred sign-ups or leads), newest first, 25 per page, optionally filtered by program, your customer ID, affiliate or creation date. Returns customers with their status, affiliate and program. Use tapfiliate_customer_get for one customer.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, optional): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `customer_id` (`string`, optional): The id for this customer in your system. The customer id should be unique for each customer. Example: USER-48213.
- `date_from` (`string`, optional): Start date (YYYY-MM-DD, UTC). Example: 2026-01-01.
- `date_to` (`string`, optional): End date (YYYY-MM-DD, UTC); a plain date means 00:00 that day, so pass the next day to include it. Example: 2026-01-31.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `program_id` (`string`, optional): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{}`

### `tapfiliate_payment_get`

Get Payment · Read-only

Get one payment by ID. Returns the payment with affiliate, amount, currency and date.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `payment_id` (`string`, required): Payment ID (pa_...), from tapfiliate_payments_list. Example: pa_eXampl3.

Example input: `{"payment_id":"<payment_id>"}`

### `tapfiliate_payments_list`

List Payments · Read-only

List payments to affiliates that are not canceled, newest first, 25 per page. Returns payments with affiliate, amount and currency.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.

Example input: `{}`

### `tapfiliate_program_affiliate_get`

Get Program Affiliate · Read-only

Get one affiliate's membership in a program: approval status, coupon and referral link. Returns the membership.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"affiliate_id":"<affiliate_id>","program_id":"<program_id>"}`

### `tapfiliate_program_affiliates_list`

List Program Affiliates · Read-only

List a program's affiliates in every approval status, most recently joined first, 25 per page, optionally by email, source, parent or group. Returns affiliates with approval status, coupon and referral link.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.
- `email` (`string`, optional): Filter by affiliate email address. Example: jane.jameson@example.com.
- `group_id` (`string`, optional): Affiliate group ID, from tapfiliate_affiliate_groups_list. Example: ag_eXampl3.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.
- `parent_id` (`string`, optional): Retrieves children for a certain parent affiliate. Example: johnsmith.
- `source_id` (`string`, optional): A source id. Example: 1-aaaaaa.

Example input: `{"program_id":"<program_id>"}`

### `tapfiliate_program_commission_types_list`

List Program Commission Types · Read-only

List a program's commission types, including hidden ones. Returns identifiers, names and rates. Pass an identifier as commission_type when creating conversions or commissions.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"program_id":"<program_id>"}`

### `tapfiliate_program_get`

Get Program · Read-only

Get one affiliate program by ID with its currency, cookie time, landing page and status. Returns the program object.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"program_id":"<program_id>"}`

### `tapfiliate_programs_list`

List Programs · Read-only

List affiliate programs, newest first, 25 per page, including archived ones, optionally the one for an asset ID. Returns program IDs, titles, currencies and statuses.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `asset_id` (`string`, optional): An asset id. Example: 1-aaaaaa.
- `page` (`integer`, optional): Page number of results, 25 per page, starting at 1. Example: 1.

Example input: `{}`

### `tapfiliate_affiliate_create`

Create Affiliate · Write

Create an affiliate account with name, email and optional password, company, address and signup custom fields. Returns the affiliate with its generated ID (and a temporary password when none was given). Add them to a program with tapfiliate_program_affiliate_add.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `email` (`string`, required): Email address. Example: jane.jameson@example.com.
- `firstname` (`string`, required): First name. Example: Jane.
- `lastname` (`string`, required): Last name. Example: Jameson.
- `address` (`object`, optional): Postal address: address, address_two, postal_code, city, state and country.code; saved only when address, postal_code, city and country.code are all present. Example: {"address": "Rapenburgerstraat 173", "postal_code": "1011 VM", "city": "Amsterdam", "country": {"code": "NL"}}
- `company` (`object`, optional): Company details: name and description. Example: {"name": "Referra Inc.", "description": "Comparison site for SaaS tools"}
- `custom_fields` (`object`, optional): Values for your affiliate signup form's custom fields, keyed by field ID from tapfiliate_affiliate_custom_fields_list. Example: {"field1": "value1"}
- `password` (`string`, optional): Password. Example: Str0ng-Passw0rd!.

Example input: `{"email":"<email>","firstname":"<firstname>","lastname":"<lastname>"}`

### `tapfiliate_affiliate_group_create`

Create Affiliate Group · Write

Create an affiliate group with a unique title. Returns the new group. Needs a plan that includes affiliate groups. Assign affiliates with tapfiliate_affiliate_group_set.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `title` (`string`, required): Group name, 2 to 63 characters, unique in the account. Example: Top partners.

Example input: `{"title":"<title>"}`

### `tapfiliate_affiliate_group_set`

Set Affiliate Group · Write

Put an affiliate in an affiliate group, replacing their current group. Returns the result. Get group IDs from tapfiliate_affiliate_groups_list.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `group_id` (`string`, required): Affiliate group ID, from tapfiliate_affiliate_groups_list. Example: ag_eXampl3.

Example input: `{"affiliate_id":"<affiliate_id>","group_id":"<group_id>"}`

### `tapfiliate_affiliate_group_update`

Update Affiliate Group · Write

Rename an affiliate group. Returns the updated group.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_group_id` (`string`, required): Affiliate group ID, from tapfiliate_affiliate_groups_list. Example: ag_eXampl3.
- `title` (`string`, required): Group name, 2 to 63 characters, unique in the account. Example: Top partners.

Example input: `{"affiliate_group_id":"<affiliate_group_id>","title":"<title>"}`

### `tapfiliate_affiliate_meta_data_key_set`

Set Affiliate Meta Data Key · Write

Create or overwrite one meta data key on an affiliate; other keys stay as they are. Returns the stored value.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `key` (`string`, required): Meta data key (case-sensitive). Example: subid1.
- `value` (`string`, required): Value to store under the key. Example: spring-campaign.

Example input: `{"affiliate_id":"<affiliate_id>","key":"<key>","value":"<value>"}`

### `tapfiliate_affiliate_note_create`

Create Affiliate Note · Write

Add an internal note to an affiliate, authored by the API key's team member. Returns the new note. Affiliates do not see notes.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `message` (`string`, required): Text of the note. Example: Asked for a custom landing page.

Example input: `{"affiliate_id":"<affiliate_id>","message":"<message>"}`

### `tapfiliate_affiliate_prospect_create`

Create Affiliate Prospect · Write

Create an affiliate prospect with their own referral code, approved in a program (the default program when none is given) and optionally placed in a group. Returns the prospect with its referral link. Tapfiliate may email them a welcome message.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `email` (`string`, required): Email address. Example: jane.jameson@example.com.
- `firstname` (`string`, required): First name. Example: Jane.
- `lastname` (`string`, required): Last name. Example: Jameson.
- `address` (`object`, optional): Postal address: address, address_two, postal_code, city, state and country.code; saved only when address, postal_code, city and country.code are all present. Example: {"address": "Rapenburgerstraat 173", "postal_code": "1011 VM", "city": "Amsterdam", "country": {"code": "NL"}}
- `affiliate_group_id` (`string`, optional): Affiliate group ID, from tapfiliate_affiliate_groups_list. Example: ag_eXampl3.
- `company` (`object`, optional): Company details: name and description. Example: {"name": "Referra Inc.", "description": "Comparison site for SaaS tools"}
- `program_id` (`string`, optional): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"email":"<email>","firstname":"<firstname>","lastname":"<lastname>"}`

### `tapfiliate_click_create`

Create Click · Write

Record a click for an affiliate, identified by referral code or by asset ID plus source ID. Returns the click ID to pass as click_id to tapfiliate_conversion_create or tapfiliate_customer_create.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `asset_id` (`string`, optional): Asset ID. Example: 1-aaaaaa.
- `ip` (`string`, optional): IP. Example: 203.0.113.42.
- `landing_page` (`string`, optional): URL of the page the visitor landed on. Example: https://www.example.com/pricing.
- `meta_data` (`object`, optional): Up to 10 key/value pairs to store on the click. Example: {"plan": "pro", "source": "newsletter"}
- `referral_code` (`string`, optional): Referral Code. Example: janejameson.
- `referrer` (`string`, optional): URL of the page the visitor came from. Example: https://partner-site.example/review.
- `source_id` (`string`, optional): Source ID. Example: 1-aaaaaa.
- `user_agent` (`string`, optional): User Agent. Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36.

Example input: `{}`

### `tapfiliate_commission_approve`

Approve Commission · Write

Approve a commission, also one that was disapproved. Returns the updated commission.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `commission_id` (`number`, required): Numeric commission ID, from tapfiliate_commissions_list. Example: 93847.

Example input: `{"commission_id":93847}`

### `tapfiliate_commission_update`

Update Commission · Write

Change a commission's amount, comment, approval or the conversion sub-amount it is based on. Returns the updated commission. Use tapfiliate_commission_approve or tapfiliate_commission_disapprove for approval only.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `commission_id` (`number`, required): Numeric commission ID, from tapfiliate_commissions_list. Example: 93847.
- `amount` (`number`, optional): New commission amount. Example: 99.5.
- `approved` (`boolean`, optional): Set to true to approve or false to disapprove. Example: true.
- `comment` (`string`, optional): A comment for this commission. The comment will be visible to the affiliate. Example: Bonus for the spring campaign.
- `conversion_sub_amount` (`number`, optional): New conversion amount the commission is based on. Example: 49.95.

Example input: `{"commission_id":93847}`

### `tapfiliate_conversion_commission_add`

Add Commission to Conversion · Write

Add a commission to an existing conversion, calculated from a sub-amount and an optional commission type. Returns the created commissions.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.
- `conversion_sub_amount` (`number`, required): Amount the commission is calculated on. Example: 49.95.
- `comment` (`string`, optional): A comment for this commission. The comment will be visible to the affiliate. Example: Bonus for the spring campaign.
- `commission_type` (`string`, optional): Commission type identifier, from tapfiliate_program_commission_types_list; the program default is used when empty. Example: standard.

Example input: `{"conversion_id":4815162342,"conversion_sub_amount":49.95}`

### `tapfiliate_conversion_create`

Create Conversion · Write

Record a conversion (a sale) attributed to an affiliate by referral code, tracking ID, click ID, coupon or customer ID, and create its commissions from the amount or per-item commissions. Returns the conversion with its commissions. Use tapfiliate_customer_create for a sign-up without a sale.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `amount` (`number`, optional): Amount. Example: 99.5.
- `asset_id` (`string`, optional): The asset id. Example: 1-aaaaaa.
- `click_id` (`string`, optional): The id of an affiliate's click. Attributes the conversion to that click's affiliate. Example: Y2xpY2tfaWQ.
- `commission_type` (`string`, optional): Commission type identifier, from tapfiliate_program_commission_types_list; the program default is used when empty. Example: standard.
- `commissions` (`array`, optional): Per-item commissions, each with sub_amount and optional commission_type and comment; overrides amount and commission_type. Example: [{"sub_amount": 60, "commission_type": "standard"}, {"sub_amount": 39.5, "commission_type": "premium"}]
- `coupon` (`string`, optional): A coupon code to track the conversion by. Example: JANE20OFF.
- `currency` (`string`, optional): Three-letter ISO currency code. Example: USD.
- `customer_id` (`string`, optional): The id for the current customer in your system. Depending on your program settings, this can be used for recurring / lifetime commissions. You can read more about this here (https://support.tapfiliate.com/en/articles/12682358-how-to-integrate-with-tapfiliate-via-the-rest-api). Example: USER-48213.
- `external_id` (`string`, optional): A unique id for this conversion. It can be anything that is meaningful to you, like an order number, user id, email adres etc.. After a conversion has taken place, you can find this id alongside the conversion on our platform. This makes it very easy to cross-reference data on our platform with your own administration. This id has to be unique for every conversion. Example: ORD-2026-0042.
- `ip` (`string`, optional): The client's ip. Used for fraud detection. Example: 203.0.113.42.
- `override_max_cookie_time` (`boolean`, optional): Set to true to attribute even when the affiliate's cookie time has passed. Example: false.
- `program_group` (`string`, optional): The program group id. Example: pg_123.
- `referral_code` (`string`, optional): An affiliate's referral code. This corresponds to the value of ref= in their referral link. Example: janejameson.
- `source_id` (`string`, optional): The source id. Example: 1-aaaaaa.
- `tracking_id` (`string`, optional): The tracking id, to be retrieved from our javascript library. Please refer to our REST API integration guide (https://support.tapfiliate.com/en/articles/12682358-how-to-integrate-with-tapfiliate-via-the-rest-api) for more info. Example: dGFwZmlsaWF0ZQ.
- `user_agent` (`string`, optional): The client's user agent string. Used for statistics and fraud detection. Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36.

Example input: `{}`

### `tapfiliate_conversion_meta_data_key_set`

Set Conversion Meta Data Key · Write

Create or overwrite one meta data key on a conversion; other keys stay as they are. Returns the stored value.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.
- `key` (`string`, required): Meta data key (case-sensitive). Example: subid1.
- `value` (`string`, required): Value to store under the key. Example: spring-campaign.

Example input: `{"conversion_id":4815162342,"key":"<key>","value":"<value>"}`

### `tapfiliate_conversion_update`

Update Conversion · Write

Change a conversion's amount, external ID or meta data, optionally recalculating its commissions. Returns the updated conversion.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.
- `amount` (`number`, optional): New conversion amount; commissions change only with recalculate_commissions. Example: 99.5.
- `external_id` (`string`, optional): A unique id for this conversion. It can be anything that is meaningful to you, like an order number, user id, email adres etc.. After a conversion has taken place, you can find this id alongside the conversion on our platform. Example: ORD-2026-0042.
- `meta_data` (`object`, optional): Meta data key/value pairs; replaces the whole set, at most 40 keys. Example: {"plan": "pro", "source": "newsletter"}
- `recalculate_commissions` (`boolean`, optional): Also re-calculate commissions when the request has a numeric amount, even one equal to the current amount. Example: true.

Example input: `{"conversion_id":4815162342}`

### `tapfiliate_customer_create`

Create Customer · Write

Create a customer (a referred sign-up or lead) attributed to an affiliate by referral code, tracking ID, click ID or coupon, without creating a commission. Returns the new customer. Use tapfiliate_conversion_create to record a sale and pay commission.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `customer_id` (`string`, required): The id for this customer in your system. The customer id should be unique for each customer. Example: USER-48213.
- `asset_id` (`string`, optional): The asset id. Example: 1-aaaaaa.
- `click_id` (`string`, optional): The id of an affiliate's click. Attributes the customer to that click's affiliate. Example: Y2xpY2tfaWQ.
- `coupon` (`string`, optional): A coupon code to track the conversion by. Example: JANE20OFF.
- `ip` (`string`, optional): The client's ip. Used for fraud detection. Example: 203.0.113.42.
- `override_max_cookie_time` (`boolean`, optional): Set to true to attribute even when the affiliate's cookie time has passed. Example: false.
- `referral_code` (`string`, optional): An affiliate's referral code. This corresponds to the value of ref= in their referral link. Example: janejameson.
- `source_id` (`string`, optional): The source id. Example: 1-aaaaaa.
- `status` (`string`, optional): Commission approval status to filter by: approved, disapproved or pending. Example: approved.
- `tracking_id` (`string`, optional): The tracking id, to be retrieved from our javascript library. Please refer to our REST API integration guide (https://support.tapfiliate.com/en/articles/12682358-how-to-integrate-with-tapfiliate-via-the-rest-api) for more info. Example: dGFwZmlsaWF0ZQ.
- `user_agent` (`string`, optional): The client's user agent string. Used for statistics and fraud detection. Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36.

Example input: `{"customer_id":"<customer_id>"}`

### `tapfiliate_customer_meta_data_key_set`

Set Customer Meta Data Key · Write

Create or overwrite one meta data key on a customer; other keys stay as they are. Returns the stored value. Use tapfiliate_customer_update to replace the whole set.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): Meta data key (case-sensitive). Example: subid1.
- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.
- `value` (`string`, required): Value to store under the key. Example: spring-campaign.

Example input: `{"key":"<key>","tapfiliate_customer_id":"<tapfiliate_customer_id>","value":"<value>"}`

### `tapfiliate_customer_update`

Update Customer · Write

Change a customer's ID from your system and/or replace its meta data. Returns the updated customer. Use tapfiliate_customer_cancel to change its status.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.
- `customer_id` (`string`, optional): New customer ID from your system, unique in the account. Example: USER-48213.
- `meta_data` (`object`, optional): Meta data key/value pairs; replaces the whole set, at most 20 keys. Example: {"plan": "pro", "source": "newsletter"}

Example input: `{"tapfiliate_customer_id":"<tapfiliate_customer_id>"}`

### `tapfiliate_payment_create`

Create Payment · Write

Record a payment made to an affiliate, which lowers their balance. Returns the payment. Tapfiliate does not move money; pay the affiliate yourself.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `amount` (`number`, required): Payment amount, greater than 0. Example: 99.5.
- `currency` (`string`, required): Three-letter ISO currency code. Example: USD.

Example input: `{"affiliate_id":"<affiliate_id>","amount":99.5,"currency":"<currency>"}`

### `tapfiliate_program_affiliate_add`

Add Affiliate to Program · Write

Add an existing affiliate to a program, approved unless approved is false, with an optional coupon. Returns the program membership with the referral link.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `affiliate_id` (`string`, required): ID of the affiliate to add, from tapfiliate_affiliates_list. Example: janejameson.
- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.
- `approved` (`boolean`, optional): Set to true to approve or false to disapprove. Example: true.
- `coupon` (`string`, optional): An optional coupon for this affiliate. Example: JANE20OFF.

Example input: `{"affiliate_id":"<affiliate_id>","program_id":"<program_id>"}`

### `tapfiliate_program_affiliate_approve`

Approve Program Affiliate · Write

Approve an affiliate in a program. Returns the membership. Tapfiliate may email the affiliate.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"affiliate_id":"<affiliate_id>","program_id":"<program_id>"}`

### `tapfiliate_program_affiliate_update`

Update Program Affiliate · Write

Set an affiliate's coupon code in a program; the coupon must be unique across your programs. Returns the updated membership.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `coupon` (`string`, required): Coupon code for the affiliate in this program, unique across your programs. Example: JANE20OFF.
- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"affiliate_id":"<affiliate_id>","coupon":"<coupon>","program_id":"<program_id>"}`

### `tapfiliate_affiliate_delete`

Delete Affiliate · Destructive

Delete an affiliate: their personal data is cleared and the account is locked. Returns nothing (204). This cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.

Example input: `{"affiliate_id":"<affiliate_id>"}`

### `tapfiliate_affiliate_meta_data_key_delete`

Delete Affiliate Meta Data Key · Destructive

Delete one meta data key from an affiliate. Returns nothing (204), also when the key did not exist.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `key` (`string`, required): Meta data key (case-sensitive). Example: subid1.

Example input: `{"affiliate_id":"<affiliate_id>","key":"<key>"}`

### `tapfiliate_affiliate_prospect_delete`

Delete Affiliate Prospect · Destructive

Delete an affiliate prospect: their data is cleared and they are disapproved in all programs. Returns nothing (204).

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_prospect_id` (`string`, required): The id of the affiliate prospect. Example: jimprosper.

Example input: `{"affiliate_prospect_id":"<affiliate_prospect_id>"}`

### `tapfiliate_commission_disapprove`

Disapprove Commission · Destructive

Disapprove a pending or approved commission. Returns the updated commission. Use tapfiliate_commission_approve to reverse it.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `commission_id` (`number`, required): Numeric commission ID, from tapfiliate_commissions_list. Example: 93847.

Example input: `{"commission_id":93847}`

### `tapfiliate_conversion_delete`

Delete Conversion · Destructive

Permanently delete a conversion with all its commissions and meta data. Returns nothing (204).

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.

Example input: `{"conversion_id":4815162342}`

### `tapfiliate_conversion_meta_data_key_delete`

Delete Conversion Meta Data Key · Destructive

Delete one meta data key from a conversion. Returns nothing (204), also when the key did not exist.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `conversion_id` (`number`, required): Numeric conversion ID, from tapfiliate_conversions_list. Example: 4815162342.
- `key` (`string`, required): Meta data key (case-sensitive). Example: subid1.

Example input: `{"conversion_id":4815162342,"key":"<key>"}`

### `tapfiliate_customer_cancel`

Cancel Customer · Destructive

Cancel a customer: its status becomes canceled, lost or stopped and automatic recurring commissions stop. Returns the updated customer.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.

Example input: `{"tapfiliate_customer_id":"<tapfiliate_customer_id>"}`

### `tapfiliate_customer_delete`

Delete Customer · Destructive

Permanently delete a customer and its meta data. Its conversions and commissions are kept but unlinked. Returns nothing (204).

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.

Example input: `{"tapfiliate_customer_id":"<tapfiliate_customer_id>"}`

### `tapfiliate_customer_meta_data_key_delete`

Delete Customer Meta Data Key · Destructive

Delete one meta data key from a customer. Returns nothing (204), also when the key did not exist.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): Meta data key (case-sensitive). Example: subid1.
- `tapfiliate_customer_id` (`string`, required): Tapfiliate customer ID (cu_...), from tapfiliate_customers_list. Example: cu_eXampl3.

Example input: `{"key":"<key>","tapfiliate_customer_id":"<tapfiliate_customer_id>"}`

### `tapfiliate_payment_cancel`

Cancel Payment · Destructive

Cancel a recorded payment so it no longer counts against the affiliate's balance. Returns nothing (204).

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `payment_id` (`string`, required): Payment ID (pa_...), from tapfiliate_payments_list. Example: pa_eXampl3.

Example input: `{"payment_id":"<payment_id>"}`

### `tapfiliate_program_affiliate_disapprove`

Disapprove Program Affiliate · Destructive

Disapprove an affiliate in a program so they no longer earn commissions there. Returns the membership with approved false.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `affiliate_id` (`string`, required): Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
- `program_id` (`string`, required): Program ID, from tapfiliate_programs_list. Example: my-program-3.

Example input: `{"affiliate_id":"<affiliate_id>","program_id":"<program_id>"}`

## Related

Other Marketing connectors ([all 190](/agentkit/connectors/?category=marketing)):

- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twitter / X](/agentkit/connectors/twitteroauth/): Scalekit connector, OAuth, 92 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
