Read one account’s analytics with GET /api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}. Requires an API key with the read scope or a signed-in workspace member.
Request
Returns totals or a daily series for one provider account in the workspace. How far back a daily series can reach depends on the workspace plan; an earlier from returns plan_required with the earliest allowed date.
| Parameter | In | Type | Required |
|---|---|---|---|
workspaceId |
path | UUID | Yes |
accountId |
path | UUID | Yes |
from |
query | string | No |
to |
query | string | No |
timezone |
query | string | No |
granularity |
query | "day", "total" |
No |
metrics |
query | array of string | No |
Response
- HTTP 200:
AccountAnalyticswithaccountId,workspaceId,provider,accountKind,profileId,name,range,metrics,series,freshness.provider:bluesky,facebook,instagram,linkedin,pinterest,reddit,snapchat,tiktok,threads,x,youtube,google_business,meta_ads,google_ads,reddit_ads,pinterest_ads,tiktok_ads,linkedin_ads,snapchat_ads,amazon_ads,openai_adsaccountKind:social_page,social_account,social_board,social_channel,ad_account
The OpenAPI document has each field’s type.
Examples
const analytics = await workspace.analytics.account(accountId, {
from: "2026-11-01",
to: "2026-11-30",
});analytics = workspace.analytics.get_account(account_id)curl "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID/analytics/accounts/$ACCOUNT_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY"pnio analytics accounts get "$ACCOUNT_ID" --from 2026-11-01 --to 2026-11-30async () => {
const accountId = "<accountId>";
const response = await codemode.request({
method: "GET",
path: `/api/v1/workspaces/${codemode.workspaceId}/analytics/accounts/${accountId}`,
});
return response.data;
};Errors
plan-required: HTTP 402, Plan upgrade required
It also declares the problems every Analytics operation and most operations declare.
Idempotency
None needed: a read is safe to retry.
Limits
- Field lengths and ranges are in the OpenAPI document.