Skip to content

API Reference

Base: https://app.durum.ai/api/v1 Auth: header Authorization: Bearer durum_sk_live_… All routes are GET (read-only) and return { "data": … }.

Common period params: from and to in YYYY-MM-DD format (optional).

Self-documenting index

GET /v1 (no route) returns the list of available routes and their required scope.

Dashboard

RouteScopeParams
GET /dashboard/kpisread:dashboardfrom, to
GET /dashboard/dailyread:dashboardfrom, to
GET /dashboard/breakdownsread:dashboardfrom, to, dim = source|campaign|product|rep

Ads

RouteScopeParams
GET /ads/spendread:adsfrom, to
GET /ads/campaignsread:adsfrom, to
GET /ads/rulesread:ads— your automated ad rules
GET /ads/rules/runsread:adsrule_id, limit — a rule's run history

Attribution

RouteScopeParams
GET /attributionread:attributionfrom, to
GET /attribution/healthread:attribution
GET /attribution/reportread:attributionfrom, to

Events

RouteScopeParams
GET /eventsread:eventstype, from, to, limit (max 200), cursor, rep
GET /events/summaryread:eventsfrom, to

Pagination: events returns 50 rows by default; use cursor (ISO timestamp of the last row) for the next page.

Sales & Finance

RouteScopeParams
GET /sales/summaryread:salesfrom, to
GET /sales/repsread:salesfrom, to
GET /sales/cycleread:salesfrom, to
GET /finance/pnlread:financefrom, tomargin fields are stripped

Funnel

RouteScopeParams
GET /funnelread:funnelfrom, to

Contacts & Calls

RouteScopeParams
GET /contactsread:contactsfrom, to, limit (max 500), offset, search
GET /contacts/callsread:callsemail
GET /contacts/customersread:contacts
GET /contacts/purchasesread:contactsfrom, to

ICP & Pixels

RouteScopeParams
GET /icp/criteriaread:icp
GET /capi/pixelsread:capi— — your connected Meta pixels (IDs, default); tokens are never returned

Writes (actions)

Writes use PUT with a JSON body and require a write:* scope.

RouteScopeBody
PUT /goalswrite:goals{ "goals": { … } } — replaces your KPI goals
PUT /sale-rulewrite:settings{ "sale_rule": { … } } — sale counting rule
PUT /icpwrite:icp{ "icp": { … } } — your ICP criteria
POST /ads/rules/enablewrite:ads{ "rule_id": "…", "enabled": true } — enable/disable a rule
POST /ads/rules/dry-runwrite:ads{ "rule_id": "…", "dry_run": true } — simulation mode (no Meta action)
POST /ads/rules/deletewrite:ads{ "rule_id": "…" } — delete a rule
bash
curl -X PUT "https://app.durum.ai/api/v1/goals" \
  -H "Authorization: Bearer durum_sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"goals": {"revenue_target": 100000}}'

Response codes

CodeMeaning
200OK — { "data": … }
401Missing or invalid API key
403insufficient_scope — the key lacks the required scope
404Unknown route
429Rate limit exceeded (see X-RateLimit-* headers)

Example

bash
curl "https://app.durum.ai/api/v1/attribution?from=2026-06-01&to=2026-06-30" \
  -H "Authorization: Bearer durum_sk_live_YOUR_KEY"
json
{ "data": [ { "ad_name": "…", "attributed_revenue": 12400, "spend": 3100, "roas": 4.0 } ] }

Powered by DURUM.ai — ad attribution and operational intelligence