Security Scheme Type | OAuth2 |
---|---|
clientCredentials OAuth Flow | Token URL: https://api.eu-pl.koda.ai/oauth/token Scopes:
|
Returns a list of chats
inbox:read
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
page | number Default: 1 Example: page=3 |
on_page | number Default: 20 Example: on_page=3 |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200,
- "page": 0,
- "per_page": 0,
- "pages": 0,
- "prev_url": "string",
- "next_url": "string",
- "found": 0,
- "is_last_page": true
}, - "response": [
- {
- "platform_user_id": "string",
- "platform": "fb",
- "avatar": "string",
- "first_name": "string",
- "last_name": "string",
- "moderator_mode": true,
- "last_inbox_message": {
- "date": 1578440306,
- "text": "How can I help you",
- "source": "moderator"
}
}
]
}
Get single chat
inbox:read
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
platformUserId required | string |
page | number Default: 1 Example: page=3 |
on_page | number Default: 20 Example: on_page=3 |
from | number <timestamp> |
to | number <timestamp> |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200,
- "page": 0,
- "per_page": 0,
- "pages": 0,
- "prev_url": "string",
- "next_url": "string",
- "found": 0,
- "is_last_page": true
}, - "response": [
- {
- "block_id": "3337eb37-9c70-4e88-a173-21372501d7ee",
- "type": "moderator",
- "date": 1578440306,
- "block": {
- "type": "message",
- "text": "string",
- "buttons": [
- {
- "type": "go_to",
- "go_to_block": "3337eb37-9c70-4e88-a173-21372501d7ee"
}
], - "quick_replies": [
- {
- "title": "Reply",
- "go_to_block": "3337eb37-9c70-4e88-a173-21372501d7ee"
}
], - "serialize": "string"
}
}
]
}
Enable moderator mode
inbox:read
inbox:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
platformUserId required | string |
{- "meta": {
- "status": 200
}, - "response": true
}
Sent moderator message
inbox:read
inbox:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
platformUserId required | string |
moderator_message required | string <= 1000 characters |
{- "moderator_message": "string"
}
{- "meta": {
- "status": 200
}, - "response": true
}
Disable moderator mode (mark done)
inbox:read
inbox:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
platformUserId required | string |
quiet | boolean Don`t send the block configured in the chatbot`s settings (dashboard) |
message | string <= 1000 characters Overwrite message set in the dashboard. A Message will be sent to the user |
{- "quiet": false,
- "message": "From now on, you talk to the chatbot"
}
{- "meta": {
- "status": 200
}, - "response": true
}
Send file attachment
inbox:read
inbox:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
platformUserId required | string |
audio | string <binary> |
image | string <binary> |
file | string <binary> |
video | string <binary> |
{- "meta": {
- "status": 200
}, - "response": true
}
Send a content block as a bot response to a user, with optionally update user variables
inbox:read
inbox:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
platformUserId required | string |
block_id required | string Block id |
object Optional user variables |
{- "block_id": "f60ea240-4cda-d1f9-032f-05eba5794058",
- "user_variables": {
- "user_variable1": "value1",
- "user_variable2": "value2"
}
}
{ }
Search for relevant documents in the knowledge base
knowledge_base:read
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
search | string Search query text |
object |
{- "search": "password reset",
- "metadata_filter": {
- "relation_type": "AND",
- "conditions": [
- {
- "meta_key": "category",
- "operator": "in",
- "values": [
- "faq"
]
}
]
}
}
{- "meta": {
- "page": 0,
- "per_page": 0,
- "pages": 0,
- "prev_url": "string",
- "next_url": "string",
- "found": 0,
- "is_last_page": true
}, - "response": [
- {
- "doc_id": "3337eb37-9c70-4e88-a173-21372501d7ee",
- "title": "Product Documentation",
- "meta": {
- "category": "faq",
- "department": "support"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
Create a new document in the knowledge base
knowledge_base:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
title required | string <= 120 characters |
content required | string |
object | |
auto_publish | boolean Default: false Automatically publish new version with changes. Otherwise, it will added to draft and user new approve changes in the dashboard. |
chunk_size | integer [ 100 .. 1000 ] Chunk size for splitting the document into smaller parts. This is useful for large documents to improve searchability. |
{- "title": "Product Documentation",
- "content": "This is the content of the knowledge base document.",
- "metadata": {
- "category": "faq",
- "department": "support"
}, - "auto_publish": true,
- "chunk_size": 500
}
{- "doc_id": "3337eb37-9c70-4e88-a173-21372501d7ee",
- "title": "Product Documentation",
- "content": "This is the content of the knowledge base document.",
- "meta": {
- "category": "faq",
- "department": "support"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Retrieve a specific document from the knowledge base
knowledge_base:read
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
doc_id required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200
}, - "response": {
- "doc_id": "3337eb37-9c70-4e88-a173-21372501d7ee",
- "title": "Product Documentation",
- "content": "This is the content of the knowledge base document.",
- "meta": {
- "category": "faq",
- "department": "support"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Update an existing document in the knowledge base
knowledge_base:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
doc_id required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
title required | string <= 120 characters |
content required | string |
object | |
auto_publish | boolean Default: false Automatically publish new version with changes. Otherwise, it will added to draft and user new approve changes in the dashboard. |
chunk_size | integer [ 100 .. 1000 ] Chunk size for splitting the document into smaller parts. This is useful for large documents to improve searchability. |
{- "title": "Product Documentation",
- "content": "This is the content of the knowledge base document.",
- "metadata": {
- "category": "faq",
- "department": "support"
}, - "auto_publish": true,
- "chunk_size": 500
}
{- "meta": {
- "status": 200
}, - "response": {
- "success": true,
- "doc": {
- "doc_id": "3337eb37-9c70-4e88-a173-21372501d7ee",
- "title": "Product Documentation",
- "content": "This is the content of the knowledge base document.",
- "meta": {
- "category": "faq",
- "department": "support"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
}
Remove a document from the knowledge base
knowledge_base:modify
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
doc_id required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200
}, - "response": {
- "success": true
}
}