For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

This document lists the MaiAgent platform's API endpoints for integration. Each endpoint includes descriptions of request and response fields, along with examples in Shell, JavaScript, Python, and PHP. For your first integration, complete the four steps below, then find the endpoint you need in the endpoint list.

Getting Started

1. Get an API Key

Organization members can create their own keys in the admin console by selecting the avatar in the upper-right corner → Account → API Keys. Administrators with “API Key management permissions” can also issue keys for specific members under Organization Settings → API Key Management. The full key is displayed only once, when it is created. See API Authentication for how to obtain the two types of keys and their permission scopes.

2. Base URL and Authentication Header

The SaaS API URL is https://api.maiagent.ai/api/v1/. For on-premises and private cloud deployments, replace it with your company's platform domain. Endpoint paths end with /. Include the key in the Authorization header of every request, using the Api-Key prefix (not Bearer):

Authorization: Api-Key <Your API key>

See URLs and Version Prefixes for URL rules, and Common Conventions: Authentication for how keys are tied to members and permissions.

3. Make Your First Call

For example, list Agents (GET /api/v1/chatbots/):

curl https://api.maiagent.ai/api/v1/chatbots/ \
  -H "Authorization: Api-Key YOUR_API_KEY"

The response is paginated (count, next, previous, results), and all field names use camelCase. See Pagination and Field Format. If you receive 401, check the key's status and the header format. See Status Codes for the meaning of each status code.

4. Next Steps

  • Rules shared across endpoints, such as rate limits, error response formats, and upload size limits: Common API Conventions

  • Response status codes and error examples: Status Codes

  • Receive events after a handoff to a human agent: Human Handoff Webhook Events

  • The complete flow from creating a conversation to receiving a reply: Quick Start in the technical manual

  • Fields and examples for each endpoint: the endpoint list below, or the category pages under “API Endpoint Documentation” in the left sidebar

Integration Code Examples

For complete API use cases and code examples, visit the following GitHub repository:

  • C# examples

  • Python examples

API Categories and Endpoint List

The category pages provide request and response fields and examples in each language for every endpoint. Refer to Status Codes for the meaning of response status codes.

AI Assistants

Attachments and Files

Knowledge Bases (New Version)

Knowledge Bases (Legacy Version)

Conversations and Messages

Chat Widget

Chat Platforms

Organizations and Members

Roles and Permissions

Contacts

Tools and Connectors

Skills

Databases

Evaluations and Test Datasets

Credit

AI Gateway

SCIM

Meeting Records

Last updated

Was this helpful?