docs(catalogs): POST /api/catalogs accepts an optional organization_id owner (chat#1938)
Contract for item 2 of recoupable/chat#1938. Docs lead the api PR.
What this documents
POST /api/catalogs gains an optional organization_id. When present, the catalog is owned by that organization rather than by the calling account, so every member sees it via Get Catalogs without passing the organization's id. The caller must be a member of the organization; otherwise 403.
Omitting organization_id is byte-identical to today's behaviour.
Three edits:
CreateCatalogRequest— new optionalorganization_idproperty, and the schema description no longer claims the owner "is taken from the request credentials, never from this body"- operation
description— notes the org-owned option, and clarifies that the roster attach still targets the calling account even when the catalog is org-owned (the person who ran it gets the artist on their roster; the catalog goes to the org) 403— previously described only "the snapshot belongs to a different account"; now also covers non-membership of the named organization
Sequencing
This is the write half of chat#1938 and is useless until the read half can surface what it creates — docs#288 → api#815 land first.
No schema change anywhere in this issue. An organization is a row in accounts, so account_catalogs.account can already hold an organization id — this is purely a read-path and write-path change.
Scope
Org catalogs are a new concept; no existing catalog changes. On prod today 0 of 117 account_catalogs rows are org-owned, and nothing here migrates or re-links any of them.
Verification
releases.json parses and still carries all 18 paths; organization_id is present on CreateCatalogRequest. Diff is one new property plus two description strings — no path, response-code, or existing-schema removals. catalogs-create.mdx stays frontmatter-only per the repo convention.
Summary by cubic
Allow creating organization-owned catalogs by adding an optional organization_id to POST /api/catalogs. Org-owned catalogs appear in all members’ Get Catalogs; omit the field to keep current behavior.
- New Features
- Added organization_id to CreateCatalogRequest to create a catalog owned by the named organization. Visible to all org members; caller must be a member or the request returns 403.
- Clarified that the snapshot’s artist attach always targets the calling account, even when the catalog is org-owned.