Skip to main content
DELETE
/
tasks
/
{task_id}
/
attachments
Delete task attachments
curl --request DELETE \
  --url https://api.projectcor.com/v1/tasks/{task_id}/attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "attachments": [
    123
  ],
  "lastPage": 123,
  "order": {
    "created_at": "DESC"
  }
}
'
{
  "deleted": true,
  "elements": [
    {
      "id": 123,
      "url": "<string>",
      "size": 123,
      "source": "<string>",
      "user_id": 123,
      "available": true,
      "file_type": "<string>",
      "media_type": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "originalname": "<string>",
      "discussions_id": 123,
      "parent_type": "<string>",
      "name": "<string>",
      "parent_id": 123,
      "attachment_parent_id": 123,
      "version": 123,
      "status": "approved",
      "currentVersionData": {},
      "currentVersionId": 123,
      "currentVersion": 123,
      "user": {
        "id": 123,
        "first_name": "<string>",
        "last_name": "<string>",
        "picture": "<string>"
      },
      "graphicsCount": "<string>",
      "taskLogReworksId": 123,
      "createdFrom": "<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

Body

application/json
attachments
required

ID(s) of the attachment(s) to delete

lastPage
integer

Last page number (used for re-pagination)

order
object

Sort criteria for replacement elements

Response

Attachments deleted successfully

deleted
boolean
elements
object[]

Attachments from the last page that fill the gaps left by deleted items