---
title: "Get a post's analytics"
description: "Views, watch time, average view duration and percentage, likes, comments, shares, subscribers gained and lost, the audience-retention curve and traffic sources — whichever the platform reports. Defaults to the day it went up through today.\n\nNeeds the **analytics** permission."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.mixetape.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: mixetape API › Posts

`GET /api/v1/posts/{id}/analytics`

Views, watch time, average view duration and percentage, likes, comments, shares, subscribers gained and lost, the audience-retention curve and traffic sources — whichever the platform reports. Defaults to the day it went up through today.

Needs the **analytics** permission.

## Authentication

- `apiKey`, http, header `Authorization`

## Path parameters

- `getPostAnalytics.path.id` (string, required) — The post's id

## Query parameters

- `getPostAnalytics.query.from` (string, optional) — First day
  - format `date`
- `getPostAnalytics.query.to` (string, optional) — Last day
  - format `date`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://mixetape.com/api/v1/posts/string/analytics \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://mixetape.com/api/v1/posts/string/analytics';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://mixetape.com/api/v1/posts/string/analytics"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The post's analytics.

#### Example

```json
{
  "post": {
    "id": "string",
    "platformPostId": "string",
    "platformUrl": "string"
  },
  "dataDelayDays": 0,
  "range": {
    "from": "2019-08-24",
    "to": "2019-08-24"
  },
  "totals": {
    "views": 0,
    "watchTimeMinutes": 0,
    "averageViewDurationSeconds": 0,
    "averageViewPercentage": 0,
    "likes": 0,
    "comments": 0,
    "shares": 0,
    "subscribersGained": 0,
    "subscribersLost": 0
  },
  "retention": [
    {
      "position": 0,
      "watchRatio": 0,
      "relativePerformance": 0
    }
  ],
  "trafficSources": [
    {
      "source": "string",
      "views": 0,
      "watchTimeMinutes": 0
    }
  ]
}
```

- `getPostAnalytics.response.200.post` (object, required)
  - `getPostAnalytics.response.200.post.id` (string, optional)
  - `getPostAnalytics.response.200.post.platformPostId` (string, optional)
  - `getPostAnalytics.response.200.post.platformUrl` (string | null, optional)
- `getPostAnalytics.response.200.dataDelayDays` (integer, required) — The last this many days are still incomplete on the platform
- `getPostAnalytics.response.200.range` (object, required)
  - `getPostAnalytics.response.200.range.from` (string, required)
    - format `date`
  - `getPostAnalytics.response.200.range.to` (string, required)
    - format `date`
- `getPostAnalytics.response.200.totals` (object, required)
  - `getPostAnalytics.response.200.totals.views` (integer, optional)
  - `getPostAnalytics.response.200.totals.watchTimeMinutes` (number, optional)
  - `getPostAnalytics.response.200.totals.averageViewDurationSeconds` (number, optional)
  - `getPostAnalytics.response.200.totals.averageViewPercentage` (number, optional)
  - `getPostAnalytics.response.200.totals.likes` (integer, optional)
  - `getPostAnalytics.response.200.totals.comments` (integer, optional)
  - `getPostAnalytics.response.200.totals.shares` (integer, optional)
  - `getPostAnalytics.response.200.totals.subscribersGained` (integer, optional)
  - `getPostAnalytics.response.200.totals.subscribersLost` (integer, optional)
- `getPostAnalytics.response.200.retention` (array<object>, optional) — Audience retention: at each point of the video (0–1), the share of viewers still watching, and how that compares with similar videos (0.5 = typical)
  - `getPostAnalytics.response.200.retention.position` (number, optional)
  - `getPostAnalytics.response.200.retention.watchRatio` (number, optional)
  - `getPostAnalytics.response.200.retention.relativePerformance` (number, optional)
- `getPostAnalytics.response.200.trafficSources` (array<object>, optional)
  - `getPostAnalytics.response.200.trafficSources.source` (string, optional)
  - `getPostAnalytics.response.200.trafficSources.views` (integer, optional)
  - `getPostAnalytics.response.200.trafficSources.watchTimeMinutes` (number, optional)

### 400

The request is invalid; error.code says how (invalid_field, missing_field, unknown_field, media_not_supported, …) and error.field which field.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.400.error` (object, required)
  - `getPostAnalytics.response.400.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.400.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.400.error.field` (string, optional) — The input field it is about, if any

### 401

No valid API key.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.401.error` (object, required)
  - `getPostAnalytics.response.401.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.401.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.401.error.field` (string, optional) — The input field it is about, if any

### 403

The key lacks the permission this needs.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.403.error` (object, required)
  - `getPostAnalytics.response.403.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.403.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.403.error.field` (string, optional) — The input field it is about, if any

### 404

Not found, or not yours.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.404.error` (object, required)
  - `getPostAnalytics.response.404.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.404.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.404.error.field` (string, optional) — The input field it is about, if any

### 409

Not possible in its current state: invalid_post_state, account_needs_reconnect, file_not_ready, idempotency_in_progress, …

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.409.error` (object, required)
  - `getPostAnalytics.response.409.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.409.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.409.error.field` (string, optional) — The input field it is about, if any

### 429

Over 120 requests a minute (rate_limited); wait and retry.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.429.error` (object, required)
  - `getPostAnalytics.response.429.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.429.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.429.error.field` (string, optional) — The input field it is about, if any

### 502

Something mixetape depends on failed: the file at a URL could not be fetched (source_unreachable) or the platform refused the call (platform_error).

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `getPostAnalytics.response.502.error` (object, required)
  - `getPostAnalytics.response.502.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `getPostAnalytics.response.502.error.message` (string, required) — What went wrong, in plain words
  - `getPostAnalytics.response.502.error.field` (string, optional) — The input field it is about, if any


Source: https://docs.mixetape.com/api/Posts/getPostAnalytics/index.md
