# Get post analytics timeline

Fetches a post analytics timeline.

```http
GET https://api.pozy.ai/v1/analytics/post-timeline
```

- Area: Analytics / Analytics
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `postId` (string, required)
- `fromDate` (string (date-time))
- `toDate` (string (date-time))

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/analytics/post-timeline?postId=6108a2cc742cb4e991051e0c" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/analytics/post-timeline?postId=6108a2cc742cb4e991051e0c", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/analytics/post-timeline",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "postId": "6108a2cc742cb4e991051e0c",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `postId`, string
- `timeline`, array of object
  - `date`, string (date)
  - `platform`, string
  - `platformPostId`, string
  - `impressions`, integer
  - `reach`, integer
  - `likes`, integer
  - `comments`, integer
  - `shares`, integer
  - `saves`, integer
  - `clicks`, integer
  - `views`, integer
  - `follows`, integer: Can be null
  - `completionRate`, number
  - `profileViews`, integer
  - `websiteClicks`, integer
  - `impressionSources`, map of number
  - `audienceTypes`, map of number
  - `audienceCountries`, map of number
  - `replays`, integer
  - `retentionCurve`, map of number

```json
{
  "postId": "6108a2cc742cb4e991051e0c",
  "timeline": [
    {
      "date": "2026-10-02T09:00:00.000Z",
      "platform": "instagram",
      "platformPostId": "637f799b3039e6602e83fa4f",
      "impressions": 1,
      "reach": 1,
      "likes": 1,
      "comments": 1,
      "shares": 1,
      "saves": 1,
      "clicks": 1,
      "views": 1,
      "follows": 1,
      "completionRate": 12.5,
      "profileViews": 1,
      "websiteClicks": 1,
      "impressionSources": {
        "key": 12.5
      },
      "audienceTypes": {
        "key": 12.5
      },
      "audienceCountries": {
        "key": 12.5
      },
      "replays": 1,
      "retentionCurve": {
        "key": 12.5
      }
    }
  ]
}
```
