# Tapfiliate — how to use (mcp.ai)

Connect your Tapfiliate account and use 40 tools for marketing automation straight from your AI agent. Connect with your own API key. Tapfiliate is an affiliate and referral tracking platform that enables businesses to create, track, and scale their affiliate programs efficiently.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_tapfiliate?ms=1787295960000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `tapfiliate_affiliates_retrieve_an_affiliate`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/tapfiliate`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/tapfiliate/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/tapfiliate/affiliates/retrieve/an/affiliate` — Tool to retrieve details of a specific affiliate. Use when you have the affiliate_id and need full affiliate profile.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/cancel/payment` — Tool to cancel a specific payment. Use when you need to cancel a payment by its payment_id.
  - body: { payment_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/commissions/list/all/commissions` — Tool to retrieve all commissions. Use when you need to fetch commission records with optional filters and pagination after confirming valid API credentials.
  - body: { page?: integer, status?: string, per_page?: integer, program_id?: string, affiliate_id?: string, conversion_id?: string, created_at_to?: string, created_at_from?: string }
- `POST https://api.mcp.ai/api/tapfiliate/create/affiliate` — Tool to create a new affiliate account. Use when you need to register a new affiliate with their contact details.
  - body: { email: string, address?: object, company?: object, lastname: string, firstname: string, meta_data?: object }
- `POST https://api.mcp.ai/api/tapfiliate/create/affiliate/group` — Tool to create a new affiliate group. Use when you need to organize affiliates into groups for management purposes.
  - body: { title: string }
- `POST https://api.mcp.ai/api/tapfiliate/create/affiliate/note` — Tool to create a note for an affiliate. Use when you need to add a note or comment to an affiliate's profile.
  - body: { message: string, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/create/affiliate/prospect` — Tool to create an affiliate prospect. Use when you need to register a new potential affiliate before they become a full affiliate.
  - body: { email: string, address?: string, company?: string, lastname: string, firstname: string }
- `POST https://api.mcp.ai/api/tapfiliate/delete/affiliate/meta/data` — Tool to delete metadata by key for an affiliate. Use when you need to remove a specific metadata field from an affiliate's profile.
  - body: { key: string, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/delete/affiliate/prospect` — Tool to delete a specific affiliate prospect. Use when you need to remove an affiliate prospect by their affiliate_prospect_id.
  - body: { affiliate_prospect_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/delete/an/affiliate` — Tool to delete a specific affiliate. Use when you need to remove an affiliate by their affiliate_id after confirming it exists.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/get/affiliate/balances` — Tool to retrieve an affiliate's balances across multiple currencies. Use when you need to check an affiliate's current balance state.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/get/affiliate/meta/data/by/key` — Tool to retrieve specific metadata value by key for an affiliate. Use when you need to fetch a single custom metadata field.
  - body: { key: string, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/get/affiliate/prospect` — Tool to retrieve details of a specific affiliate prospect. Use when you have the affiliate_prospect_id and need prospect information.
  - body: { affiliate_prospect_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/get/program` — Tool to retrieve details of a specific program. Use when you have the program_id and need full program information.
  - body: { program_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/custom/fields` — Tool to get custom fields configured for affiliates. Use to retrieve the list of custom field definitions available for affiliate profiles.
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/groups` — Tool to list all affiliate groups. Use to retrieve all affiliate groups in your Tapfiliate account.
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/meta/data` — Tool to retrieve metadata for a specific affiliate. Use when you need to fetch custom metadata key-value pairs associated with an affiliate.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/notes` — Tool to list notes for a specific affiliate. Use when you need to retrieve all notes associated with an affiliate by their ID.
  - body: { page?: integer, per_page?: integer, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/payments` — Tool to list all payments for a specific affiliate. Use when you need to retrieve payment records for a particular affiliate by their affiliate_id.
  - body: { page?: integer, per_page?: integer, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/programs` — Tool to list all programs (affiliations) associated with a specific affiliate. Use when you need to see which programs an affiliate is enrolled in.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/affiliate/prospects` — Tool to list all affiliate prospects. Use when you need to retrieve prospects with optional filters by email, referral_code, program_id, or group_id.
  - body: { page?: integer, email?: string, group_id?: string, per_page?: integer, program_id?: string, referral_code?: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/all/affiliates` — Tool to list all affiliates. Use after confirming API access to fetch affiliates with optional filters.
  - body: { page?: integer, email?: string, click_id?: string, per_page?: integer, parent_id?: string, source_id?: string, referral_code?: string, affiliate_group_id?: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/balances` — Tool to list all outstanding affiliate balances. Use when you need to retrieve balance records for affiliates, typically before processing payments.
  - body: { page?: integer }
- `POST https://api.mcp.ai/api/tapfiliate/list/conversions` — Tool to list all conversions. Use to fetch conversion records with optional filters for program, affiliate, date range, and pending status.
  - body: { page?: integer, date_to?: string, pending?: boolean, date_from?: string, program_id?: string, external_id?: string, affiliate_id?: string, use_profile_timezone?: boolean }
- `POST https://api.mcp.ai/api/tapfiliate/list/customers` — Tool to list all customers with optional filtering by program, customer ID, affiliate, or date range. Use after verifying API credentials to fetch customer records.
  - body: { page?: integer, date_to?: string, per_page?: integer, date_from?: string, program_id?: string, customer_id?: string, affiliate_id?: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/program/affiliates` — Tool to list all affiliates in a specific program. Use when you need to fetch affiliates enrolled in a particular program with optional filters for source_id, email, parent_id, or affiliate_group_id.
  - body: { page?: integer, email?: string, per_page?: integer, parent_id?: string, source_id?: string, program_id: string, affiliate_group_id?: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/program/bonuses` — Tool to list all bonuses for a specific program. Use when you need to retrieve performance bonuses configured for a program.
  - body: { page?: integer, per_page?: integer, program_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/program/commission/types` — Tool to list commission types for a specific program. Use when you need to retrieve all commission types configured for a program after confirming valid API credentials.
  - body: { program_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/list/program/mlm/levels` — Tool to list MLM levels for a program. Use when you need to retrieve the multi-level marketing commission structure for a specific program. Returns empty array if no MLM levels are configured.
  - body: { program_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/payments/create/a/payment` — Tool to create a payment. Use when you need to credit an affiliate after confirming transaction details.
  - body: { amount: number, currency: string, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/payments/list/all/payments` — Tool to list all payments. Use when you need to retrieve paginated payment records after confirming API credentials.
  - body: { page?: integer, per_page?: integer }
- `POST https://api.mcp.ai/api/tapfiliate/payments/retrieve/a/payment` — Tool to retrieve details of a specific payment. Use when you have the payment_id and need full payment information.
  - body: { payment_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/payout/methods/list/all/payout/methods` — Tool to retrieve a list of all payout methods for an affiliate. Use when fetching available payment options for an affiliate.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/programs/list/all/programs` — Tool to list all programs. Use after confirming API credentials to fetch program list with optional asset filters.
  - body: { asset_id?: string }
- `POST https://api.mcp.ai/api/tapfiliate/remove/affiliate/group` — Tool to remove affiliate group from an affiliate. Use when you need to unassign an affiliate from their current group, setting their affiliate_group_id to null.
  - body: { affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/set/affiliate/group` — Tool to set the affiliate group for a specific affiliate. Use when you need to assign or change an affiliate's group membership.
  - body: { group_id: string, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/set/affiliate/meta/data` — Tool to update (replace) metadata for an affiliate. Use when you need to set custom metadata fields for a specific affiliate by their affiliate_id.
  - body: { meta_data: object, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/set/affiliate/meta/data/by/key` — Tool to set or update a specific metadata field for an affiliate by key. Use when you need to store custom data associated with an affiliate.
  - body: { key: string, value: string, affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/set/affiliate/parent` — Tool to set a parent affiliate relationship for a child affiliate. Use when you need to create a hierarchical affiliate structure by assigning a parent to a child affiliate.
  - body: { affiliate_id: string, child_affiliate_id: string }
- `POST https://api.mcp.ai/api/tapfiliate/update/affiliate/group` — Tool to update an affiliate group's details. Use when you need to change the title or other properties of an existing affiliate group.
  - body: { title: string, affiliate_group_id: string }

## Example prompts
- "What can I do in Tapfiliate?"
- "Show me a summary of my Tapfiliate account"

## More
- Page: https://mcp.ai/tapfiliate
- Agent spec (llms.txt): https://mcp.ai/tapfiliate/llms.txt
- Postman collection: https://mcp.ai/tapfiliate/postman.json
