Overview
Document Overview
Documentation of API endpoints of MaiAgent
API Categories and Endpoint List
AI Assistant
POSTapi/chatbots: Create a new AI assistantGETapi/chatbot-settings: List available settings for AI assistantsGETapi/embedding-models: List Embedding ModelsGETapi/reranker-models: List Reranker ModelsGETapi/chatbots: Get a list of AI assistantsGETapi/chatbots/{id}: Get a specific AI assistantPUTapi/chatbots/{id}: Update an AI assistantPATCHapi/chatbots/{id}: Partially update an AI assistantDELETEapi/chatbots/{id}: Delete an AI assistant
Attachments and Files
POSTapi/attachments-upload: Create a new attachment (integrated)POSTapi/upload-presigned-url: Get a presigned URL for file upload (create/get)POSTapi/attachments: Upload attachment via Presigned URLPOSTapi/conversations/{conversationPk}/attachments: Create a conversation attachment
Knowledge Base (New)
POSTapi/knowledge-bases: Create a knowledge baseGETapi/knowledge-bases: List all knowledge basesGETapi/knowledge-bases/{id}: Get details of a specific knowledge baseGETapi/knowledge-bases/{id}/search: Search the content of a specific knowledge basePUTapi/knowledge-bases/{id}: Update a knowledge basePATCHapi/knowledge-bases/{id}: Partially update a knowledge baseDELETEapi/knowledge-bases/{id}: Delete a knowledge basePOSTapi/knowledge-bases/{knowledgeBasePk}/labels: Create a new labelGETapi/knowledge-bases/{knowledgeBasePk}/labels: List labels in a knowledge baseGETapi/knowledge-bases/{knowledgeBasePk}/labels/{id}: Get details of a specific labelPUTapi/knowledge-bases/{knowledgeBasePk}/labels/{id}: Update a labelPATCHapi/knowledge-bases/{knowledgeBasePk}/labels/{id}: Partially update a labelDELETEapi/knowledge-bases/{knowledgeBasePk}/labels/{id}: Delete a labelPOSTapi/knowledge-bases/{knowledgeBasePk}/files: Upload a file to the knowledge basePOSTapi/knowledge-bases/{knowledgeBasePk}/files/{id}/update-metadata: Update file metadataPOSTapi/knowledge-bases/{knowledgeBasePk}/files/batch-delete: Batch delete filesGETapi/knowledge-bases/{knowledgeBasePk}/files: List files in the knowledge baseGETapi/knowledge-bases/{knowledgeBasePk}/files/{id}: Get details of a specific fileGETapi/knowledge-bases/{knowledgeBasePk}/text-nodes: List text nodes of a specific file in the knowledge baseGETapi/knowledge-bases/{knowledgeBasePk}/text-nodes/{id}: Get details of a specific text nodePUTapi/knowledge-bases/{knowledgeBasePk}/files/{id}: Update file informationPATCHapi/knowledge-bases/{knowledgeBasePk}/files/{id}: Partially update a fileDELETEapi/knowledge-bases/{knowledgeBasePk}/files/{id}: Delete a filePOSTapi/knowledge-bases/{knowledgeBasePk}/faqs: Create a new FAQPOSTapi/knowledge-bases/{knowledgeBasePk}/faqs/{id}/update-metadata: Update FAQ metadataPOSTapi/knowledge-bases/{knowledgeBasePk}/faqs/batch-delete: Batch delete FAQsGETapi/knowledge-bases/{knowledgeBasePk}/faqs: List all FAQs for a specific knowledge baseGETapi/knowledge-bases/{knowledgeBasePk}/faqs/{id}: Get details of a specific FAQPUTapi/knowledge-bases/{knowledgeBasePk}/faqs/{id}: Update an FAQPATCHapi/knowledge-bases/{knowledgeBasePk}/faqs/{id}: Partially update an FAQDELETEapi/knowledge-bases/{knowledgeBasePk}/faqs/{id}: Delete an FAQ
Knowledge Base (Legacy)
POSTapi/chatbots/{chatbotPk}/files: Upload a new knowledge base fileGETapi/chatbots/{chatbotPk}/files: Get a list of knowledge base filesGETapi/chatbots/{chatbotPk}/files/{id}: Get a specific knowledge base filePUTapi/chatbots/{chatbotPk}/files/{id}: Update a knowledge base fileDELETEapi/chatbots/{chatbotPk}/files/{id}: Delete a knowledge base filePOSTapi/chatbots/{chatbotPk}/files/batch-delete: Batch delete knowledge base filesPOSTapi/chatbots/{chatbotPk}/faqs: Create a new FAQGETapi/chatbots/{chatbotPk}/faqs: Get a list of FAQsGETapi/chatbots/{chatbotPk}/faqs/{id}: Get a specific FAQPUTapi/chatbots/{chatbotPk}/faqs/{id}: Update an FAQDELETEapi/chatbots/{chatbotPk}/faqs/{id}: Delete an FAQPOSTapi/chatbots/{chatbotPk}/faqs/batch-delete: Batch delete FAQsGETapi/chatbot-text-nodes: Get text nodes for all files of an AI assistantGETapi/chatbot-text-nodes/{id}: Get text nodes for a specific file of an AI assistantPOSTapi/chatbots/{id}/search: Search testGETapi/parsers/supported-file-types: List supported parsers for file types
Conversations and Messages
POSTapi/chatbots/{chatbotId}/completions: Send a message (stream)POSTapi/messages: Send a message (create)POSTapi/conversations: Create a new conversationGETapi/messages: Get a list of messagesGETapi/messages/{id}: Get a specific messageGETapi/conversations: Get a list of conversationsGETapi/conversations/{id}: Get a specific conversationGETapi/chatbots/{chatbotPk}/records: Get AI assistant conversation recordsGETapi/chatbots/{chatbotPk}/records/export-excel: Export conversation records as an Excel file
Conversation Widget
GETapi/web-chats/{id}: Get a specific Web ChatGETapi/chatbots/{chatbotPk}/llm-usage-statistics: Get LLM usage statisticsGETapi/chatbots/{chatbotPk}/statistics: Get AI assistant statisticsPATCHapi/chatbots/{chatbot_id}/enable-evaluation: Enable or disable the evaluation feature for a specific AI assistant
Organizations and Members
POSTapi/auth/registration: Account registrationPOSTapi/auth/password/change: Change passwordPOSTapi/organizations: Create a new organizationPOSTapi/organizations/{organizationPk}/members: Add a member to a specified organizationGETapi/organizations: Get a list of organizationsGETapi/organizations/{id}: Get information for a specific organizationGETapi/users/current: Get current user detailsGETapi/permissions: Get current user permissionsGETapi/organizations/{organizationPk}/members: Get the member list of a specified organizationGETapi/organizations/{organizationPk}/members/{id}: Get details of a specific memberPUTapi/organizations/{id}: Update organization informationPUTapi/users/current: Update current user detailsPUTapi/organizations/{organizationPk}/members/{id}: Update member information in a specified organizationDELETEapi/organizations/{id}: Delete an organizationDELETEapi/organizations/{organizationPk}/members/{id}: Delete a specified member
Roles and Permissions
POSTapi/organizations/{organizationPk}/groups: Create a rolePOSTapi/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create: Bulk add role membersPOSTapi/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create: Bulk assign AI assistants to a roleGETapi/permissions: List permissionsGETapi/organizations/{organizationPk}/groups: Get a list of rolesGETapi/organizations/{organizationPk}/groups/{id}: Get details of a roleGETapi/organizations/{organizationPk}/groups/{groupPk}/group-members: Get a list of role membersGETapi/organizations/{organizationPk}/groups/{groupPk}/group-members/{id}: View a specific role memberGETapi/organizations/{organizationPk}/groups/{groupPk}/group-chatbots: Get the list of AI assistants for a rolePUTapi/organizations/{organizationPk}/groups/{id}: Update role permissionsPATCHapi/organizations/{organizationPk}/groups/{id}: Partially update role permissionsDELETEapi/organizations/{organizationPk}/groups/{id}: Delete a roleDELETEapi/organizations/{organizationPk}/groups/{groupPk}/group-members/{id}: Remove a role memberDELETEapi/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/{id}: Remove an AI assistant from a role
Contacts
GETapi/contacts: List contactsPOSTapi/contacts: Create a contactGETapi/contacts/{id}: Get contact detailsPUTapi/contacts/{id}: Update a contactPATCHapi/contacts/{id}: Update a contactDELETEapi/contacts/{id}: Delete a contact
Authentication Requirements
All API requests must include an API Key in the HTTP Header, in the following format:
Authorization: Api-Key YOUR_API_KEYUsage Instructions
Please read the detailed documentation for each endpoint carefully
Detailed request and response formats can be found on each category page
All example code is provided in multiple programming languages
Status Code Descriptions
200
Request successful
201
Resource created successfully
400
Bad request format
401
Authentication failed
403
Insufficient permissions
404
Resource not found
500
Server error
Last updated
Was this helpful?
