docs(posts): artist_account_id; account_id is the account charged, never an artist (app#2248)

Merged
SW
1d ago
+32-9

Implements the docs step of app#2248 (contract first). Decision 2026-10-19: credits are charged to the resolved account_id, never an artist; the artist a post goes out from is its own field.

content/docs/source/api-reference/openapi/social.json

  • CreatePostRequest: new optional artist_account_id (uuid): the artist within the account whose connected social account posts; the account must have access; never charged. account_id reworded: the account the post is made in and charged to; defaults to the caller; must not be an artist.
  • Post: artist_account_id (uuid or null); account_id = account made in and charged.
  • GET /api/posts: artist_account_id filter.
  • Create Post description: "$0.01, charged to the account the post is made in (account_id, or the calling account when omitted), never to the artist"; connection sentence names the artist.
  • 400 adds an account_id that is an artist; 403 adds an artist_account_id the account cannot access; 409 names the artist's connection.
  • Inventory and examples pinned to api#1046 head 9cf09f2 (its fixture holds this social.json hash).

Merge order: this → database#117 → api → docs publication copy.

Checks: refresh-contract-inventory --check, build-contract-examples --check, test_response_contracts.py, docs:build, docs:check (11/11) pass locally. Preview screenshots follow once all three PRs are open.

🤖 Generated with Claude Code


Summary by cubic

Contracts the posts API behavior from app#2248: posts are charged to the resolved account_id, never to an artist, and the artist whose connection posts becomes a separate artist_account_id field.

  • Adds optional artist_account_id to CreatePostRequest, Post, and the GET /api/posts filter.
  • Rewords account_id as the account the post is made in and charged to; must not be an artist.
  • Updates the 400, 403, and 409 descriptions for artist-account cases.
  • Pins the contract inventory and examples to the api PR head.

Merge this before database#117, then api, then the docs publication copy.

Summary by CodeRabbit

  • New Features
    • The social publishing API now supports posting through a selected artist’s connected social account, while clearly identifying the account responsible for the post.
    • Post listings can now be filtered by artist account.
    • API documentation now clarifies artist-account validation, access-denied responses, and disconnected-platform errors.
    • Post details now distinguish the account charged for publishing from the artist account used for the connected social platform.