The metrics endpoints give you access to your LinkedIn analytics data stored in MagicPost. UseDocumentation Index
Fetch the complete documentation index at: https://dev.magicpost.in/llms.txt
Use this file to discover all available pages before exploring further.
GET /metrics/summary for a compact KPI snapshot, and POST /refresh-posts when you need to pull the latest data directly from LinkedIn before querying.
GET /api/v1/metrics/summary
Returns aggregated analytics for a given time period, including totals, per-post averages, and your top-performing posts by impressions. Query parameters| Parameter | Type | Default | Description |
|---|---|---|---|
period | string | 30d | Time window: 7d, 30d, 90d, 180d, or all. |
top_n | integer | 5 | Number of top posts to return. Clamped to 1–20. |
access.impressions_access will be false if your LinkedIn account hasn’t granted MagicPost analytics permissions. In that case, impression counts will be null.
POST /api/v1/refresh-posts
Triggers an asynchronous pull of your latest LinkedIn post data. Use this before queryingGET /metrics/summary when you need up-to-date analytics.
This endpoint is rate-limited to 5 requests per minute per token, because each call makes outbound requests to the LinkedIn API.
job_id to poll GET /api/v1/refresh-posts/<job_id> until status reaches a terminal state.
GET /api/v1/refresh-posts/<job_id>
Poll the status of a refresh job started byPOST /api/v1/refresh-posts.
| Value | Description |
|---|---|
pending | Job queued, not yet started. |
running | Actively pulling data from LinkedIn. |
finished | Completed successfully. |
success | Alias for finished in some responses. |
error | Job failed. Check the error field for details. |
404 if the job ID doesn’t exist or was started by a different user.