Get Post Analytics
Get per-post analytics over a date range. Requires a paid Creator or Lifetime plan.
GET /v1/analytics/posts returns per-post performance for recently published posts, over the window given by date_range, capped by limit. It is the breakdown behind the totals in GET /v1/analytics.
Use it to rank your own posts by engagement, to feed a weekly report, or to close the loop on a scheduling workflow — publish through /v1/posts and read the outcome back here.
Example request
Authenticate with a bearer token in the Authorization header. Create a key on the API page in your LinkedMash settings and export it as LINKEDMASH_API_KEY before running this.
curl "https://api.linkedmash.com/v1/analytics/posts?date_range=30d&limit=10" \
-H "Authorization: Bearer $LINKEDMASH_API_KEY"Header parameters
Your secret API key as a Bearer token.
Query parameters
Combine these parameters to narrow your results.
Date range to summarize, e.g. 7d, 30d, or 90d.
Maximum number of posts to return.
Response
{
"status": true,
"data": [
{
"id": "7336731872414035968",
"text": "5 lessons from shipping every week for a year:",
"impressions": 18420,
"engagements": 742,
"likes": 531,
"comments": 96
}
]
}Response fields
Every response is wrapped in the same envelope: a status flag and a data payload, with meta present where there is pagination or a plan limit to report.
true on success. Every LinkedMash API response carries this envelope flag alongside data, so a client can branch on it without re-reading the HTTP status.
Published posts inside the window, capped by limit.
The LinkedIn activity id of the published post.
The published body, for identifying the post without a second lookup.
Impressions for this post.
All interactions combined — the denominator-free number to rank on.
Reactions on this post.
Comments on this post.
Ranking your own posts
The per-post view is what turns analytics into a decision about what to write next.
Pull a window wide enough to compare
date_range of 30d or 90d gives enough posts for the ranking to mean something. A week of posts is usually too few to separate signal from timing.
Raise limit before widening the range
limit caps how many posts come back inside the window, so a long range with a small limit silently drops the older half. Set limit to at least the number of posts you published in the period.
Rank on engagements, not impressions
Impressions mostly track distribution. engagements is the field that reflects whether the post actually landed.
Join back to your drafts
The id here is the published LinkedIn activity id. Storing it against the draft id at publish time is what lets you attribute performance back to a specific draft.
Behaviour and limits
Requires a Creator or Lifetime plan
Everything under /v1/posts, /v1/queue, /v1/schedule, /v1/media and /v1/analytics sits behind one middleware that checks for an unlocked Studio, so a Reader-plan or free key gets 402 with code SUBSCRIPTION_REQUIRED before the handler runs. Bookmark and label reads are on a separate router and are not affected by this gate.
Covers published posts, not drafts
Only posts that actually went out to LinkedIn have metrics. Drafts and queued posts do not appear here, whatever their status in /v1/posts.
date_range and limit interact
limit caps how many posts come back within the window, so a small limit on a long window silently drops the older posts. Widen limit before widening date_range if you want completeness.
Metrics lag publication
LinkedIn does not report engagement instantly. A post published minutes ago will show near-zero numbers that are not yet meaningful.
Errors
Failures carry the same envelope as a success, with the reason in message and a stable machine-readable code where the status alone is ambiguous — several distinct conditions share a 402.