KosmoKrator

marketing

Tapfiliate CLI for AI Agents

Use the Tapfiliate CLI from KosmoKrator to call Tapfiliate tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

5 functions 4 read 1 write API key auth

Tapfiliate CLI Setup

Tapfiliate can be configured headlessly with `kosmokrator integrations:configure tapfiliate`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure tapfiliate --set api_key="$TAPFILIATE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor tapfiliate --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key TAPFILIATE_API_KEY Secret secret yes API Key
url TAPFILIATE_URL URL url no API Base URL

Call Tapfiliate Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call tapfiliate.tapfiliate_list_affiliates '{
  "limit": 1,
  "page": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:tapfiliate tapfiliate_list_affiliates '{
  "limit": 1,
  "page": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs tapfiliate --json
kosmo integrations:docs tapfiliate.tapfiliate_list_affiliates --json
kosmo integrations:schema tapfiliate.tapfiliate_list_affiliates --json
kosmo integrations:search "Tapfiliate" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Tapfiliate.

tapfiliate.tapfiliate_list_affiliates

Read read

List affiliates in your Tapfiliate account. Returns paginated results with affiliate IDs, emails, names, and status.

Parameters
limit, page

Generic CLI call

kosmo integrations:call tapfiliate.tapfiliate_list_affiliates '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:tapfiliate tapfiliate_list_affiliates '{"limit":1,"page":1}' --json

tapfiliate.tapfiliate_get_affiliate

Read read

Get detailed information about a specific affiliate by their ID. Includes email, name, status, and metadata.

Parameters
id

Generic CLI call

kosmo integrations:call tapfiliate.tapfiliate_get_affiliate '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:tapfiliate tapfiliate_get_affiliate '{"id":"example_id"}' --json

tapfiliate.tapfiliate_list_conversions

Read read

List conversions in your Tapfiliate account. Supports filtering by affiliate, campaign, date range, and status. Results are paginated.

Parameters
affiliate_id, campaign_id, external_id, status, from_date, to_date, limit, page

Generic CLI call

kosmo integrations:call tapfiliate.tapfiliate_list_conversions '{"affiliate_id":"example_affiliate_id","campaign_id":"example_campaign_id","external_id":"example_external_id","status":"example_status","from_date":"example_from_date","to_date":"example_to_date","limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:tapfiliate tapfiliate_list_conversions '{"affiliate_id":"example_affiliate_id","campaign_id":"example_campaign_id","external_id":"example_external_id","status":"example_status","from_date":"example_from_date","to_date":"example_to_date","limit":1,"page":1}' --json

tapfiliate.tapfiliate_create_conversion

Write write

Create a new conversion in Tapfiliate. Associates a revenue amount with an affiliate using a unique external ID (e.g., order ID or transaction reference).

Parameters
affiliate_id, amount, external_id, campaign_id, commission_type, commission_amount, meta_data

Generic CLI call

kosmo integrations:call tapfiliate.tapfiliate_create_conversion '{"affiliate_id":"example_affiliate_id","amount":1,"external_id":"example_external_id","campaign_id":"example_campaign_id","commission_type":"example_commission_type","commission_amount":1,"meta_data":"example_meta_data"}' --json

Provider shortcut

kosmo integrations:tapfiliate tapfiliate_create_conversion '{"affiliate_id":"example_affiliate_id","amount":1,"external_id":"example_external_id","campaign_id":"example_campaign_id","commission_type":"example_commission_type","commission_amount":1,"meta_data":"example_meta_data"}' --json

tapfiliate.tapfiliate_get_current_user

Read read

Get the currently authenticated Tapfiliate user profile. Useful for verifying API credentials and checking account details.

Parameters
none

Generic CLI call

kosmo integrations:call tapfiliate.tapfiliate_get_current_user '{}' --json

Provider shortcut

kosmo integrations:tapfiliate tapfiliate_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

tapfiliate.tapfiliate_list_affiliates

List affiliates in your Tapfiliate account. Returns paginated results with affiliate IDs, emails, names, and status.

Operation
Read read
Schema command
kosmo integrations:schema tapfiliate.tapfiliate_list_affiliates --json
ParameterTypeRequiredDescription
limit integer no Number of affiliates per page (default: 25, max: 100).
page integer no Page number for pagination (default: 1).

tapfiliate.tapfiliate_get_affiliate

Get detailed information about a specific affiliate by their ID. Includes email, name, status, and metadata.

Operation
Read read
Schema command
kosmo integrations:schema tapfiliate.tapfiliate_get_affiliate --json
ParameterTypeRequiredDescription
id string yes The affiliate ID.

tapfiliate.tapfiliate_list_conversions

List conversions in your Tapfiliate account. Supports filtering by affiliate, campaign, date range, and status. Results are paginated.

Operation
Read read
Schema command
kosmo integrations:schema tapfiliate.tapfiliate_list_conversions --json
ParameterTypeRequiredDescription
affiliate_id string no Filter by affiliate ID.
campaign_id string no Filter by campaign ID.
external_id string no Filter by external ID (e.g., order or transaction ID).
status string no Filter by status: "approved", "pending", or "rejected".
from_date string no Start date filter (ISO 8601, e.g., "2025-01-01").
to_date string no End date filter (ISO 8601, e.g., "2025-12-31").
limit integer no Number of results per page (default: 25, max: 100).
page integer no Page number for pagination (default: 1).

tapfiliate.tapfiliate_create_conversion

Create a new conversion in Tapfiliate. Associates a revenue amount with an affiliate using a unique external ID (e.g., order ID or transaction reference).

Operation
Write write
Schema command
kosmo integrations:schema tapfiliate.tapfiliate_create_conversion --json
ParameterTypeRequiredDescription
affiliate_id string yes The ID of the affiliate to credit.
amount number yes The conversion amount (e.g., 29.99).
external_id string yes A unique external reference (e.g., order ID, transaction ID).
campaign_id string no The campaign ID to associate the conversion with.
commission_type string no Commission type: "default" or "fixed".
commission_amount number no Override commission amount (if commission_type is "fixed").
meta_data object no Optional key-value metadata to attach to the conversion.

tapfiliate.tapfiliate_get_current_user

Get the currently authenticated Tapfiliate user profile. Useful for verifying API credentials and checking account details.

Operation
Read read
Schema command
kosmo integrations:schema tapfiliate.tapfiliate_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.