Getting the list of files through API: get_files

Sample get_files request

Returns files list of selected project or task
*project files include attached to project description and directly to Files section
*task files include attached to task description and comments

Required parameters:
  • id_project — project ID (optional if task ID selected)
Optional parameters:
  • id_task — task ID

Returned data:
  • id — file ID
  • page — part of the link for direct download (for the full path put the address of your account in front, for example
  • name — file name with its extension
  • size — file size (in bytes)
  • date_added — adding date and time
  • user_from — information on who added the file

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

"status": "ok",
"data": [
{ "id": "FILE_ID", "page": "/download/FILE_ID",
"name": "Example.docx", "size": "FILE_SIZE",
"date_added": "YYYY—MM—DD HH:II",
"user_from": { "id": "USER_ID",
"email": "USER_EMAIL",
"name": "USER_NAME"
}, { "id": "FILE_ID", "page": "/download/FILE_ID", ... ... ... }
Was this article helpful? Yes, thank you! No

Downloading files through API: download

Sample download request:

Downloads selected file
*attached to project description, task description, comment or directly to Files section

Required parameters:
  • id_file — file ID (can be obtained through get_files method)

Was this article helpful? Yes, thank you! No

Adding files to projects, tasks and comments through API

To add files, use POST requests with each file transferred as a separate parameter named attach (n), where n is any seed value (see code example below).

Files can be added in the following methods:

Sample of adding files in post_task request using PHP (curl) as an example:

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,'
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, [
  'attach[0]' = new cURLFile('path_to_file/local_file1.pdf',
  'attach[1]' = new cURLFile('path_to_file/local_file2.pdf',
$response = json_decode(curl_exec($curl), true);
Was this article helpful? Yes, thank you! No