Security Scheme Type | OAuth2 |
---|---|
clientCredentials OAuth Flow | Token URL: https://api.eu-pl.koda.ai/oauth/token Scopes:
|
Returns a list of call list
outbound: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 |
sort_order | string Default: "DESC" Enum: "ASC" "DESC" |
sort_by | string Default: "created_at" Enum: "name" "start_at" "status" "created_at" "created_via" "processed_at" "total_calls" "finished_calls" |
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": [
- {
- "id": "40b05524-7d6e-4521-90b9-c3bb57a63aaf",
- "status": "finished",
- "total_calls": 20,
- "finished_calls": 20,
- "name": "Call list 1",
- "start_at": "2021-10-01 08:00:00",
- "max_call_at": "2021-10-02 20:00:00",
- "processed_at": "2021-10-01 18:20:34",
- "created_at": "2021-10-01 18:20:34",
- "allowed_calling_hours": "08:00:00-20:00:00",
- "created_via": "dashboard"
}
]
}
Create call list
outbound:create
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
Data of new call list to be created
name required | string |
allowed_hours_start required | string Allowed calling time (start) |
allowed_hours_end required | string Allowed calling time (end) |
caller_phone_number required | string |
start_block_id required | string You can get block id from dashboard`s URL: app.kodabots.com/bot/{bot_id}/create-bot/{block_id} |
report_vars | Array of strings Vars will be visible data in the report but it will not influence on call status. |
campaign_vars required | Array of strings When the user has filled all the above variables, the call is marked as |
max_attempts required | number Number of calls retries |
attempts_delay required | number Interval between consecutive trials (in hours). Voicebot rings again in allowed hours when the user does not answer the phone, the line is busy or voicemail is detected |
campaign_date_start required | string Voicebot don`t make calls before this date |
campaign_date_time required | string |
campaign_date_end | string Voicebot doesn`t make calls after this date. It`s useful when input data are valid only in a specific amount of time e.g. voicebot daily collect information about packages status |
campaign_date_time_end | string |
campaign_allowed_days | Array of strings In with week days voicebot can make calls (ISO week date): 1-Monday; 2-Tuesday; 3-Wednesday; 4-Thursday; 5-Friday; 6-Saturday; 0-Sunday |
required | Array of objects List of calls to make. |
{- "name": "name",
- "allowed_hours_start": "14:30",
- "allowed_hours_end": "22:30",
- "caller_phone_number": "+48222431496",
- "start_block_id": "5d306675-4500-409d-80a2-6d16ac28db58",
- "report_vars": [
- "var_1"
], - "campaign_vars": [
- "var_1"
], - "max_attempts": 3,
- "attempts_delay": 3,
- "campaign_date_start": "2014-06-03",
- "campaign_date_time": "14:30",
- "campaign_date_end": "2014-07-03",
- "campaign_date_time_end": "19:30",
- "campaign_allowed_days": [
- "1",
- "2",
- "3",
- "4",
- "5"
], - "calls": [
- {
- "phone_number": "+48123123123",
- "first_name": "Michael",
- "package": "package123"
}
]
}
{- "meta": {
- "status": 200
}, - "response": {
- "result": true,
- "list_id": "f8bec356-47f7-4b66-97fa-55ac21366bbc",
- "count": 1
}
}
outbound:read
) listId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200
}, - "response": {
- "name": "name",
- "allowed_hours_start": "14:30",
- "allowed_hours_end": "22:30",
- "caller_phone_number": "+48222431496",
- "start_block_id": "5d306675-4500-409d-80a2-6d16ac28db58",
- "report_vars": [
- "var_1"
], - "campaign_vars": [
- "var_1"
], - "max_attempts": 3,
- "attempts_delay": 3,
- "campaign_date_start": "2014-06-03",
- "campaign_date_time": "14:30",
- "campaign_date_end": "2014-07-03",
- "campaign_date_time_end": "19:30",
- "campaign_allowed_days": [
- "1",
- "2",
- "3",
- "4",
- "5"
], - "processed_at": "2021-01-01 13:30:00",
- "created_via": "dashboard",
- "calls": [
- {
- "attempts_left": 3,
- "phone_number": "+48123123123",
- "custom_data": {
- "first_name": "Michael",
- "package": "package123"
}, - "data_collected": {
- "var1": "Value 1"
}, - "start_calling": "2021-10-01 18:20:34",
- "finish_calling": "2021-10-03 12:20:34",
- "call_duration": "00:00:37",
- "last_attempt": "2021-10-03 12:20:34",
- "calling_status": "waiting"
}
]
}
}
Resume calling on call list
outbound:resume
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
listId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200
}, - "response": {
- "result": true,
- "count_recovery": 1
}
}
Pause calling on call list
outbound:pause
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
listId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
{- "meta": {
- "status": 200
}, - "response": {
- "result": true,
- "msg": "Tasks canceled"
}
}
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 | |
tags | Array of strings Tags for the document. Will be converted to metadata with lowercase and underscores (e.g. 'Product Guide' becomes 'product_guide': 'yes') |
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"
}, - "tags": [
- "FAQ",
- "Product Guide"
], - "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"
}
Extract and process content from a website URL for knowledge base ingestion
knowledge_base:parser
) botId required | string <uuid> Example: 3337eb37-9c70-4e88-a173-21372501d7ee |
Authorization required | string <bearer> Example: Bearer <Access Token> |
url required | string <uri> URL of the website to parse |
selector | string Default: "body" Optional CSS selector to target specific content on the page |
chunk_mode | string Default: "html" Enum: "selector" "html" "text" Method to use for chunking content. 'selector' uses the provided CSS selector, 'html' splits content based on HTML semantic structure (headings, paragraphs, etc.), while 'text' extracts readable content and then divides it into chunks based on chunk_size. |
chunk_size | integer [ 100 .. 1000 ] Default: 500 Size of content chunks for processing. Used only if chunk_mode is 'text'. |
{- "selector": ".content",
- "chunk_mode": "html",
- "chunk_size": 500
}
{- "meta": {
- "status": 200
}, - "response": {
- "success": true,
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
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 | |
tags | Array of strings Tags for the document. Will be converted to metadata with lowercase and underscores (e.g. 'Product Guide' becomes 'product_guide': 'yes') |
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"
}, - "tags": [
- "FAQ",
- "Product Guide"
], - "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
}
}