docs(sessions): add optional artistId to POST /api/sessions

Merged
SW
5mo ago
+21-2

Summary

Pairs with api#628 (accept artistId on POST /api/sessions) and database#27 (sessions.artist_id column, merged + applied).

Two schema additions:

  1. CreateSessionRequest.properties.artistId โ€” optional UUID. Caller sets the artist context the session is created in (used by the chat sidebar to filter chats by artist).
  2. Session.properties.artistId โ€” nullable UUID. Surfaces on every Session response (POST and GET) so clients that filter by artist can read it directly.

Why the Session schema (not just CreateSessionResponse): the same Session shape is referenced by GET /api/sessions, GET /api/sessions/{sessionId}, and the create response โ€” every Session a client receives from now on includes artistId, so the docs should reflect that on the shared definition.

Side-effect

jq pretty-print also normalized one PatchSessionChatBody.anyOf block from compact-single-line to multi-line. Whitespace-only; same JSON, same contract. Left as-is to match the rest of the file's style.

Test plan

  • Mintlify preview renders the new artistId field on the POST /api/sessions request schema.
  • Mintlify preview renders the new artistId field on the response Session object across all three pages that use it (create, get, get-by-id).
  • Spec is valid OpenAPI 3 (jq empty passes; verified pre-push).

๐Ÿค– Generated with Claude Code


Summary by cubic

Add optional artistId to POST /api/sessions and surface artistId on all Session responses. This lets clients create sessions in an artist context and filter sessions/chats by artist.

  • New Features

    • CreateSessionRequest.properties.artistId: optional UUID to set the artist context.
    • Session.properties.artistId: nullable UUID returned on POST/GET session responses.
  • Refactors

    • Pretty-printed one PatchSessionChatBody.anyOf block; contract unchanged.