# Tapfiliate — Pipedream Connect

> Affiliate tracking software to grow your business. Easily create, track and optimize your own affiliate marketing and referral programs with Tapfiliate.

- API slug: `tapfiliate` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Commerce
- Website: https://tapfiliate.com/
- This page (HTML): https://pipedream.com/apps/tapfiliate
- Tools: 6 actions · 3 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: tapfiliate`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "tapfiliate",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Add Commission to Conversion:
const result = await mcp.callTool({
  name: "tapfiliate-add-commission-conversion",
  arguments: {
    conversionId: "Conversion ID",
    conversionSubAmount: 10,
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Tapfiliate endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.tapfiliate.com/1.6/affiliates/

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkudGFwZmlsaWF0ZS5jb20vMS42L2FmZmlsaWF0ZXMv?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "tapfiliate-add-commission-conversion",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    tapfiliate: { authProvisionId: "apn_xxxxxxx" },
    conversionId: "Conversion ID",
    conversionSubAmount: 10,
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (6)

### `tapfiliate-add-commission-conversion` — Add Commission to Conversion (Write)

Adds a new commission to an existing conversion. Used for managing recurring subscription workflows. See the documentation

Full schema: https://pipedream.com/apps/tapfiliate/actions/add-commission-conversion.md

### `tapfiliate-create-customer` — Create Customer (Write)

Creates a new customer in Tapfiliate. See the documentation

Full schema: https://pipedream.com/apps/tapfiliate/actions/create-customer.md

### `tapfiliate-list-affiliate-id-options` — List Affiliate ID Options (Read-only)

Retrieves available options for the Affiliate ID field.

Full schema: https://pipedream.com/apps/tapfiliate/actions/list-affiliate-id-options.md

### `tapfiliate-list-conversion-id-options` — List Conversion ID Options (Read-only)

Retrieves available options for the Conversion ID field.

Full schema: https://pipedream.com/apps/tapfiliate/actions/list-conversion-id-options.md

### `tapfiliate-list-program-id-options` — List Program ID Options (Read-only)

Retrieves available options for the Program ID field.

Full schema: https://pipedream.com/apps/tapfiliate/actions/list-program-id-options.md

### `tapfiliate-set-parent-affiliate` — Set Parent Affiliate (Write)

Sets an affiliate as the parent for another. Useful for managing the Multi Level Marketing (MLM) structure. See the documentation

Full schema: https://pipedream.com/apps/tapfiliate/actions/set-parent-affiliate.md

## Triggers (3)

### `tapfiliate-new-affiliate` — New Affiliate (Polling)

Emit new event when a new affiliate is created. The affiliate is signed up or added by you. See the documentation

Full schema: https://pipedream.com/apps/tapfiliate/triggers/new-affiliate.md

### `tapfiliate-new-affiliate-added-to-program` — New Affiliate Added to Program (Polling)

Emit new event when an affiliate is added to a program. See the documentation

Full schema: https://pipedream.com/apps/tapfiliate/triggers/new-affiliate-added-to-program.md

### `tapfiliate-new-conversion` — New Conversion (Polling)

Emit new event when a new conversion is created. Conversion details are supplied by the application. See the documentation

Full schema: https://pipedream.com/apps/tapfiliate/triggers/new-conversion.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
