ChatApi
All URIs are relative to https://business.apis.kesk.app/v1Â
| Method | HTTP request | Description |
|---|---|---|
| addChatReaction | POST /chat/sessions/{chat_session_id}/messages/{message_id}/reactions | |
| deleteChatMedia | DELETE /chat/sessions/{chat_session_id}/media/{media_id} | Delete media from a chat session |
| deleteChatMessage | DELETE /chat/sessions/{chat_session_id}/messages/{message_id} | |
| editChatMessage | PUT /chat/sessions/{chat_session_id}/messages/{message_id} | |
| getBotConversationStatus | GET /chat/bots/{bot_username}/status | |
| getBotSuggestions | GET /chat/bots/{bot_username}/suggestions | |
| getChatMedia | GET /chat/sessions/{chat_session_id}/media/{media_id} | Get a specific media item from a chat session |
| getChatMessageHistory | GET /chat/sessions/{chat_session_id}/messages | |
| getSpecificChatMessage | GET /chat/sessions/{chat_session_id}/messages/{message_id} | |
| listChatMedia | GET /chat/sessions/{chat_session_id}/media | List all media in a chat session |
| listChatSessions | GET /chat/sessions | |
| markChatMessagesAsRead | POST /chat/sessions/{chat_session_id}/read | |
| removeChatReaction | DELETE /chat/sessions/{chat_session_id}/messages/{message_id}/reactions | |
| restartBotConversation | POST /chat/bots/{bot_username}/restart | |
| sendBotMessage | POST /chat/bots/{bot_username}/send | |
| sendChatMessage | POST /chat/sessions/{chat_session_id}/messages | |
| sendRagQuery | POST /chat/sessions/{chat_session_id}/rag | |
| startBotConversation | POST /chat/bots/{bot_username}/start | |
| startChat | POST /chat/sessions/start | Start a chat session (RAG with AI assistant or Vendor chat) |
| startDirectChat | POST /chat/sessions/direct | Start a direct chat with another user |
| transferBotToHuman | POST /chat/bots/{bot_username}/transfer | |
| updateChatSessionMetadata | PUT /chat/sessions/{session_id}/metadata | |
| uploadChatMedia | POST /chat/sessions/{chat_session_id}/media | Upload media for a chat session |
addChatReaction
ReactionResponse addChatReaction(chat_session_id, message_id, AddReaction)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| message_id | Long | [default to null] | |
| AddReaction | AddReaction |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
deleteChatMedia
String deleteChatMedia(chat_session_id, media_id)
Delete media from a chat session
Removes a media file from the chat session. Only participants can delete media.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| media_id | Long | [default to null] |
Return type
String
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
deleteChatMessage
ChatMessage deleteChatMessage(chat_session_id, message_id)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| message_id | Long | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
editChatMessage
ChatMessage editChatMessage(chat_session_id, message_id, EditMessage)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| message_id | Long | [default to null] | |
| EditMessage | EditMessage |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
getBotConversationStatus
BotConversationSession getBotConversationStatus(bot_username)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bot_username | String | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
getBotSuggestions
BotSuggestions getBotSuggestions(bot_username, context)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bot_username | String | [default to null] | |
| context | String | [optional] [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
getChatMedia
ChatMediaResponse getChatMedia(chat_session_id, media_id)
Get a specific media item from a chat session
Retrieves information about a specific media file in a chat session, including the URL to download/view the file.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| media_id | Long | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
getChatMessageHistory
PaginatedMessages getChatMessageHistory(chat_session_id, limit, before_message_id)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| limit | Integer | [optional] [default to null] | |
| before_message_id | Long | [optional] [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
getSpecificChatMessage
ChatMessage getSpecificChatMessage(chat_session_id, message_id)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| message_id | Long | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
listChatMedia
List listChatMedia(chat_session_id, limit, offset)
List all media in a chat session
Retrieves a paginated list of all media files in a chat session. Useful for displaying a media gallery view.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| limit | Integer | [optional] [default to null] | |
| offset | Integer | [optional] [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
listChatSessions
PaginatedSessionList listChatSessions(limit, before)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | Integer | [optional] [default to null] | |
| before | String | [optional] [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
markChatMessagesAsRead
GenericSuccess markChatMessagesAsRead(chat_session_id, MarkRead)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| MarkRead | MarkRead |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
removeChatReaction
ReactionResponse removeChatReaction(chat_session_id, message_id, RemoveReaction)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| message_id | Long | [default to null] | |
| RemoveReaction | RemoveReaction |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
restartBotConversation
MessageResponse restartBotConversation(bot_username)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bot_username | String | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
sendBotMessage
ChatMessage sendBotMessage(bot_username, BotInteraction)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bot_username | String | [default to null] | |
| BotInteraction | BotInteraction |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
sendChatMessage
ChatMessage sendChatMessage(chat_session_id, SendMessage)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| SendMessage | SendMessage |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
sendRagQuery
RagQueryResponse sendRagQuery(chat_session_id, RagQueryRequest)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| RagQueryRequest | RagQueryRequest |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
startBotConversation
BotConversationSession startBotConversation(bot_username, StartBotConversation)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bot_username | String | [default to null] | |
| StartBotConversation | StartBotConversation |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
startChat
StartChatResponse startChat(StartChatSessionRequest)
Start a chat session (RAG with AI assistant or Vendor chat)
Unified endpoint to start either a RAG chat with AI assistant or a chat with a vendor. Sessions should only be created when the user sends an actual message. For RAG sessions: Requires `user_type` field. For Vendor sessions: Requires `vendor_location_id` which will be validated.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| StartChatSessionRequest | StartChatSessionRequest |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
startDirectChat
StartChatResponse startDirectChat(StartDirectChat)
Start a direct chat with another user
Creates a new direct chat session (or uses existing one) and sends the first message. This is the preferred way to start a chat - sessions should always be created with a message.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| StartDirectChat | StartDirectChat |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
transferBotToHuman
MessageResponse transferBotToHuman(bot_username, BotTransfer)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bot_username | String | [default to null] | |
| BotTransfer | BotTransfer |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
updateChatSessionMetadata
ChatSessionListItem updateChatSessionMetadata(session_id, UpdateSessionMetadata)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| session_id | Long | [default to null] | |
| UpdateSessionMetadata | UpdateSessionMetadata |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
uploadChatMedia
ChatMediaUploadResponse uploadChatMedia(chat_session_id, file)
Upload media for a chat session
Uploads a file (image, audio, video, or document) to be used in a chat message. Returns media information including the URL to include in the message payload. Supported file types: - Images: jpg, jpeg, png, gif, webp (max 10MB) - Audio: mp3, wav, ogg, m4a (max 25MB) - Video: mp4, mov, avi, mkv, webm (max 100MB) - Files: pdf, doc, docx, xls, xlsx, etc. (max 50MB)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chat_session_id | Long | [default to null] | |
| file | File | The file to upload | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json; charset=utf-8