Skip to main content

Link Files to Agent

POST /api/agents/{agentId}/files

Link a file to be associated with a specific agent.

Code Examples

curl --request POST \
--url 'https://tess.pareto.io/api/agents/{agentId}/files' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: multipart/form-data' \
-H 'Content-Type: application/json' \
-d '{
"file_ids": [
fileId1,fileId2
]
}'

Path Parameters

ParameterTypeRequiredDescription
agentIdstringYesThe ID of the agent

Body Parameters

ParameterTypeRequiredDescription
file_idsarrayYesThe files ids to link to the agent

Response

{
"id": 8794,
"files_count": {
"total": 1,
"completed": 1,
"failed": 0,
"in_progress": 0
},
"files": [
{
"id": 73336,
"object": "file",
"bytes": 35504128,
"created_at": "2025-01-05T22:39:57+00:00",
"filename": "endpoints.pdf",
"credits": 20.10060847168,
"status": "completed"
}
],
"status": "completed"
}

Try it out!

Authentication

This endpoint requires Bearer token authentication.

Test Endpoint