All docs

Analytics API

Build your own dashboards and reports on top of SlingAgent's numbers. The Analytics API is a read-only, JSON HTTP API available on the Unlimited plan.

Authentication

Create a token under Settings → API tokens (it's shown once — copy it), then send it as a bearer token on every request:

curl -H "Authorization: Bearer slag_your_token_here" \
  https://slingagent.com/api/v1/analytics/summary

Requests without a valid token get 401; a token on a non-Unlimited plan gets 403.

Endpoints

All figures are scoped to your plan's analytics history window.

  • GET /api/v1/analytics — index of available reports.
  • GET /api/v1/analytics/summary — totals, unique visitors, clicks by day, by platform, by country, by hour, the day×hour heatmap, visitor mix, and pace.
  • GET /api/v1/analytics/links — every link with total + windowed clicks, posts, platforms, and last activity (the same data as the CSV export).
  • GET /api/v1/analytics/posting — scheduled vs. actual: posted/queued/failed and click yield.
  • GET /api/v1/analytics/retention — click-decay-by-age buckets.
  • GET /api/v1/analytics/revenue-timeline — monthly earnings, posts, and clicks.
  • GET /api/v1/analytics/segment?kind=platform&value=X — a single platform's drill-down (top links, the promos that resonated, and the country breakdown). Use kind=country&value=US for a country drill-down.
  • GET /api/v1/analytics/engagement — impressions, likes, comments, shares and click-through rate per post and per platform, plus the high-CTR/low-reach and high-reach/low-CTR outliers. Also linkClickGap, comparing a network's own link-click count with the clicks that reached your tracking link, over the posts where the network reports one. Returns 503 if engagement metrics aren't available yet (they populate from the daily sync).
  • GET /api/v1/analytics/content — Content DNA: performance by copy length, opening, emoji, CTA, hashtag count, media type, plus per-hashtag rows.
  • GET /api/v1/analytics/ab-tests — every A/B test, the decided winners, and head-to-head win rates per copy attribute.
  • GET /api/v1/analytics/portfolio — clicks, revenue and EPC grouped by tag, by content source, and by link kind.
  • GET /api/v1/analytics/network — Promo Store and Buddies reach, both directions.
  • GET /api/v1/analytics/benchmarks — your percentile against comparable accounts (aggregates only).
  • GET /api/v1/analytics/anomalies — week-over-week swings with their diagnosed cause.
  • GET /api/v1/analytics/recommendations — the ranked suggestion list behind What to do next.

Notes

  • Read-only. The API never posts, edits, or deletes.
  • Rate limit. Up to 120 requests per minute per token; over that you get a 429 with a Retry-After header.
  • CORS. Cross-origin requests are allowed, so you can call the API from a browser-based tool (the token is never sent automatically — you always set it).
  • Privacy. We only ever store salted IP hashes, never raw addresses, so no personal data is exposed.
  • Responses are stable within v1; we'll version the path before making breaking changes.
  • Prefer a one-off file? The in-app Export CSV button (Pro and Unlimited) on the Analytics page downloads the per-link sheet without any code.