Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions SOURCE-PROVENANCE.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"repository": "recoupable/marketing",
"commit": "c52d2a5bf5670109da6350f01aede45957c1b978",
"commit": "a6fd468f8bd2c2de8472c0ee6c13cf4bd550e5a0",
"sourceDirectory": "content/docs/source",
"files": [
{
Expand Down Expand Up @@ -536,7 +536,7 @@
{
"path": "api-reference/openapi/social.json",
"sourcePath": "content/docs/source/api-reference/openapi/social.json",
"sha256": "49c837327886827b5bc33ae4daac76f12473ecf4a6f75cc073656e9247ba73ca"
"sha256": "dfda1239843c4e110d24e4ca05c45a9e7124513415f53ea241a8a8c008cf6bd7"
},
{
"path": "api-reference/openapi/templates.json",
Expand Down Expand Up @@ -688,6 +688,11 @@
"sourcePath": "content/docs/source/api-reference/publishing/list.mdx",
"sha256": "3857ddd70fe560668d6adeffedfb8ec90af507aa82485ad196c9307430e50d5c"
},
{
"path": "api-reference/publishing/stats.mdx",
"sourcePath": "content/docs/source/api-reference/publishing/stats.mdx",
"sha256": "89b68eaa4ec17166fe99bb15afc2dbd6d40523f99817f5481b5120e358ceb596"
},
{
"path": "api-reference/pulses/list.mdx",
"sourcePath": "content/docs/source/api-reference/pulses/list.mdx",
Expand Down Expand Up @@ -1166,7 +1171,7 @@
{
"path": "llms-full.txt",
"sourcePath": "content/docs/source/llms-full.txt",
"sha256": "590a6dd9a2e10b44a981f322a1047fd336906a3de0e2680ec0f35ce10b6baeb1"
"sha256": "3b75c4ddb284674d74ad14ed9d77f9617aea355643e4c1090cc1baec683578c0"
},
{
"path": "llms.txt",
Expand Down Expand Up @@ -1229,7 +1234,7 @@
"sha256": "df08b22bdc866daaf6adfbdfaafac47859f1281449841990d0e2af499a1e2d7d"
}
],
"navigationSha256": "f6aa36d99ea011ba47a7ea23874c76c1037c349cbe2bb70f5a505f9cebfc4621",
"navigationSha256": "06d8646887b528e6cb886f22eac6cf86906539d56b462980b654f55aa77821ef",
"hostSpecific": [
"docs.json theme, colors, navbar, footer, logo and host settings"
],
Expand Down
245 changes: 245 additions & 0 deletions api-reference/openapi/social.json
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,136 @@
}
}
}
},
"/api/posts/{id}/stats": {
"get": {
"operationId": "getPostsByIdStats",
"summary": "Get post stats",
"x-recoup-availability": "pending",
"description": "Pending API release. The platform's own analytics for one post published with [Create Post](/api-reference/publishing/create), read live through the same connection that published it. Currently LinkedIn company-page posts only; other platforms and LinkedIn personal (member) posts return 422. Each call is a fresh read and `as_of` records when it happened. Each successful read costs $0.001 (1,000 credits), charged to the caller after LinkedIn returns the numbers. Credits are checked first; a request that fails (4xx/5xx) is not charged.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The post's id, from [Create Post](/api-reference/publishing/create)."
}
],
"responses": {
"200": {
"description": "The post's current stats.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostStatsResponse"
}
}
}
},
"400": {
"description": "`id` is not a valid uuid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"402": {
"description": "Insufficient credits: the account has less than the $0.001 a read costs. Returned after the 400/401/403/404/409/422 checks and before LinkedIn is called, so nothing is read and nothing is charged.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SocialInsufficientCreditsResponse"
}
}
}
},
"403": {
"description": "Access denied to this post's account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"404": {
"description": "No post with that id.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"409": {
"description": "The post cannot be read yet. Either it is not published (its status is not `posted` or it has no `post_url`; error `Post is not published yet, so it has no stats`), or the platform is not connected for the post's account (error `linkedin is not connected for this account`). This is checked before 422, so an unpublished post on any platform returns 409.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"422": {
"description": "Stats are not supported for this post. Only LinkedIn company-page posts are supported today. Errors: `Stats are not available for <platform> posts yet` (any other platform), `Stats are available for LinkedIn company-page posts only` (a LinkedIn personal post), `post_url does not name a LinkedIn post`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"502": {
"description": "The platform rejected the stats read, for example because the connection lacks analytics access (error `LinkedIn rejected the stats read for this post`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -3839,6 +3969,121 @@
}
}
},
"PostStats": {
"type": "object",
"required": [
"post_id",
"platform",
"post_url",
"impressions",
"unique_impressions",
"clicks",
"likes",
"comments",
"shares",
"engagement",
"as_of"
],
"properties": {
"post_id": {
"type": "string",
"format": "uuid",
"description": "The post's id.",
"example": "3f8e2c1a-5b7d-4e9f-a1c2-6d4b8e0f2a91"
},
"platform": {
"type": "string",
"description": "The platform the post was published to.",
"example": "linkedin"
},
"post_url": {
"type": "string",
"description": "The live post's URL.",
"example": "https://www.linkedin.com/feed/update/urn:li:share:7389012345678901248"
},
"impressions": {
"type": [
"integer",
"null"
],
"description": "Times the post was shown. `null` when the platform does not report it.",
"example": 412
},
"unique_impressions": {
"type": [
"integer",
"null"
],
"description": "Distinct members the post was shown to. `null` when the platform does not report it.",
"example": 287
},
"clicks": {
"type": [
"integer",
"null"
],
"description": "Clicks on the post's content, company name or logo. `null` when the platform does not report it.",
"example": 19
},
"likes": {
"type": [
"integer",
"null"
],
"description": "Likes (reactions). `null` when the platform does not report it.",
"example": 14
},
"comments": {
"type": [
"integer",
"null"
],
"description": "Comments. `null` when the platform does not report it.",
"example": 3
},
"shares": {
"type": [
"integer",
"null"
],
"description": "Reposts. `null` when the platform does not report it.",
"example": 2
},
"engagement": {
"type": [
"number",
"null"
],
"description": "LinkedIn's engagement rate for the post, from 0 to 1. `null` when the platform does not report it.",
"example": 0.0922
},
"as_of": {
"type": "string",
"format": "date-time",
"description": "Server time of the read.",
"example": "2026-10-25T18:04:12Z"
}
}
},
"PostStatsResponse": {
"type": "object",
"required": [
"status",
"stats"
],
"properties": {
"status": {
"type": "string",
"enum": [
"success"
],
"description": "Status of the request"
},
"stats": {
"$ref": "#/components/schemas/PostStats"
}
}
},
"PostListResponse": {
"type": "object",
"properties": {
Expand Down
8 changes: 8 additions & 0 deletions api-reference/publishing/stats.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: 'Get Post Stats'
openapi: "/api-reference/openapi/social.json GET /api/posts/{id}/stats"
---

## Data coverage

LinkedIn reports organic activity only, within a rolling 12-month window; a post older than 12 months returns what LinkedIn still holds.
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@
"api-reference/publishing/create",
"api-reference/publishing/list",
"api-reference/publishing/get",
"api-reference/publishing/stats",
"api-reference/publishing/cancel"
]
}
Expand Down
Loading
Loading