Skip to main content
Version: current (0.10)

Attribution API

Beyond the browser SDK, Lucia exposes a REST Attribution API for sending events from your backend and reading resolved attribution data. The API powers the dashboard, and the same data is available programmatically.

  • Base URL: https://api.luciaprotocol.com
  • Interactive reference: the full, always-current endpoint reference (schemas, parameters, responses) is served as OpenAPI/Swagger at https://api.luciaprotocol.com/api/docs. Treat that as the source of truth for exact request shapes.
SDK vs API

Most sites only need the browser SDK. Reach for the Attribution API when you need to send events from a server (e.g. a purchase confirmed in your backend) or pull attribution data into your own tools.

Authentication​

Generate an API key in your dashboard (Settings → API Keys), then send it on each request in the X-API-KEY header:

curl https://api.luciaprotocol.com/api/... \
-H "X-API-KEY: YOUR_API_KEY"

API keys authenticate server-side ingestion and identity resolution. Dashboard analytics are tied to your account session; programmatic access to analytics and exports uses your account's OAuth scopes — see the interactive reference for details.

Server-side event ingestion​

Send events from your backend with the same meaning as the SDK's — useful for conversions you only confirm server-side (a captured payment, a fulfilled order). Authenticate with X-API-KEY:

curl -X POST https://api.luciaprotocol.com/api/events-ingestion/conversions \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tag": "purchase", "amount": 49.0, "details": { "currency": "USD" } }'

There are endpoints for single events, batched events, and fingerprints as well. See /api/docs for the exact payloads and the full list.

Identity resolution​

Resolve a device fingerprint to its unified profile (nearest-neighbor matching), so your backend can tie server-side actions to the right customer. API-key authenticated — see /api/docs.

Reading attribution data​

The dashboard — and the API behind it — expose the resolved results:

  • Channel performance — CAC, ROAS, and conversion rate per channel and campaign.
  • Cohorts & user segments — group resolved customers by acquisition, behavior, and value.
  • Geo analytics — where conversions and value come from, by region.
  • UTM analytics — performance of your tagged links and sources.
  • Per-user profiles with risk scores — each resolved user carries churn, fraud, bot, and wallet risk scores on a 0–100 scale (see Increasing Conversion Rates).
  • Data export — export resolved, attributed data for your own warehouse/BI.

The exact endpoints, parameters, and response schemas live in the interactive reference at /api/docs.