Official SDKs
- TypeScript —
npm i traaaction. IncludesgetClickId(request)helpers for Next.js / Express. - Python —
pip install traaaction. Includes middleware for Flask, FastAPI, and Django.
Both SDKs extract the click ID from cookies or query parameters (priority: trac_click_id cookie → clk_id cookie → URL param).
REST API
Base URL: https://traaaction.com/api/v1. Authenticate with a key from Dashboard → Developer.
Authorization: Bearer trac_live_xxx— secret key, full workspace access.Authorization: Bearer pk_xxx— public key, tracking endpoints only.
Standard response shape:
{ "data": [...], "meta": { "total": 150, "page": 1, "limit": 50 } }
Errors:
{ "error": { "code": "...", "message": "...", "doc_url": "..." } }
MCP server
Traaaction exposes a Model Context Protocol server at /api/mcp. Connect any MCP-compatible AI client (Claude Desktop, Cursor, Cline, Continue, Zed, and others) to query your workspace in natural language — list missions, inspect commissions, pull analytics.