---
title: "Get post statistics"
method: POST
path: "/get_post_stats"
tags: ["Read"]
---

# Get post statistics

`POST /get_post_stats`

## Request

- Base URL: `https://pdb.postpen.ai/functions/v1/agent-api`
- URL: `https://pdb.postpen.ai/functions/v1/agent-api/get_post_stats`
- Auth: HTTP bearer

Reads engagement for one published post from LinkedIn: impressions, reach (unique viewers), reactions, comments, and reposts, plus clicks for company page posts. Also returns engagement_rate (reactions, comments and reposts per 100 impressions; null under 100 impressions), comment_share (percent of the engagement that is comments), early (true while the post is under a day old), and attributes (format, length, hashtags, link, first comment, company tags). get_insights compares recent posts with what is usual for the account. Numbers are lifetime totals and LinkedIn can lag by a few hours. A value is null when LinkedIn did not return it. needs_reconnect true means the LinkedIn connection lacks the analytics permission; the account owner reconnects LinkedIn in PostPen to grant it. Only posts with status sent have statistics.

## Request body

- object
  - `id` string, required: Id of a published post, from list_posts status sent.

## Response `200`

Success. JSON object; never contains LinkedIn tokens.

- object

## Other responses

- `400`: Invalid input, or a confirm: true guard was not met.
- `401`: Missing or invalid API key.
- `402`: Plan limit reached (for example the Free plan's monthly post cap).
- `403`: Destination not allowed for this account or plan.

---

[API](https://skmtc.dev/postpen/apis/postpen-agent-api.md) · [All operations](https://skmtc.dev/postpen/apis/postpen-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postpen/apis/postpen-agent-api/revisions/2b07a2e1bfe7?raw)
