Get Chats API
Retrieve chat rooms (conversations) for a specific account. Provide an account_id to scope the results, and optionally filter by an artist_account_id. The endpoint returns metadata about each room, including the topic, associated artist, and last updated timestamp.
Endpoint
GET https://api.recoupable.com/api/chatsParameters
| Name | Type | Required | Description |
|---|---|---|---|
| account_id | string | Yes | UUID of the account whose chats to retrieve |
| artist_account_id | string | No | Optional. Filter chats to only include those for the specified artist. |
Request Examples
cURL
# Get all chats for an account
curl -X GET "https://api.recoupable.com/api/chats?account_id=848cd58d-700f-4b38-ab4c-d9f52a1b2c3d" \
-H "Content-Type: application/json"
# Filter chats by artist_account_id
curl -X GET "https://api.recoupable.com/api/chats?account_id=848cd58d-700f-4b38-ab4c-d9f52a1b2c3d&artist_account_id=1873859c-dd37-4e9a-9bac-80d35a1b2c3d" \
-H "Content-Type: application/json"Response Format
{
"status": "success",
"chats": [
{
"id": "f1b2c3d4-5678-4abc-9def-1234567890ab",
"account_id": "848cd58d-700f-4b38-ab4c-d9f52a1b2c3d",
"topic": "Release planning",
"updated_at": "2025-01-15T18:27:42.123Z",
"artist_id": "1873859c-dd37-4e9a-9bac-80d35a1b2c3d"
},
{
"id": "09e87d65-4321-4abc-9def-0987654321aa",
"account_id": "848cd58d-700f-4b38-ab4c-d9f52a1b2c3d",
"topic": null,
"updated_at": "2025-01-12T09:05:11.987Z",
"artist_id": null
}
]
}Response Properties
| Property | Type | Description |
|---|---|---|
| status | string | "success" or "error" |
| chats | array | Array of chat room objects |
| error | string | Error message when status is "error" |
| chats[].id | string | UUID of the chat room |
| chats[].account_id | string | UUID of the associated account (can be null if not set) |
| chats[].topic | string | Optional topic or description of the room (null if not provided) |
| chats[].updated_at | string | ISO timestamp of the last update to the room |
| chats[].artist_id | string | UUID of the associated artist account (null when not applicable) |