Agent Documents
Manages documents in an agent’s knowledge base. This endpoint supports GET, POST, and DELETE operations.List Documents
Method:GET
Endpoint:
/api/agent-documents
Headers:
X-Authorization
: Your API key (required)
uid
(string, required): Your user IDagentId
(string, required): The ID of the agent
Add Documents
Method:POST
Endpoint:
/api/agent-documents
Headers:
X-Authorization
: Your API key (required)Content-Type
:multipart/form-data
uid
(string, required): Your user IDagentId
(string, required): The ID of the agentfiles
(File[], required): Array of files to upload (max 10 files, 10MB each)
- PDF (.pdf)
- Word documents (.docx)
- Text files (.txt)
Delete Document
Method:DELETE
Endpoint:
/api/agent-documents
Headers:
X-Authorization
: Your API key (required)
uid
(string, required): Your user IDagentId
(string, required): The ID of the agentdocumentId
(string, required): The ID of the document to delete
Error Responses
400 Bad Request
: Invalid request parameters, too many files, file too large, or unsupported file type401 Unauthorized
: Invalid or missing API key, or insufficient permissions404 Not Found
: Document not found (for DELETE operations)500 Internal Server Error
: Server error
Examples
List documents:Authorizations
Response
List of documents