Meet the new Scripe, live on October 7.Register

OpenAPI reference · Analytics

Download analytics report (PDF or CSV)

GET/analytics/report

Generate 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

  • Authorizationstringrequired

    Bearer token in the Authorization header.

    Pass Authorization: Bearer scripe_sk_live_<...> (or scripe_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 except webhooks:manage, which is grantable to OAuth tokens only today — the webhook-endpoint operations answer 403 scope_missing to every API key. Operations that name no scope accept any valid token of the workspace.

Query parameters

  • projectIdstring

    One project id, or a comma-separated list. If omitted, defaults to all available projects.

  • dateFromstring <date-time>

    ISO 8601 or YYYY-MM-DD lower bound (inclusive).

  • dateTostring <date-time>

    ISO 8601 or YYYY-MM-DD upper bound (inclusive).

  • currencystring

    Currency for the Earned Media Value figure.

    Allowed values: EUR, USD, GBP

    Default: "USD"

  • cpmnumber

    Cost-per-mille rate used to compute Earned Media Value (impressions / 1000 × cpm). Defaults to 35.

    Default: 35

  • modestring

    Format of the returned report document.

    Allowed values: pdf, csv

    Default: "pdf"

Header parameters

  • Scripe-Api-Versionstring

    Pin the API version. Format YYYY-MM-DD. Omit to receive the currently rolling default. Unknown versions return 400 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

bash
curl --request GET \
  --url 'https://api.scripe.io/v1/analytics/report' \
  --header 'Authorization: Bearer <token>'