Documentation Index
Fetch the complete documentation index at: https://docs.animam.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints to manage the chatbot’s corpus (knowledge base).
GET /tenants//corpus
List all corpus entries.
Required scope: corpus:read
Request
curl https://api.animam.ai/tenants/my-company/corpus \
-H "Authorization: Bearer ak_your_token"
Query Parameters
| Param | Type | Description |
|---|
page | number | Page (default: 1) |
limit | number | Entries per page (default: 20, max: 100) |
segment | string | Filter by segment |
search | string | Text search |
Response
{
"corpus": [
{
"id": "corp_abc123",
"title": "Return Policy",
"content": "You have 30 days to return...",
"segment": "checkout",
"priority": 5,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 42,
"pages": 3
}
}
GET /tenants//corpus/
Retrieve a specific entry.
Required scope: corpus:read
curl https://api.animam.ai/tenants/my-company/corpus/corp_abc123 \
-H "Authorization: Bearer ak_your_token"
POST /tenants//corpus
Create a new entry.
Required scope: corpus:write
Request
curl -X POST https://api.animam.ai/tenants/my-company/corpus \
-H "Authorization: Bearer ak_your_token" \
-H "Content-Type: application/json" \
-d '{
"title": "Business hours",
"content": "We are open Monday to Friday, 9am to 6pm. Saturday 10am to 4pm.",
"segment": "contact",
"priority": 5
}'
Body
| Field | Type | Required | Description |
|---|
title | string | Yes | Entry title |
content | string | Yes | Content (max 50,000 chars) |
segment | string | No | Associated segment |
priority | number | No | Priority 1-10 (default: 5) |
tags | string[] | No | Tags for matching |
Response
{
"id": "corp_xyz789",
"title": "Business hours",
"content": "We are open...",
"segment": "contact",
"priority": 5,
"createdAt": "2024-01-25T10:30:00Z"
}
PATCH /tenants//corpus/
Modify an existing entry.
Required scope: corpus:write
curl -X PATCH https://api.animam.ai/tenants/my-company/corpus/corp_abc123 \
-H "Authorization: Bearer ak_your_token" \
-H "Content-Type: application/json" \
-d '{
"content": "Updated content",
"priority": 8
}'
DELETE /tenants//corpus/
Delete an entry.
Required scope: corpus:write
curl -X DELETE https://api.animam.ai/tenants/my-company/corpus/corp_abc123 \
-H "Authorization: Bearer ak_your_token"
Response
{
"deleted": true,
"id": "corp_abc123"
}
POST /tenants//corpus/import
Bulk import via CSV.
Required scope: corpus:write
curl -X POST https://api.animam.ai/tenants/my-company/corpus/import \
-H "Authorization: Bearer ak_your_token" \
-F "[email protected]"
title,content,segment,priority
"Hours","Open 9am-6pm","contact",5
"Price","$49/month","pricing",10
Response
{
"imported": 15,
"errors": [
{ "line": 3, "error": "Missing required field: content" }
]
}