API REFERENCE
Get Chats
On this page
/api/chatsReturns chats for the authenticated account. Personal Bearer tokens see only the caller's chats; org keys see chats across the org's member accounts; admin keys see all chats. Each row carries the chat id and the session id needed to build the chat URL.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/chats' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Parameters
Query parameters
artist_account_idstringOptional. Filter chats to only include those whose owning session's artistId matches the supplied artist account id. Combine with account_id to scope by both owner and artist.
account_idstringFilter to a specific account. Only applicable when the authenticated account has access to multiple accounts via organization membership.
Responses
200Chats retrieved successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
chatsarray<ChatRoom>requiredArray of chat objects
Item properties for chats
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 query parameters+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
401Unauthorized - invalid or missing API key+
application/json
errorintegerrequiredformat: int32
messagestringrequired403Forbidden - account_id is not a member of the organization or account tried to filter by an account_id they don't have access to+
application/json
errorintegerrequiredformat: int32
messagestringrequiredFull specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download research.jsonView operation source
{
"description": "Returns chats for the authenticated account. Personal Bearer tokens see only the caller's chats; org keys see chats across the org's member accounts; admin keys see all chats. Each row carries the chat id and the session id needed to build the chat URL.",
"parameters": [
{
"name": "artist_account_id",
"in": "query",
"description": "Optional. Filter chats to only include those whose owning session's `artistId` matches the supplied artist account id. Combine with `account_id` to scope by both owner and artist.",
"required": false,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "account_id",
"in": "query",
"description": "Filter to a specific account. Only applicable when the authenticated account has access to multiple accounts via organization membership.",
"required": false,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Chats retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatsResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid query parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatsErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - account_id is not a member of the organization or account tried to filter by an account_id they don't have access to",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}