Skip to main content
POST
/
agents
/
{agentId}
/
files
Link Files to Agent
curl --request POST \
  --url https://api.tess.im/agents/{agentId}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_ids": [
    123
  ]
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.tess.im/llms.txt

Use this file to discover all available pages before exploring further.

Code Examples

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

Headers

x-workspace-id
integer
ID of the workspace. If not provided, the user’s selected workspace will be used.
Note: This field will be required in a future release of the API. It is highly recommended to set it now to ensure compatibility with future updates.

Path Parameters

agentId
string
required
The ID of the agent

Body Parameters

file_ids
integer[]
required
The file 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"
}