Chat Files
GET /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/
Section titled “GET /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/”List Chat Files
List all files attached to a chat conversation.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agent_id | path | string (uuid) | yes | |
| chat_id | path | string (uuid) | yes | |
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | FileListResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/
Section titled “POST /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/”Attach Chat Files
Attach previously uploaded temp files to a chat conversation.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agent_id | path | string (uuid) | yes | |
| chat_id | path | string (uuid) | yes | |
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| file_refs | agentdepot_api__routers__chat_files__FileRef[] | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | FileListResponse |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/{file_id}
Section titled “DELETE /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/{file_id}”Delete Chat File
Delete a chat file from S3 (when not shared) and the database.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agent_id | path | string (uuid) | yes | |
| chat_id | path | string (uuid) | yes | |
| file_id | path | string (uuid) | yes | |
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/{file_id}/download
Section titled “GET /api/orgs/{org_id}/agents/{agent_id}/chats/{chat_id}/files/{file_id}/download”Download Chat File
Download a chat file’s content.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agent_id | path | string (uuid) | yes | |
| chat_id | path | string (uuid) | yes | |
| file_id | path | string (uuid) | yes | |
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | object |
| 422 | Validation Error | HTTPValidationError |