API Documentation
API Reference
- POSTKnowledge Base Files
- GETGet Chatbots
- POSTCreate Chatbot
- PATCHUpdate Chatbot
- GETGet Chatbot Details
- DELDelete Chatbot
- PATCHChatbot Avatar
- PATCHVoice Agent
- PATCHChat Widget
- GETGet Knowledge Base List Of Chatbot
- DELDelete Knowledge Base Data
- PATCHUpdate Knowledge Base
- POSTQuery Knowledge
- POSTChat
- GETGet A Conversation
- GETGet Conversations
- GETGet Messages
Chatbot Avatar
Chatbot Avatar
curl --request PATCH \
--url https://v2.okchat.ai/api/external/chatbot/{chatbotId}/update-avatar \
--header 'Content-Type: multipart/form-data'
{
"chatbot": {
"active": true,
"created_at": "2025-01-22T04:30:45.790337+00:00",
"description": "A helpful support assistant",
"docs_metadata": null,
"enabled_plugins": null,
"id": "3317853e-0af2-427d-a56f-351a9587f48f",
"is_public": true,
"managers": null,
"migrated_data": false,
"name": "API Docs Demo Chatbot",
"openai_api_key": null,
"organization_id": "123042b2-86e2-4184-a86e-95423d728815",
"personality_config": {
"style": "Friendly",
"tone": "Professional"
},
"settings": {
"avatar": "https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/chatbot/3317853e-0af2-427d-a56f-351a9587f48f/7b9ec849-29fb-41c4-b66e-0709e7fa18b9.jpg",
"greeting": "Hello! How can I assist you today?",
"isRequestUserInfoEnabled": false,
"isToolEnabled": true,
"model": "gpt-4o-mini",
"prompt": "You are a highly skilled customer support assistant for [company name]. Your goal is to provide accurate, polite, and concise answers to customer inquiries. If you do not know the answer, recommend the customer to contact human support or check the FAQ section. Ensure a positive tone in all responses",
"snippet": {
"header": "Customer Support",
"logo": "https://example.com/logo.png",
"name": "Support Assistant",
"primaryColor": "#4F46E5",
"secondaryColor": "#10B981",
"slogan": "How can I help you today?"
}
},
"slug": "api-docs-demo-chatbot",
"suggestions": null,
"updated_at": "2025-01-22T04:30:45.790337+00:00",
"v1_chatbot_id": null,
"version_id": null,
"voice_widget_config": null
},
"message": "Avatar updated successfully"
}
Headers
"15a23c21867f4f38b0b46f5e4adb1caf87a040b34eb58f68"
Path Parameters
"3317853e-0af2-427d-a56f-351a9587f48f"
Body
Response
true
"2025-01-22T04:30:45.790337+00:00"
"A helpful support assistant"
"3317853e-0af2-427d-a56f-351a9587f48f"
true
false
"API Docs Demo Chatbot"
"123042b2-86e2-4184-a86e-95423d728815"
"https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/chatbot/3317853e-0af2-427d-a56f-351a9587f48f/7b9ec849-29fb-41c4-b66e-0709e7fa18b9.jpg"
"Hello! How can I assist you today?"
false
true
"gpt-4o-mini"
"You are a highly skilled customer support assistant for [company name]. Your goal is to provide accurate, polite, and concise answers to customer inquiries. If you do not know the answer, recommend the customer to contact human support or check the FAQ section. Ensure a positive tone in all responses"
"Customer Support"
"https://example.com/logo.png"
"Support Assistant"
"#4F46E5"
"#10B981"
"How can I help you today?"
"api-docs-demo-chatbot"
"2025-01-22T04:30:45.790337+00:00"
"Avatar updated successfully"
curl --request PATCH \
--url https://v2.okchat.ai/api/external/chatbot/{chatbotId}/update-avatar \
--header 'Content-Type: multipart/form-data'
{
"chatbot": {
"active": true,
"created_at": "2025-01-22T04:30:45.790337+00:00",
"description": "A helpful support assistant",
"docs_metadata": null,
"enabled_plugins": null,
"id": "3317853e-0af2-427d-a56f-351a9587f48f",
"is_public": true,
"managers": null,
"migrated_data": false,
"name": "API Docs Demo Chatbot",
"openai_api_key": null,
"organization_id": "123042b2-86e2-4184-a86e-95423d728815",
"personality_config": {
"style": "Friendly",
"tone": "Professional"
},
"settings": {
"avatar": "https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/chatbot/3317853e-0af2-427d-a56f-351a9587f48f/7b9ec849-29fb-41c4-b66e-0709e7fa18b9.jpg",
"greeting": "Hello! How can I assist you today?",
"isRequestUserInfoEnabled": false,
"isToolEnabled": true,
"model": "gpt-4o-mini",
"prompt": "You are a highly skilled customer support assistant for [company name]. Your goal is to provide accurate, polite, and concise answers to customer inquiries. If you do not know the answer, recommend the customer to contact human support or check the FAQ section. Ensure a positive tone in all responses",
"snippet": {
"header": "Customer Support",
"logo": "https://example.com/logo.png",
"name": "Support Assistant",
"primaryColor": "#4F46E5",
"secondaryColor": "#10B981",
"slogan": "How can I help you today?"
}
},
"slug": "api-docs-demo-chatbot",
"suggestions": null,
"updated_at": "2025-01-22T04:30:45.790337+00:00",
"v1_chatbot_id": null,
"version_id": null,
"voice_widget_config": null
},
"message": "Avatar updated successfully"
}