Get account metrics

Returns follower / following / post counts for one connected social account, fetched live from the platform's API. Currently supported on X, Instagram, Threads, TikTok, and YouTube when the relevant platform scopes are granted. Other platforms return 501 NOT_SUPPORTED. Not cached — every call hits the upstream API, so prefer caching client-side if your dashboard polls frequently.
https://api.unipost.dev
GET/v1/accounts/:account_id/metrics
Authorization
In header · Bearer <token>
Path
string

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Path Params

account_idstring
Connected social account ID such as sa_twitter_1.

Response Body

200
social_account_idstring
UniPost account ID the metrics snapshot belongs to.
platformstring
Normalized platform name.
follower_countnumber
Followers reported by the platform at fetch time.
following_countnumber
Number of accounts this account is following.
post_countnumber
Lifetime post / tweet count exposed by the platform.
platform_specificobject
Untransformed platform-native fields. On X: tweet_count, listed_count. On TikTok, likes_count is included when analytics scopes are granted. On YouTube, view_count, hidden_subscriber_count, following_count_supported, subscriber_count_rounded, and post_count_public_only describe channel-statistics semantics. Some platforms can return upstream_status and upstream_error for recoverable upstream failures.
fetched_atstring
Timestamp at which the response was fetched. Not cached — every call hits the upstream platform API.
401
error.codestring
Possible values: "UNAUTHORIZED", "NOT_FOUND", "ACCOUNT_DISCONNECTED" (409), "NEEDS_RECONNECT" (409 — provider credentials, scopes, or channel identity must be refreshed), "NOT_SUPPORTED" (501 — platform has no metrics endpoint), "UPSTREAM_ERROR" (502 — platform fetch failed), "INTERNAL_ERROR".
error.normalized_codestring
Lowercase alias such as "unauthorized", "not_found", "account_disconnected", "not_supported", "upstream_error", or "internal_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
404
error.codestring
Possible values: "UNAUTHORIZED", "NOT_FOUND", "ACCOUNT_DISCONNECTED" (409), "NEEDS_RECONNECT" (409 — provider credentials, scopes, or channel identity must be refreshed), "NOT_SUPPORTED" (501 — platform has no metrics endpoint), "UPSTREAM_ERROR" (502 — platform fetch failed), "INTERNAL_ERROR".
error.normalized_codestring
Lowercase alias such as "unauthorized", "not_found", "account_disconnected", "not_supported", "upstream_error", or "internal_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
409
error.codestring
Possible values: "UNAUTHORIZED", "NOT_FOUND", "ACCOUNT_DISCONNECTED" (409), "NEEDS_RECONNECT" (409 — provider credentials, scopes, or channel identity must be refreshed), "NOT_SUPPORTED" (501 — platform has no metrics endpoint), "UPSTREAM_ERROR" (502 — platform fetch failed), "INTERNAL_ERROR".
error.normalized_codestring
Lowercase alias such as "unauthorized", "not_found", "account_disconnected", "not_supported", "upstream_error", or "internal_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
501
error.codestring
Possible values: "UNAUTHORIZED", "NOT_FOUND", "ACCOUNT_DISCONNECTED" (409), "NEEDS_RECONNECT" (409 — provider credentials, scopes, or channel identity must be refreshed), "NOT_SUPPORTED" (501 — platform has no metrics endpoint), "UPSTREAM_ERROR" (502 — platform fetch failed), "INTERNAL_ERROR".
error.normalized_codestring
Lowercase alias such as "unauthorized", "not_found", "account_disconnected", "not_supported", "upstream_error", or "internal_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
502
error.codestring
Possible values: "UNAUTHORIZED", "NOT_FOUND", "ACCOUNT_DISCONNECTED" (409), "NEEDS_RECONNECT" (409 — provider credentials, scopes, or channel identity must be refreshed), "NOT_SUPPORTED" (501 — platform has no metrics endpoint), "UPSTREAM_ERROR" (502 — platform fetch failed), "INTERNAL_ERROR".
error.normalized_codestring
Lowercase alias such as "unauthorized", "not_found", "account_disconnected", "not_supported", "upstream_error", or "internal_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.