curl --request POST \
--url https://www.asteragents.com/api/kb/manage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Product Documentation",
"embeddingModel": "openai:text-embedding-3-small"
}
'{
"success": true,
"knowledgeBase": {
"id": 1,
"name": "Product Documentation",
"description": null,
"embeddingModel": "openai:text-embedding-3-small",
"embeddingDimensions": 1536,
"extractionModel": null,
"extractionSchema": null,
"source": null,
"trigger": null,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"userId": "user_2ABC123DEF",
"fileCount": 0,
"status": "empty"
}
}Knowledge Bases API
Create a knowledge base
Create a new knowledge base in the authenticated user’s organization.
Required fields:
name— must be unique within the organizationembeddingModel— the model used to generate embeddings (e.g.,openai:text-embedding-3-small)
Optional features:
source— marks the KB as integration-managed (disables manual file upload in UI)trigger— automatically runs an agent when new files are addedextractionModel/extractionSchema— structured data extraction from uploaded files
POST
/
kb
/
manage
curl --request POST \
--url https://www.asteragents.com/api/kb/manage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Product Documentation",
"embeddingModel": "openai:text-embedding-3-small"
}
'{
"success": true,
"knowledgeBase": {
"id": 1,
"name": "Product Documentation",
"description": null,
"embeddingModel": "openai:text-embedding-3-small",
"embeddingDimensions": 1536,
"extractionModel": null,
"extractionSchema": null,
"source": null,
"trigger": null,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"userId": "user_2ABC123DEF",
"fileCount": 0,
"status": "empty"
}
}Authorizations
Body
application/json