PostZen
Analytics

Get post analytics

GET
/v1/analytics

Returns one post when postId is supplied. Otherwise returns a paginated analytics list with aggregate overview metrics. Instagram Reels also report skipRate (percentage of initial views that skipped within the first 3 seconds), avgWatchTimeMs and totalWatchTimeMs.

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. Defaults to 90 days before toDate. The range may span at most 366 days, and toDate defaults to now, so an older fromDate needs a toDate within 366 days of it.

toDate?|

Inclusive range end. Defaults to the current time. Must be no more than 366 days after fromDate.

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,    "skipRate": 0,    "avgWatchTimeMs": 0,    "totalWatchTimeMs": 0,    "completionRate": 0,    "newFollowers": 0,    "insights": {      "impressionSources": [        {          "source": "string",          "percent": 0        }      ],      "retention": [        {          "second": 0,          "percent": 0        }      ],      "audienceGenders": [        {          "gender": "string",          "percent": 0        }      ],      "audienceCountries": [        {          "country": "string",          "percent": 0        }      ],      "observedAt": "2019-08-24T14:15:22Z"    },    "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,        "skipRate": 0,        "avgWatchTimeMs": 0,        "totalWatchTimeMs": 0,        "completionRate": 0,        "newFollowers": 0,        "insights": {          "impressionSources": [            {              "source": "string",              "percent": 0            }          ],          "retention": [            {              "second": 0,              "percent": 0            }          ],          "audienceGenders": [            {              "gender": "string",              "percent": 0            }          ],          "audienceCountries": [            {              "country": "string",              "percent": 0            }          ],          "observedAt": "2019-08-24T14:15:22Z"        },        "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,    "skipRate": 0,    "avgWatchTimeMs": 0,    "totalWatchTimeMs": 0,    "completionRate": 0,    "newFollowers": 0,    "insights": {      "impressionSources": [        {          "source": "string",          "percent": 0        }      ],      "retention": [        {          "second": 0,          "percent": 0        }      ],      "audienceGenders": [        {          "gender": "string",          "percent": 0        }      ],      "audienceCountries": [        {          "country": "string",          "percent": 0        }      ],      "observedAt": "2019-08-24T14:15:22Z"    },    "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,        "skipRate": 0,        "avgWatchTimeMs": 0,        "totalWatchTimeMs": 0,        "completionRate": 0,        "newFollowers": 0,        "insights": {          "impressionSources": [            {              "source": "string",              "percent": 0            }          ],          "retention": [            {              "second": 0,              "percent": 0            }          ],          "audienceGenders": [            {              "gender": "string",              "percent": 0            }          ],          "audienceCountries": [            {              "country": "string",              "percent": 0            }          ],          "observedAt": "2019-08-24T14:15:22Z"        },        "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",  "type": "string",  "code": "string",  "param": "string"}
{  "error": "API key requires read_write permission"}
{  "error": "Not found"}
{  "error": "string",  "type": "string",  "code": "string",  "param": "string"}
{  "error": "rate_limited",  "retryAfter": 30}
{  "error": "Failed to create post"}