Atribu
API Reference

Authentication

API key setup, scopes, rate limits, and security best practices

All API requests require a Bearer token in the Authorization header.

Authorization header
Authorization: Bearer atb_live_your_key_here

Getting a key

Create API keys from Settings > Developer in the Atribu dashboard. Each key is scoped to a single profile.

Show once

Keys are shown exactly once at creation. Store them securely — you cannot retrieve them later.

Scopes

Each API key has granular scopes that control what data it can access.

ScopeAccess
analytics:readOverview, timeseries, breakdowns (channels, pages, countries, devices, browsers, OS, referrers), quality, keywords
campaigns:readCampaign performance, ROAS, ad set/ad breakdowns, daily trends
conversions:readConversion counts, daily conversion timeseries, revenue, cash collected
customers:readCustomer list with PII (name, email), individual journey timelines
visitors:readVisitor list with PII (name, email), session history
realtime:readLive visitor count

Default scopes when creating a key: analytics:read, campaigns:read, conversions:read, realtime:read.

PII scopes

customers:read and visitors:read expose personal data (names, emails, journey details). Only grant these when your integration specifically needs customer-level data.

Rate limits

Default: 60 requests per minute per key.

Heavy endpoints (customers, visitors, journey detail) cost 3x — meaning they consume 3 units of your rate limit per call.

HeaderDescription
X-RateLimit-LimitYour total limit per minute
X-RateLimit-RemainingRemaining requests in current window
X-Request-IdUnique request ID for debugging

When rate limited, you'll get a 429 response with a Retry-After header (seconds).

Key rotation

Rotate keys with zero downtime:

Call the Rotate endpoint — creates a new key

Both old and new keys work for 48 hours

Update your integration with the new key

The old key automatically expires after the grace period

Security best practices

Server-to-server only

This is a server-to-server API. Never expose keys in client-side JavaScript, mobile apps, or browser code.

  • Use the minimum scopes needed — don't grant customers:read if you only need analytics
  • Rotate keys regularly — the rotation endpoint makes this seamless
  • Revoke compromised keys immediately — revocation is instant

Error responses

Error response
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or expired API key",
    "status": 401,
    "request_id": "req_a1b2c3d4"
  }
}
CodeStatusMeaning
unauthorized401Missing or invalid API key
insufficient_scope403Key doesn't have the required scope
rate_limit_exceeded429Too many requests
invalid_parameter400Bad query parameter
invalid_date_range400Date range exceeds 366 days or dates are invalid
internal_error500Server error — include the request_id when reporting

On this page