API REFERENCE
Create Chat
On this page
/api/chatsCreate a new chat room. Optionally associate it with an artist and/or provide a client-generated chat ID. Pass accountId to create a chat on behalf of a specific account the API key has access to.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/chats' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"artistId": "YOUR_ID",
"chatId": "YOUR_ID",
"accountId": "YOUR_ID",
"topic": "string"
}'Request body
Chat creation parameters
application/json
artistIdstringUUID of the artist account the chat is associated with
format: uuid
chatIdstringUUID for the new chat (client-generated). If not provided, one will be generated automatically.
format: uuid
accountIdstringUUID of the account to create the chat for. Only applicable when the authenticated account has access to multiple accounts via organization membership. If not provided, the chat is created for the API key's own account.
format: uuid
topicstringTopic name for the new chat room (e.g., 'Pulse Feb 2'). To edit the topic of an existing room, use PATCH /api/chats.
Responses
200Chat created successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
chatobjectrequiredThe created 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 - failed to create chat+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
403Forbidden - API key does not have access to the specified accountId+
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": "Create a new chat room. Optionally associate it with an artist and/or provide a client-generated chat ID. Pass accountId to create a chat on behalf of a specific account the API key has access to.",
"requestBody": {
"description": "Chat creation parameters",
"required": false,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateChatRequest"
}
}
}
},
"responses": {
"200": {
"description": "Chat created successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateChatResponse"
}
}
}
},
"400": {
"description": "Bad request - failed to create chat",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateChatErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - API key does not have access to the specified accountId",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateChatErrorResponse"
}
}
}
}
}
}