Agent Documents API Documentation
GET: Retrieve Documents
Description
This route is used to retrieve a list of documents for a specific Agent.
Method
GET
URL Parameters
AgentId(string): The ID of the Agent to retrieve documents for.
Query Parameters
sort(string): The field by which to sort the documents.page(number): The page number of the results.limit(number): The number of items per page.
Response
- Returns a JSON response with the list of documents or an error message.
Status Codes
200 OK: Documents retrieved successfully.500 Internal Server Error: Error listing documents.
Throws
- An error if request validation or document retrieval fails.
Example cURL
curl --location 'https://app.ai12z.net/api/Agents/{AgentId}/documents' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--data-urlencode 'sort=name' \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10'