diff --git a/api-reference/chat/artist.mdx b/api-reference/chat/artist.mdx new file mode 100644 index 0000000..998f1fd --- /dev/null +++ b/api-reference/chat/artist.mdx @@ -0,0 +1,4 @@ +--- +title: "Get Chat Artist" +openapi: "/api-reference/openapi.json GET /api/chats/{id}/artist" +--- diff --git a/api-reference/openapi.json b/api-reference/openapi.json index 8fea02f..95da674 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -1245,6 +1245,65 @@ } } }, + "/api/chats/{id}/artist": { + "get": { + "description": "Retrieve the artist associated with a specific chat room. Returns 404 if the chat does not exist or is not accessible by the authenticated caller.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The unique identifier (UUID) of the chat room.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Chat artist resolved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetChatArtistResponse" + } + } + } + }, + "400": { + "description": "Bad request - invalid chat id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetChatArtistErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized - invalid or missing credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found - chat does not exist or is not accessible", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetChatArtistErrorResponse" + } + } + } + } + } + } + }, "/api/chats/compact": { "post": { "description": "Compact one or more chat conversations into summarized versions. This reduces the size of chat history while preserving key information. Optionally provide a prompt to control what information gets preserved in the compacted summary.", @@ -6436,6 +6495,59 @@ } } }, + "GetChatArtistResponse": { + "type": "object", + "required": [ + "status", + "room_id", + "artist_id", + "artist_exists" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "success" + ], + "description": "Status of the request" + }, + "room_id": { + "type": "string", + "format": "uuid", + "description": "UUID of the chat room" + }, + "artist_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "UUID of the artist account associated with the chat, or null when no artist is linked" + }, + "artist_exists": { + "type": "boolean", + "description": "Whether an artist is linked to the chat room" + } + } + }, + "GetChatArtistErrorResponse": { + "type": "object", + "required": [ + "status", + "error" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ], + "description": "Status of the request" + }, + "error": { + "type": "string", + "description": "Error message describing what went wrong" + } + } + }, "CreateChatRequest": { "type": "object", "properties": { diff --git a/docs.json b/docs.json index 9a686e2..e317e7f 100644 --- a/docs.json +++ b/docs.json @@ -45,6 +45,7 @@ "group": "Chat", "pages": [ "api-reference/chat/chats", + "api-reference/chat/artist", "api-reference/chat/create", "api-reference/chat/update", "api-reference/chat/generate", @@ -323,4 +324,4 @@ "og:site_name": "Recoup", "twitter:card": "summary_large_image" } -} \ No newline at end of file +}