API REFERENCE
Update Chat
On this page
/api/chatsUpdate a chat room's topic (display name). The chatId is required; the topic field will be updated. Topic must be between 3 and 50 characters.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request PATCH \
--url 'https://api.recoupable.dev/api/chats' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"chatId": "YOUR_ID",
"topic": "string"
}'Request body required
Chat fields to update
application/json
chatIdstringrequiredThe unique identifier (UUID) of the chat room to update
format: uuid
topicstringrequiredThe new display name for the chat room. Must be between 3 and 50 characters.
minLength: 3 · maxLength: 50
Responses
200Chat updated successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
chatobjectrequiredThe updated chat room object
Properties for chat
idstringrequiredChat id.
format: uuid
titlestringrequiredDisplay title for the chat.
accountIdstringrequiredOwning account for this chat.
format: uuid
sessionIdstringrequiredSession that owns this chat. Combine with id to build the chat URL: /sessions/{sessionId}/chats/{id}.
format: uuid
updatedAtstringrequiredISO timestamp of the last update.
format: date-time
artistIdstringnullableArtist account id this chat's session was created in the context of, or null when no artist was associated. Inherited from sessions.artist_id on the owning session.
format: uuid
400Bad request - invalid parameters or validation error+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
401Unauthorized - invalid or missing API key+
application/json
errorintegerrequiredformat: int32
messagestringrequired403Forbidden - API key does not have access to this chat+
application/json
errorintegerrequiredformat: int32
messagestringrequired404Not found - chat room does not exist+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download research.jsonView operation source
{
"description": "Update a chat room's topic (display name). The chatId is required; the topic field will be updated. Topic must be between 3 and 50 characters.",
"requestBody": {
"description": "Chat fields to update",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateChatRequest"
}
}
}
},
"responses": {
"200": {
"description": "Chat updated successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateChatResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid parameters or validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateChatErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - API key does not have access to this chat",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found - chat room does not exist",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateChatErrorResponse"
}
}
}
}
}
}