OpenAPI reference · Analytics
Download analytics report (PDF or CSV)
/analytics/reportGenerate a downloadable PDF or CSV report for one or more projects over a
date range. Bundles the same figures as the in-app dashboard export —
executive summary, per-author performance, every post in the period
(highest-impression first, up to 3,000 rows — a file that hits the cap
says so and points at GET /v1/analytics/posts, which pages through
all of them), daily metrics, and the follower timeline — into a single
styled document (PDF) or comma-separated table (CSV). The summary
names three click figures the dashboard never adds up: LinkedIn's
link clicks on the period's posts (the Link clicks KPI card),
the workspace's Scripe tracked-link clicks by click date (the
conversion funnel's Tracked link clicks stage), and LinkedIn's
Premium call-to-action clicks.
The CSV opens directly in spreadsheet software (UTF-8 BOM, RFC 4180
quoting, one metric per column). A text cell a spreadsheet would
evaluate is prefixed with an apostrophe so it is read as text instead
of a formula: always when it starts with =, and when it starts with
+, -, @, a tab or a line break and its first paragraph —
everything up to the first blank line — also contains a ( or |.
Ordinary prose that merely opens with one of those characters is left
byte-for-byte intact, including a ( or | in a later paragraph.
The response is a binary file body with a Content-Disposition: attachment
filename. Pass a comma-separated projectId to aggregate multiple
projects. If omitted, aggregates across all projects available to
the caller in the workspace. Defaults to the last 30 days.
Required scope: analytics:read.
Authorization
AuthorizationstringrequiredBearer token in the Authorization header.
Pass
Authorization: Bearer scripe_sk_live_<...>(orscripe_sk_test_<...>for test keys) on every request. Keys are scoped to a single workspace and can be revoked from the Scripe dashboard.The same header also accepts an OAuth 2.1 access token (
scripe_oat_*); both credentials share one scope vocabulary and every operation below documents the scope it requires. An API key can hold every scope named on this surface exceptwebhooks:manage, which is grantable to OAuth tokens only today — the webhook-endpoint operations answer403 scope_missingto every API key. Operations that name no scope accept any valid token of the workspace.
Query parameters
projectIdstringOne project id, or a comma-separated list. If omitted, defaults to all available projects.
dateFromstring <date-time>ISO 8601 or
YYYY-MM-DDlower bound (inclusive).dateTostring <date-time>ISO 8601 or
YYYY-MM-DDupper bound (inclusive).currencystringCurrency for the Earned Media Value figure.
Allowed values:
EUR,USD,GBPDefault: "USD"
cpmnumberCost-per-mille rate used to compute Earned Media Value (impressions / 1000 × cpm). Defaults to 35.
Default: 35
modestringFormat of the returned report document.
Allowed values:
pdf,csvDefault: "pdf"
Header parameters
Scripe-Api-VersionstringPin the API version. Format
YYYY-MM-DD. Omit to receive the currently rolling default. Unknown versions return400 version_unsupported.
Responses
- 200
The analytics report in the requested format.
- 400
Malformed request (bad cursor, bad limit, etc.).
- 401
Missing, malformed, expired, or revoked API key.
- 403
Plan not eligible, scope missing, or workspace mismatch.
- 404
Resource not found in this workspace.
- 429
Sliding-window rate limit exceeded.
Example request
curl --request GET \
--url 'https://api.scripe.io/v1/analytics/report' \
--header 'Authorization: Bearer <token>'