API Reference
Analytics
Pull metrics per post or range
The analytics endpoints mirror what the dashboard shows. Use them for scheduled reports, internal BI tools, or feeding a client-facing metrics page.
Workspace snapshots
GET
/v1/analyticsauth: Bearer tokenUp to 500 recent analytics snapshots across the workspace, newest first.
| Field | Type | Description |
|---|---|---|
| days | int | How many days back to include. Default 30. |
| integration_id | uuid | Limit to snapshots for a single integration. |
curl
curl "https://api.openpost.so/v1/analytics?days=30" \
-H "Authorization: Bearer $OP_KEY"
json
{
"data": [
{
"id": "...",
"post_target_id": "...",
"integration_id": "...",
"impressions": 3281,
"likes": 142,
"comments": 12,
"shares": 4,
"platform_data": { },
"captured_at": "2026-04-16T10:00:00Z"
}
]
}
Each row in
datais an append-only snapshot — the dashboard charts the difference between the latest row and the previous one. Analytics refresh is tiered: fresh (posts under 24h) every 30 minutes, recent (1–7d) every 6 hours, long-tail (7–90d) daily.Per-post metrics
GET
/v1/analytics/post/{post_id}auth: Bearer tokenAggregated latest metrics for a single post, broken out per target (platform account).
| Field | Type | Description |
|---|---|---|
| days | int | How many days of snapshot history to include. Default 30. |
json
{
"data": {
"post_id": "3a6f...",
"totals": { "impressions": 14832, "likes": 412, "comments": 23, "shares": 8 },
"targets": [
{
"target_id": "...",
"platform": "twitter",
"username": "openpost",
"status": "published",
"post_url": "https://x.com/openpost/status/...",
"impressions": 9120,
"likes": 201,
"comments": 15,
"shares": 6,
"snapshots": [ /* ordered newest-first */ ]
}
]
}
}
X is the only platform with live analytics today. Each X integration is capped at the most recent 50 posts and a 72-hour freshness window (we share one X API key app-wide). Other platforms light up once their developer approval lands.
CSV exports
Programmatic CSV exports are coming soon. Today, export from Dashboard → Analytics or hit the snapshot endpoints directly and serialize in your own job.
Last updated April 2026 Edit this page