Attach files to task
Endpoint
POST /bot/tasks/{task_id}/files
Attaches already uploaded files to an existing task.
Send only file IDs. Upload files first via POST /bot/files/upload.
Auth
http
Authorization: Bearer <bot_token>
Content-Type: application/jsonPath params
task_id- target task ID
Request body
json
{
"file_ids": [123, 456]
}Response body
json
{
"success": true,
"error_message": null,
"data": {
"task_id": 1001,
"files": [
{
"file_id": 123,
"filename": "invoice.pdf",
"url": "...",
"temp_url": "...",
"expired_at": "...",
"created_at": "...",
"size_bytes": 12345,
"meta": {}
}
]
}
}Notes
- The bot must have access to the task form.
- Files must be uploaded through the same company storage as the bot user.
- Invalid, missing, or wrong-storage file IDs are skipped.
- For new task creation, files can also be attached immediately by passing
files: [file_id]inPOST /bot/forms/{form_id}/tasks.
Limits
file_ids <= 10