API - Chatbot - Reference
GET /chatbots/
Get all chatbots associated with the user.
Example request
curl --request GET \
--url https://api.aidbase.ai/v1/chatbots \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]'Example response
{
"success": true,
"data": [
{
"id": "1572f60b-791b-4e94-b5c7-9b42b650d3ca",
"public_id": "p-8KP033W9GT8xZMEULqa",
"title": "Website Chatbot",
"allowed_domains": [
"www.mywebsite.com",
]
},
{
"id": "6e8665aa-b573-450c-b4f9-7846ce5c195e",
"public_id": "oZ4tBppTZonaFVzNaNm_D",
"title": "Test (Development) Chatbot",
"allowed_domains": [
"localhost:3000"
]
}
...
]
}GET /chatbot/:id/
Get a specific chatbot by ID.
Example request
curl --request GET \
--url https://api.aidbase.ai/v1/chatbot/p-8KP033W9GT8xZMEULqa \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]'Example response
{
"success": true,
"data": {
"id": "1572f60b-791b-4e94-b5c7-9b42b650d3ca",
"public_id": "p-8KP033W9GT8xZMEULqa",
"title": "Website Chatbot",
"allowed_domains": [
"www.mywebsite.com",
]
}
}POST /chatbot/:id/reply
Get an AI reply from a chatbot.
Example request
curl --request POST \
--url https://api.aidbase.ai/v1/chatbot/odguL9hXiB413s3g9ZO3z/reply \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]' \
--data '{
"message": "How can I get started with Aidbase API?"
}'Example response
{
"success": true,
"data": {
"id": "a9fb17e5-db95-4777-8ccb-5fa391fcdd66",
"session_id": "tAp_XW4qvRzKw4mlWKH9U",
"message": "First you need to create an account on Aidbase. Then you can get your API key from the settings.",
}
}To get the next reply in the same conversation, include the session_id from the previous response.
Example request
curl --request POST \
--url https://api.aidbase.ai/v1/chatbot/odguL9hXiB413s3g9ZO3z/reply \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]' \
--data '{
"message": "How can I get started with Aidbase API?",
"session_id": "tAp_XW4qvRzKw
}'GET /chatbot/:id/knowledge
Get all knowledge items associated with a chatbot.
Example request
curl --request GET \
--url https://api.aidbase.ai/v1/chatbot/odguL9hXiB413s3g9ZO3z/knowledge \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]'Example response
{
"success": true,
"data": {
"items": [
{
"id": "d38b8600-d708-40d9-a2a8-c178b84b30a0",
"type": "website",
"base_url": "https://www.mywebsite.com/",
"trained_at": "2023-12-24T06:05:17.365Z",
"is_training": false,
"training_failed_at": null,
"training_failed_with": null
},
...
],
"total": 40,
"has_more": true,
"next_cursor": "MjUuNTA="
}
}PUT /chatbot/:id/knowledge
Add a new knowledge item to a chatbot.
The knowledge item must have a trained model.
The model can be trained using the /knowledge/:id/train endpoint.
Example request
curl --request PUT \
--url https://api.aidbase.ai/v1/chatbot/odguL9hXiB413s3g9ZO3z/knowledge \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]' \
--data '{
"knowledge_id": "cd2faf2c-464b-421f-a7b1-b856860551f8"
}'Example response
{
"success": true,
}DELETE /chatbot/:id/knowledge
Remove a knowledge item from a chatbot.
The knowledge item will be removed from the chatbot, but the knowledge item itself will not be deleted.
Example request
curl --request DELETE \
--url https://api.aidbase.ai/v1/chatbot/odguL9hXiB413s3g9ZO3z/knowledge \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]' \
--data '{
"knowledge_id": "cd2faf2c-464b-421f-a7b1-b856860551f8"
}'Example response
{
"success": true,
}GET /chatbot/:id/chats
Get all chats associated with a chatbot.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
created_before | string (optional) | Filter chats created before this timestamp. Accepts ISO 8601 date-time strings or any parsable date format (e.g., 2026-02-10T12:00:00Z or 2026-02-10). Returns HTTP 400 if the date format is invalid. |
created_after | string (optional) | Filter chats created after this timestamp. Accepts ISO 8601 date-time strings or any parsable date format (e.g., 2026-01-01T00:00:00Z or 2026-01-01). Returns HTTP 400 if the date format is invalid. |
Filters are applied before pagination. The total count in the response reflects the filtered results.
Example request
curl --request GET \
--url 'https://api.aidbase.ai/v1/chatbot/p-8KP033W9GT8xZMEULqa/chats?created_before=2026-02-10T12:00:00Z' \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]'Example response
{
"success": true,
"data": {
"items": [
{
"id": "c3a9b7e5-8f42-4d1a-9c3e-7f8a6b5c4d3e",
"session_id": "tAp_XW4qvRzKw4mlWKH9U",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:35:00.000Z"
},
{
"id": "d4b8c6f7-9e53-5e2b-0d4f-8g9b7c6d5e4f",
"session_id": "bQq_YX5rwSaLx5nmXLI0V",
"created_at": "2024-01-14T15:20:00.000Z",
"updated_at": "2024-01-14T15:25:00.000Z"
},
...
],
"total": 150,
"has_more": true,
"next_cursor": "MjUuNTA="
}
}GET /chatbot/:id/chats/:chatId
Get a specific chat by ID.
Example request
curl --request GET \
--url https://api.aidbase.ai/v1/chatbot/p-8KP033W9GT8xZMEULqa/chats/c3a9b7e5-8f42-4d1a-9c3e-7f8a6b5c4d3e \
--header 'accept: application/json' \
--header 'Authorization: Bearer [YOUR_API_KEY]'Example response
{
"success": true,
"data": {
"id": "c3a9b7e5-8f42-4d1a-9c3e-7f8a6b5c4d3e",
"session_id": "tAp_XW4qvRzKw4mlWKH9U",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:35:00.000Z",
"conversation": [
{
"role": "user",
"message": "How can I get started with Aidbase API?"
},
{
"role": "assistant",
"message": "First you need to create an account on Aidbase. Then you can get your API key from the settings."
},
{
"role": "user",
"message": "Where can I find the documentation?"
},
{
"role": "assistant",
"message": "You can find the documentation at https://docs.aidbase.ai"
}
]
}
}