Meet the new Scripe, live on October 7.Register

OpenAPI reference · Analytics

Analytics overview across every reachable workspace

GET/analytics/cross-workspace/overview

The same current-vs-previous-period rollup as GET /v1/analytics/overview, computed for EVERY workspace the caller can reach and returned in one response, each row attributed to the workspace it came from.

Reach is Clerk membership or the billing-based agency-owner grant — the workspaces an agency the caller owns pays for — and workspaces[].workspace.reach says which one applies. Inside each workspace, project visibility is the same admin-or-assignment rule every other read applies, so a plain member of a client workspace still sees only the projects they are assigned to.

data.totals is the same figures over the union of every project above, computed by one query rather than summed here: an engagement rate has no meaningful average. It is null when there was nothing to total or when the union was too large for a further aggregate pass — meta.totals_omitted_reason says which.

A reachable workspace whose projects the caller cannot read is named in meta.skipped rather than dropped, because a missing workspace reads as "this client posted nothing". When meta.truncated is true the response holds the first meta.max_workspaces of meta.workspaces_reachable; name the rest explicitly in workspaceId to cover them.

OAuth only. An API key is bound to one workspace at creation, so there is nothing to aggregate across; a key gets 400 invalid_request. projectId is rejected here — use GET /v1/analytics/overview for specific projects.

Required scopes: analytics:read and workspace:read (the response enumerates workspaces).

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

  • workspaceIdstring

    One Clerk organisation id, or a comma-separated list, from GET /v1/workspaces. Omit (or pass all) for every reachable workspace. A named workspace the caller cannot reach is refused with workspace_unavailable, never silently dropped.

  • dateFromstring <date-time>

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

  • dateTostring <date-time>

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

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

    Per-workspace analytics overview plus the combined totals.

  • 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/cross-workspace/overview' \
  --header 'Authorization: Bearer <token>'

Example response (200)

json
{
  "data": {
    "range": {
      "from": "2026-08-10T09:00:00Z",
      "to": "2026-08-10T09:00:00Z",
      "days": 0
    },
    "workspaces": [
      {
        "posts": {
          "current": 0,
          "previous": 0
        },
        "impressions": {
          "current": 0,
          "previous": 0
        },
        "engagement": {
          "current_rate": 0,
          "previous_rate": 0
        },
        "followers": {
          "current": 0,
          "growth": 0
        },
        "activity": {
          "current_posts_per_week": 0,
          "previous_posts_per_week": 0
        },
        "workspace": {
          "id": "org_a1b2c3d4e5f6g7h8",
          "name": "string",
          "is_default": true,
          "reach": "member"
        },
        "projects": {
          "count": 0
        }
      }
    ],
    "totals": {
      "posts": {
        "current": 0,
        "previous": 0
      },
      "impressions": {
        "current": 0,
        "previous": 0
      },
      "engagement": {
        "current_rate": 0,
        "previous_rate": 0
      },
      "followers": {
        "current": 0,
        "growth": 0
      },
      "activity": {
        "current_posts_per_week": 0,
        "previous_posts_per_week": 0
      }
    }
  },
  "meta": {
    "selection": "all_reachable",
    "workspaces_reachable": 0,
    "workspaces_returned": 0,
    "max_workspaces": 0,
    "truncated": true,
    "skipped": [
      {
        "workspace_id": "string",
        "reason": "no_readable_projects"
      }
    ],
    "projects_truncated": [
      "string"
    ],
    "totals_omitted_reason": "string"
  }
}