# Content decay

See how quickly your posts collect their engagement after publishing, per platform, and use it to time reposts, boosts and reporting.

Most posts get the bulk of their likes and comments early, then flatten out. How early depends on the platform and your audience. `GET /v1/analytics/content-decay` measures it from your own posts, so you can say things like "our Instagram posts reach most of their engagement within a day" with data behind it.

## Get the decay curve

```bash cURL
curl "https://api.pozy.ai/v1/analytics/content-decay?profileId=6650c1e2a3b4c5d6e7f80911&platform=instagram" \
  -H "Authorization: Bearer $POZY_API_KEY"
```
```ts Node
const res = await fetch("https://api.pozy.ai/v1/analytics/content-decay?profileId=6650c1e2a3b4c5d6e7f80911&platform=instagram", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error);

for (const b of [...data.buckets].sort((a, z) => a.bucket_order - z.bucket_order)) {
  console.log(`${b.bucket_label}: ${b.avg_pct_of_final.toFixed(0)}% of final engagement (${b.post_count} posts)`);
}
```
```python Python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/analytics/content-decay",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={"profileId": "6650c1e2a3b4c5d6e7f80911", "platform": "instagram"},
    timeout=30,
)
for b in sorted(resp.json()["buckets"], key=lambda b: b["bucket_order"]):
    print(b["bucket_label"], round(b["avg_pct_of_final"]), b["post_count"])
```

## How to read a bucket

Each bucket is a time window after publishing. Its value is the share of a post's eventual engagement that had already arrived by the end of that window, averaged over your posts.

| Field | Meaning |
| --- | --- |
| `bucket_order` | Position from `0` (soonest after publishing) to `6` (latest). Sort on this, not on the label |
| `bucket_label` | Human-readable name of the window, ready for a chart axis |
| `avg_pct_of_final` | Average percentage (0 to 100) of final engagement reached by then |
| `post_count` | Posts with data for that bucket |

The curve only ever rises. A steep start followed by a flat line means your posts burn out fast; a slow climb means they keep earning for days.

## What to do with it

- **Report at the right moment.** If 90% of engagement arrives in the first two windows, a "how did it do" report can run then without waiting a week.
- **Time a boost.** Boosting while a post is still climbing gets more organic lift than boosting a flat one. See [Boost a post](https://pozy.ai/docs/ads/boost-posts).
- **Space reposts.** Repost or recycle once the curve flattens, not before. See [Queues](https://pozy.ai/docs/publishing/queues).
- **Compare platforms.** Run it once per `platform`. Short-lived feeds and search-driven platforms usually look very different.

## Filters

| Parameter | Use |
| --- | --- |
| `platform` | One platform. Recommended, since mixing platforms blurs the curve |
| `profileId`, `accountId` | One customer profile or one account |
| `source` | `all` (default), `pozy` or `external` |

## Related: one post over time

The decay curve averages many posts. To see one post's own growth, use [`GET /v1/analytics/post-timeline`](https://pozy.ai/docs/api/getPostTimeline), which returns daily rows per platform since it was published. See [Post analytics](https://pozy.ai/docs/analytics/post-analytics#day-by-day).

## Endpoints

| Endpoint | What it does |
| --- | --- |
| [`GET /v1/analytics/content-decay`](https://pozy.ai/docs/api/getContentDecay) | Get content performance decay |
| [`GET /v1/analytics/post-timeline`](https://pozy.ai/docs/api/getPostTimeline) | Get post analytics timeline |
| [`GET /v1/analytics/posting-frequency`](https://pozy.ai/docs/api/getPostingFrequency) | Get frequency vs engagement |
