Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

docs: GET /api/posts/{id}/stats (Get Post Stats) - #413

Merged
sweetmantech merged 6 commits into
mainfrom
claude/post-stats
Oct 25, 2026
Merged

sweetmantech merged 6 commits into
mainfrom
claude/post-stats

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Part of recoupable/app#2351.

Publication copy of the maintained source in recoupable/marketing#238 (7bdf704), synced with scripts/sync-legacy-docs.py as DOCUMENTATION-POLICY.md requires.

What changes

  • api-reference/openapi/social.json: new GET /api/posts/{id}/stats mirroring Get Post (same security, id path param, PostErrorResponse), plus PostStats and PostStatsResponse schemas. Additive only.
  • Responses: 200 { "status": "success", "stats": PostStats }; 400 bad uuid; 401; 403 no access to the post's account; 404; 409 not published yet or LinkedIn not connected (checked before 422); 422 unsupported platform, LinkedIn personal post, or non-LinkedIn post_url; 502 LinkedIn rejected the read; 500. Reads cost no credits. LinkedIn company-page posts only for now.
  • New page api-reference/publishing/stats.mdx; nav entry after Get Post.
  • SOURCE-PROVENANCE.json re-pinned to marketing 7bdf704; llms-full.txt regenerated.

Verified

python3 scripts/check_source.py --source <marketing@7bdf704> and scripts/test_check_source.py pass; all JSON files parse. No local Mintlify preview was run.

Merge order

docs → api → skills. Merge recoupable/marketing#238 first; if its commit changes before merge (for example the API fixture re-pin), re-sync this copy from the merged commit.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added API reference documentation for a post-stats endpoint marked pending release. It describes fresh, credit-free stats reads for LinkedIn company-page posts, including supported metrics and cases where values may be unavailable.
    • Documented the endpoint’s access requirements, response timestamps, supported post types, and error responses, and added the page to the Publishing navigation.

Publication copy of recoupable/marketing#238 (7bdf704).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1e8d4460-615b-4759-8ded-c0d8992e08c1
Commits

Reviewing files that changed from the base of the PR and between 0ffedf2 and f43e1b4.

Files selected for processing: 4
  • SOURCE-PROVENANCE.json
  • api-reference/openapi/social.json
  • api-reference/publishing/stats.mdx
  • llms-full.txt

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4c1fcfce-1219-4720-a6b8-aa31f84e902e
Commits

Reviewing files that changed from the base of the PR and between 719aabf and 0ffedf2.

Files selected for processing: 5
  • SOURCE-PROVENANCE.json
  • api-reference/openapi/social.json
  • api-reference/publishing/stats.mdx
  • docs.json
  • llms-full.txt

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The documentation adds a pending GET /api/posts/{id}/stats endpoint for LinkedIn company-page posts. It describes authentication, supported post types, response schemas, and error codes. A publishing reference page and navigation entry are also added.

Changes: Post Stats API Documentation

Layer / File(s) Summary
Post stats API contract
api-reference/openapi/social.json, llms-full.txt
The OpenAPI reference and full-text documentation describe the endpoint, its responses, and the stats data shape.
Publishing reference and provenance
api-reference/publishing/stats.mdx, docs.json, SOURCE-PROVENANCE.json
The publishing page and navigation include the endpoint. The provenance manifest records updated hashes and the new page.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

  • recoupable/app#2351 — Defines the same post stats endpoint contract documented in this PR.
  • recoupable/mono#319 — Calls for maintained public documentation and public route reconciliation; this PR documents a public API route.
  • recoupable/mono#318 — Covers public documentation and API contract reconciliation; this PR adds a synchronized API contract.

Suggested reviewers: sidneyswift

Merge Risk: Minimal · up to 0ffed

No actionable issue was established in the new Post Stats documentation; it is mergeable after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the documentation change and names the added GET /api/posts/{id}/stats endpoint. It accurately summarizes the primary change.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (5 skipped: 5 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

sweetmantech and others added 2 commits October 25, 2026 12:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sweetmantech

Copy link
Copy Markdown
Collaborator Author

Synced from marketing#238 (b72c2e8); check_source.py matches. Rendered-page verification with screenshots: recoupable/marketing#238 (comment above). Contract matches the live api#1153 preview field for field.

sweetmantech and others added 2 commits October 25, 2026 12:41
…+ 402)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sweetmantech

Copy link
Copy Markdown
Collaborator Author

Re-synced from marketing#238 4e5ceb0 (pricing + 402). Rendered-page check with screenshots on marketing#238.

…keting#238)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sweetmantech
sweetmantech merged commit 7d8ace4 into main Oct 25, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant