Public API & MCP server
Query ROAS, cohorts and revenue from a script, or connect Claude to your attribution data. One scoped API key for the REST API and the MCP server.
Traqio’s public API is a versioned REST API (/v1) over the same reports as the console: ROAS by campaign, daily ROAS, install cohorts, revenue, rejected data and tracking links. Traqio’s MCP server exposes the same operations as tools to Claude, Cursor or any MCP client. Both are authenticated by one scoped API key.
Authentication
Create a key in the console under Organisation → API keys, tick its scopes, and send it as a bearer token. Keys start with tq_live_ and are shown once; we store only a hash. A login session token is refused here, and an API key is refused by the console.
curl -H "Authorization: Bearer $TRAQIO_API_KEY" \
"https://api.traqio.app/v1/reports/roas?appId=<appId>&from=2026-09-01&to=2026-10-01"The full machine-readable reference, unauthenticated: https://api.traqio.app/v1/openapi.json
Permissions (scopes)
| Scope | What it allows |
|---|---|
| reports:read | GET /v1/apps and every GET /v1/reports route, and the matching MCP tools. |
| reports:write | POST /v1/reports/sync-spend — trigger a spend pull or a backfill. |
| links:read | List an app’s tracking links. |
| links:write | Create tracking links. |
No scope implies another, and a key can never do more than the role of the member who created it. Managing keys, credentials or billing always needs a signed-in person — no scope grants it.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /v1/apps | reports:read | Your apps: id, name, store ids. Never the SDK keys. (list_apps) |
| GET | /v1/reports/roas | reports:read | ROAS by campaign, ad set or ad (level=). Spend, attributed revenue, installs. (get_roas) |
| GET | /v1/reports/roas-daily | reports:read | Spend, revenue and ROAS per day. (get_roas_daily) |
| GET | /v1/reports/cohorts | reports:read | Install-day cohorts: installs, D0 revenue, total revenue. (get_cohorts) |
| GET | /v1/reports/revenue | reports:read | All revenue per currency, split into attributed, organic and unmatched. (get_revenue) |
| GET | /v1/reports/rejections | reports:read | What Traqio refused (rate ceiling, fraud rules), by reason and route. (get_rejections) |
| GET | /v1/reports/connectors | reports:read | Ad-network connectors with their last sync and last error. (get_connector_health) |
| POST | /v1/reports/sync-spend | reports:write | Pull spend for a day (date=) or a range (from=, to=) now. Safe to call twice. (sync_spend) |
| GET | /v1/links | links:read | An app’s tracking links (appId=). (list_links) |
| POST | /v1/links | links:write | Create a tracking link. Returns its short URL. (create_tracking_link) |
Conventions
- Dates are YYYY-MM-DD in UTC. from is inclusive and to is exclusive: from=2026-09-01&to=2026-10-01 is September.
- Report routes take appId, from and to; store=ios|android is optional. GET /v1/links takes appId.
- Revenue is never summed across currencies — each currency is its own row.
- Errors are JSON with a message: 400 bad input, 401 missing, malformed, revoked or expired key (or a login token), 403 missing scope or another organisation’s app.
MCP server
The MCP server runs the same /v1 endpoints as tools, under the same key and the same scopes, and offers a key only the tools it may call. traqio_status tells the model which organisation and scopes it holds.
Claude Code
claude mcp add --transport http traqio https://api.traqio.app/mcp \
--header "Authorization: Bearer $TRAQIO_API_KEY"Cursor (.cursor/mcp.json)
{
"mcpServers": {
"traqio": {
"url": "https://api.traqio.app/mcp",
"headers": {
"Authorization": "Bearer tq_live_…"
}
}
}
}Claude Desktop (claude_desktop_config.json), through the mcp-remote bridge
{
"mcpServers": {
"traqio": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.traqio.app/mcp",
"--header",
"Authorization:${TRAQIO_AUTH}"
],
"env": {
"TRAQIO_AUTH": "Bearer tq_live_…"
}
}
}
}Questions
- Is the API included in every plan?
- Yes. The API and the MCP server are not gated by plan: every account can create keys.
- Can a key create other keys or change billing?
- No. A key reads reports and, with the matching write scopes, triggers a spend pull or mints tracking links. Everything administrative needs a signed-in person.
- What happens when someone leaves the team?
- A key belongs to the organisation, not to the person who created it, so an integration does not break when they leave. Revoke the keys you no longer want from the console: each shows when it was last used, and a revoked key is refused at its next call.
- Which MCP clients work?
- Any client that speaks the Streamable HTTP transport with a custom header — Claude Code and Cursor natively, Claude Desktop through mcp-remote.