Data API

Pull your account data — revenue attributed to each post, itemized purchases, link clicks, and self-report attribution — over a simple read API, or as MCP tools an agent can call directly. Everything is confidence-scored and directional, never sold as deterministic.

Paste api.txt into Claude / ChatGPT and ask it to pull & analyze your data.

Auth — a read-only token

In Brand → Connect to Claude, hit “Read-only (data)”. You get an atb_… token that can only read — any write is refused with 403— so it is safe to drop in a script or hand to an agent. Send it as a Bearer header; every response is scoped to that token's project.

bash
curl -s https://api.attribura.com/v1/overview \
  -H "Authorization: Bearer atb_your_read_token"

Endpoints

All GET, all JSON. List endpoints take ?since= (RFC-3339) and ?limit= (1–500, default 100), newest first. Money is always in cents.

GET/v1/overview

Headline revenue — 30-day + all-time, by source.

{ revenue_cents_30d, events_30d, revenue_cents_all, events_all, by_source[] }

GET/v1/distributions/performance

The money-per-post table — every post ranked by revenue. The core view.

[{ distribution_id, channel, hook, clicks, installs, conversions, revenue_cents, proceeds_cents, subscriptions }]

GET/v1/revenue/events

Itemized revenue — each purchase joined back to the post that drove it.

[{ id, source, kind, amount_cents, currency, occurred_at, method, distribution_id, channel, hook }]

GET/v1/self-reports/summary

Self-report rollup — verified vs dark-social share, revenue, per-channel.

{ reports_30d, verified_share, dark_social_share, self_report_revenue_cents_30d, by_channel[] }

GET/v1/self-reports

Itemized “how did you hear about us?” answers.

[{ id, channel, raw_answer, method, confidence, distribution_id, external_user_id, occurred_at }]

GET/v1/content

Imported posts + latest engagement stats + ready-to-share links.

{ items: [{ distribution_id, channel, title, hook, views, likes, comments_count, campaign_url, store_url }] }

GET/v1/links

Tracked short links with their total click counts.

[{ slug, short_url, destination_url, distribution_id, clicks, created_at }]

GET/v1/clicks

Individual click events with raw request signals (ip / ua / referer).

[{ occurred_at, slug, distribution_id, ip, ua, referer }]

Prefer tools? Use the MCP

The same data is exposed as read tools over the hosted MCP, so an agent can call them directly instead of curling. Connect once with your read token:

bash
claude mcp add --transport http attribura \
  https://api.attribura.com/mcp \
  -H "Authorization: Bearer atb_your_read_token"

Read tools: get_overview · get_performance · get_revenue_events · get_self_report_summary · list_self_reports · list_content · list_distributions · list_links · list_clicks. For the full agent setup (and the content-writing tools), see Connect Claude Code.

Reading the numbers

  • Money is in cents. revenue_cents is gross; proceeds_cents is after the store cut, where known.
  • Attribution is confidence-scored. Deterministic signals (campaign token, discount code) win; self-report is directional (≤ 0.6) and never overrides them. Treat per-post revenue as the best signal available, not gospel. See How attribution works.
  • Dark social is the traffic no link or code can see (a friend, a podcast, App Store search). A healthy dark_social_sharemeans word-of-mouth is working — it just can't be pinned to one post.