From 640d48b23ce18b0e8280230499a31a24f959c945 Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Fri, 29 May 2026 20:59:02 -0500 Subject: [PATCH] docs(sessions): add optional artistId to POST /api/sessions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pairs with api#628 (accept artistId on POST /api/sessions) and database#27 (sessions.artist_id column). - CreateSessionRequest.properties.artistId: optional UUID — caller sets the artist context the session is created in. - Session.properties.artistId: nullable UUID — surfaces on every Session response, so clients that filter by artist (e.g. chat sidebar) can read it directly. Note: jq's pretty-print also normalized a `PatchSessionChatBody.anyOf` block from compact to multi-line form. Whitespace only; contract unchanged. Left as-is to match the rest of the file's style. Co-Authored-By: Claude Opus 4.7 (1M context) --- api-reference/openapi/sessions.json | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/api-reference/openapi/sessions.json b/api-reference/openapi/sessions.json index 1c930e7..a4aab6f 100644 --- a/api-reference/openapi/sessions.json +++ b/api-reference/openapi/sessions.json @@ -738,6 +738,11 @@ "type": "string", "format": "uuid", "description": "Recoupable organization id. When provided, the session is created against the org's workspace repo (`recoupable/`) and the caller must have access to that organization. When omitted, the session is personal and uses the caller's own workspace repo (`recoupable/`)." + }, + "artistId": { + "type": "string", + "format": "uuid", + "description": "Artist account id to associate the session with. When provided, the session is created in the context of that artist — used by the chat sidebar to filter chats by artist. Optional; omit for a session with no artist context." } } }, @@ -945,8 +950,16 @@ "description": "Body for `PATCH /api/sessions/{sessionId}/chats/{chatId}`. At least one of `title` or `modelId` must be provided; whichever is provided is trimmed and must be non-empty after trimming.", "additionalProperties": false, "anyOf": [ - { "required": ["title"] }, - { "required": ["modelId"] } + { + "required": [ + "title" + ] + }, + { + "required": [ + "modelId" + ] + } ], "properties": { "title": { @@ -1221,6 +1234,12 @@ "updatedAt": { "type": "string", "format": "date-time" + }, + "artistId": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "Artist account id this session was created in the context of, or `null` when no artist was associated. Set via `POST /api/sessions { artistId }`; surfaces here for clients (e.g. the chat sidebar) that filter sessions/chats by artist." } } },