Knowledge
Upload knowledge document
Upload a new knowledge document for an agent. Requires knowledgeSearchInstructions to be configured on the agent.
Authorization<token>
API key in the format: Bearer YOUR_API_KEY
In: header
agentIdstring
ID of the agent to associate this document with
Format
uuidnamestring
Display name for the document
filenamestring
Original filename
mimeTypestring
MIME type (e.g., application/pdf, text/plain)
fileSizeinteger
Size of the file in bytes
fileBase64string
Base64-encoded file content
Response Body
application/json
application/json
application/json
curl -X POST "https://api.chorus-ai.co/v1/knowledge" \ -H "Content-Type: application/json" \ -d '{ "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "name": "string", "filename": "string", "mimeType": "string", "fileSize": 0, "fileBase64": "string" }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",
"name": "string",
"filename": "string",
"mimeType": "string",
"fileSize": 0,
"status": "pending",
"chunkCount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"details": [
{}
]
}{
"error": "string",
"details": [
{}
]
}Last updated on