# Atribu

> Marketing attribution platform for performance agencies. Connects Meta Ads, Google Ads, GoHighLevel CRM, Stripe, MercadoPago, Shopify, and WhatsApp to show which ads drive real revenue — not just clicks.

## Product

- [Homepage](https://www.atribu.app): Marketing attribution and reporting platform for agencies
- [Pricing](https://www.atribu.app/#pricing): Starter $20/mo, Growth $99/mo, Agency $349/mo, Enterprise custom
- [How It Works](https://www.atribu.app/#how): Connect ad platforms via OAuth, install tracker, see real ROAS in under 30 minutes

## Key Features

- 9 attribution models: last touch, first touch, linear, position-based, time decay, last non-direct, split 50/50, custom weighted, engagement weighted
- AI-powered Ads Lab: ad analysis, creative generation, multi-agent pipeline (research, psychology, copywriting, compliance, critic)
- Conversion Sync: feeds real conversions back to Meta CAPI and Google Ads for better optimization
- Automated client reporting with email delivery and PDF export
- WhatsApp conversation tracking and Click-to-WhatsApp ad attribution
- Shopify integration with new vs returning customer classification and N-CAC calculations
- Agency workspace with isolated client profiles and role-based access control

## Integrations

Ad Platforms: Meta Ads, Google Ads
CRMs: GoHighLevel
Payments: Stripe, MercadoPago
E-commerce: Shopify
Messaging: WhatsApp (CTWA attribution, Embedded Signup)

## API

> Base URL: https://www.atribu.app/api/v1
> Auth: Bearer token (API key starting with atb_live_)
> OpenAPI spec: https://www.atribu.app/api/v1/openapi.json

### Endpoint families

- **Analytics**: `/overview`, `/timeseries`, `/channels`, `/pages`, `/countries`, `/devices`, `/browsers`, `/os`, `/referrers`
- **Campaigns + Ads**: `/campaigns`, `/campaign-trends`, `/ads`, `/ads/ranking`, `/top-performers`, `/creative-patterns`
- **Conversions + Customers**: `/conversions`, `/customers`, `/customers/{id}/journey`, `/goals`
- **Tracking + Quality**: `/visitors`, `/quality`, `/keywords`
- **Messaging (OAuth provider — for consumer apps like Vitrina)**:
  - `POST /messages` — send WhatsApp / Instagram messages (text, template, media via media_id or HTTPS link, quick replies)
  - `POST /comments/{id}/private-reply` — DM the user who left an IG comment
  - `POST /comments/{id}/reply` — public reply on an IG comment thread
- **Webhooks (subscription management)**:
  - `GET/POST/PATCH/DELETE /webhooks/subscriptions[/{id}]`
  - `POST /webhooks/subscriptions/{id}/rotate-secret` — atomic dual-key rotation with grace window
  - `POST /webhooks/test/{id}` — fire a synthetic signed event
  - `POST /webhooks/deliveries/{id}/replay` — re-enqueue an existing delivery payload

### OAuth provider

For sibling apps that need to consume Atribu's WhatsApp / Instagram connections instead of registering their own Meta App:

- `GET /oauth/authorize` — authorization-code grant with PKCE + signed `id_token_hint`
- `POST /oauth/token` — client_secret_basic or _post; returns an `atb_live_*` API key
- `POST /oauth/revoke` — RFC 7009 token revocation
- The minted API key has a tracked `oauth_app_id`, gated by per-connection `oauth_app_authorizations` rows on send.

## Machine-Readable Resources

- [OpenAPI 3.1 Spec (JSON)](https://www.atribu.app/api/v1/openapi.json): Full API schema with request/response types
- [Full Documentation (Markdown)](https://www.atribu.app/llms-full.txt): Complete docs concatenated as markdown
- [Raw Page Markdown](https://www.atribu.app/api/docs/{path}): Individual doc pages as raw markdown
