Skip to main content
POST
/
tasks
/
{task_id}
/
attachments
Upload task attachments
curl --request POST \
  --url https://api.projectcor.com/v1/tasks/{task_id}/attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form available=true \
  --form session_token=null \
  --form attachment_parent_id=null \
  --form status=null \
  --form created_from=task_panel
{
  "files": [
    {
      "id": 123,
      "url": "<string>",
      "name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "source": "<string>",
      "size": 123,
      "filename": "<string>",
      "available": true,
      "item_id": 123,
      "originalname": "<string>",
      "attachment_parent_id": 123,
      "file_type": "<string>",
      "discussions_id": 123,
      "user_id": 123,
      "parent_id": 123,
      "type": "<string>",
      "version": 123,
      "status": "<string>",
      "token": "<string>",
      "company_id": 123,
      "task_log_reworks_id": 123,
      "task_log_id": 123,
      "media_type": "<string>",
      "graphics_count": "<string>",
      "created_from": "<string>"
    }
  ],
  "files_q": 123,
  "errors": [
    {
      "filename": "<string>",
      "message": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

task_id
integer
required

ID of the task (task_log_id)

Body

multipart/form-data
file
file
required

File(s) to upload

available
boolean
default:true

Whether the file is visible

session_token
string | null

Session token to group uploads and defer notification

attachment_parent_id
integer | null

ID of the parent attachment (for versioning)

status
enum<string> | null

Attachment status

Available options:
approved,
pending,
required,
null
created_from
enum<string>
default:task_panel

Origin of the upload

Available options:
task_panel,
rework,
feedback

Response

Files uploaded successfully

files
object[]
files_q
integer

Total number of attachments currently on the task

errors
object[]

Present only when individual files failed (size exceeded or invalid extension)