GET /api/v1/metrics/summary
Compact KPI snapshot + top N posts by impressions. Query paramsfollowers.gained is the sum of LinkedIn’s follower snapshots only when the
whole selected period is covered. It is null, not 0, when coverage is
partial or unavailable. followers.available_range_gained contains the sum
for the explicit coverage.date_from to coverage.date_to range.
Use coverage.complete and data_available to distinguish full coverage,
partial history, missing data, and measured zero growth. The all period
cannot guarantee lifetime coverage and therefore returns gained: null.
followers.daily contains the profile’s total followers gained for each
available day. These values are not attributed to individual posts. For a
daily roll-up, request a multi-day period such as 7d or 30d once and use
the returned points instead of making one 1d request per day.
GET /api/v1/linkedin-post-metrics
List per-post metrics for the connected LinkedIn profile over an inclusive date range. This includes posts published natively on LinkedIn and posts published through MagicPost once they have been imported into MagicPost analytics. Query paramsnext_cursor while has_more is true.
linkedin_activity_id is the stable identifier used by the MagicPost LinkedIn
analytics store. linkedin_post_id can be null for some native or company
posts. Neither identifier is a MagicPost post UUID. impressions_available
distinguishes an uncollected impression count (null) from a measured value
of 0.
GET /api/v1/metrics/freshness
Check the latest stored LinkedIn post-metrics timestamp without triggering a refresh. Use this endpoint before/refresh-posts.
should_refresh is false. If no metrics timestamp is
available, data_available is false and should_refresh is true.
POST /api/v1/refresh-posts
Trigger a fresh pull of LinkedIn data. Rate-limited at 5 req/min.job_id to poll the status endpoint until completion.
GET /api/v1/refresh-posts/<job_id>
Poll refresh job status.status is one of pending, running, finished, success, error.
Returns 404 if the job doesn’t exist OR was started by another user.