Skip to main content
The Reporting API returns the same campaign analytics shown on the Linkrunner dashboard.

Base URL

Authentication

Pass your project’s server key in the linkrunner-key header. This is the same key used by other /api/v1 endpoints. Find it under Settings → Data APIs:

Postman collection

Download the Postman collection. Import it into Postman, set the linkrunner_key collection variable to your key, and run any request.

Rate limit and freshness

  • 1 request per minute per API key (429 with Retry-After: 60 when exceeded).
  • 30 req/sec per source IP (shared across all /api/v1 endpoints).
  • Underlying analytics refresh on roughly the same cadence, so cache responses for at least 60 seconds.

Endpoint

Do not call the docs page URL (/api-reference/reporting-campaigns) as the API endpoint. The API path is /api/v1/reporting/campaigns.

Example request

Response

pagination.total is the number of campaigns matching your filters, and pages is total / limit rounded up.
Numeric fields are returned as formatted strings ("3,201", "$12,540.50"). Strip the formatting before doing math: Number(value.replace(/[^0-9.-]/g, "")).

Query parameters

from and to choose the window over which metrics (clicks, installs, revenue, spend) are computed. They do not filter which campaigns are returned: a campaign created after to still appears, with zeros for the window. This matches the dashboard campaign table, where the date picker changes the numbers, not the list. To fetch only campaigns created in a range, see Troubleshooting.
See Configurable columns below for events, payment_events, unique_user_events, cost_per_event, and active_users.

Configurable columns

By default the response includes:
  • All custom events your project tracks (under custom_events), each as a total occurrence count.
  • All payment events (under payment_events), each as a total count and total amount.
  • active_users with a 7-day window.
These query params let you narrow or change that: All five accept a comma-separated list. Unknown event names are silently dropped (they map to no rows in our analytics store). Find your project’s event names under Dashboard → Settings → Events.

Example: revenue events with cost-per and 14-day active users

Returns each campaign with:
  • custom_events.Purchase containing a unique_count (distinct paying users) instead of count.
  • custom_events.AddToCart with the standard total count.
  • cost_per_custom_events.Purchase (spend ÷ Purchase count).
  • active_users computed over a 14-day window.

Errors

Troubleshooting

This is expected. from and to set the metrics window; they never remove campaigns from the list. To keep only campaigns created in a range, request sort_field=created_at&sort_order=descending, then drop rows client-side once created_at falls before from.
The limit is 1 request per minute per API key. Honor the Retry-After: 60 header and cache responses for at least 60 seconds. The underlying analytics refresh on roughly the same cadence, so polling faster returns the same data.
Compare the same date range and the same view (user_acquisition vs retargeting). The API interprets from and to in your project’s timezone, exactly like the dashboard date picker. If you are doing math on the values, remember they are formatted strings (see the warning under Response).

TypeScript types

Need help? Contact support@linkrunner.io