PostZen
Analytics

Get post analytics

GET
/v1/analytics

Coming soon — Analytics endpoints are being rolled out and may return empty data until the rollout completes.

Returns one post when postId is supplied. Otherwise returns a paginated analytics list with aggregate overview metrics.

Authorization

bearerAuth
AuthorizationBearer <token>

PostZen API key.

In: header

Query Parameters

postId?string

PostZen post id or platform post id. When supplied, the response is a single analytics object.

platform?|

Platform slug, or all for every platform.

profileId?string

Filter by PostZen profile id.

accountId?string

Filter by connected social account id.

source?string

Filter by posts published through PostZen or imported from a platform.

fromDate?|

Inclusive range start. Accepts YYYY-MM-DD or an ISO 8601 datetime. Defaults to 90 days before toDate.

toDate?|

Inclusive range end. Accepts YYYY-MM-DD or an ISO 8601 datetime. Defaults to the current time.

limit?integer

Page size.

page?integer

1-based page number.

sortBy?string

Field used to order list results.

order?string

Sort direction.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/analytics"
{  "postId": "string",  "postzenPostId": "string",  "status": "string",  "content": "string",  "scheduledFor": "2019-08-24T14:15:22Z",  "publishedAt": "2019-08-24T14:15:22Z",  "analytics": {    "impressions": 0,    "reach": 0,    "likes": 0,    "comments": 0,    "shares": 0,    "saves": 0,    "clicks": 0,    "views": 0,    "engagementRate": 0,    "lastUpdated": "2019-08-24T14:15:22Z"  },  "platformAnalytics": [    {      "platform": "x",      "status": "string",      "platformPostId": "string",      "accountId": "string",      "accountUsername": "string",      "analytics": {        "impressions": 0,        "reach": 0,        "likes": 0,        "comments": 0,        "shares": 0,        "saves": 0,        "clicks": 0,        "views": 0,        "engagementRate": 0,        "lastUpdated": "2019-08-24T14:15:22Z"      },      "syncStatus": "synced",      "platformPostUrl": "http://example.com",      "errorMessage": "string"    }  ],  "platform": "x",  "platformPostUrl": "http://example.com",  "isExternal": true,  "syncStatus": "synced",  "message": "string",  "thumbnailUrl": "http://example.com",  "mediaType": "image",  "mediaItems": [    {      "type": "string",      "url": "http://example.com",      "thumbnail": "http://example.com"    }  ]}
{  "postId": "string",  "postzenPostId": "string",  "status": "string",  "content": "string",  "scheduledFor": "2019-08-24T14:15:22Z",  "publishedAt": "2019-08-24T14:15:22Z",  "analytics": {    "impressions": 0,    "reach": 0,    "likes": 0,    "comments": 0,    "shares": 0,    "saves": 0,    "clicks": 0,    "views": 0,    "engagementRate": 0,    "lastUpdated": "2019-08-24T14:15:22Z"  },  "platformAnalytics": [    {      "platform": "x",      "status": "string",      "platformPostId": "string",      "accountId": "string",      "accountUsername": "string",      "analytics": {        "impressions": 0,        "reach": 0,        "likes": 0,        "comments": 0,        "shares": 0,        "saves": 0,        "clicks": 0,        "views": 0,        "engagementRate": 0,        "lastUpdated": "2019-08-24T14:15:22Z"      },      "syncStatus": "synced",      "platformPostUrl": "http://example.com",      "errorMessage": "string"    }  ],  "platform": "x",  "platformPostUrl": "http://example.com",  "isExternal": true,  "syncStatus": "synced",  "message": "string",  "thumbnailUrl": "http://example.com",  "mediaType": "image",  "mediaItems": [    {      "type": "string",      "url": "http://example.com",      "thumbnail": "http://example.com"    }  ]}
{  "error": "JSON body is required"}
{  "error": "Unauthorized"}
{  "error": "string"}
{  "error": "API key requires read_write permission"}
{  "error": "Not found"}
{  "error": "string"}
{  "error": "rate_limited",  "retryAfter": 30}
{  "error": "Failed to create post"}