DELETE - Delete Attachments from Group/Personal Task

Purpose

This API is used to delete one or more attachment(s) from a group/personal task. Multiple files can be deleted in a single request.

OAuth Scope

Use the scope

ZohoMail.tasks.ALL (or) ZohoMail.tasks.DELETE

to generate the Authtoken.

ALL - Full access to tasks.

DELETE - Delete attachment from group/personal task.

Request URL

Method: DELETE

Group Task:

https://mail.zoho.com/api/tasks/groups/{zgid}/{taskId}/attachments

Personal Task:

https://mail.zoho.com/api/tasks/me/{taskId}/attachments

Path Parameters

  • zgid* long
    • Specifies the unique identifier used for groups in an organization.
    • This parameter can be retrieved from the Get all groups API.
  • taskId* long

Request Body ( JSON Object)

  • attachmentId* JSONArray
    • Specifies the list of attachment ids to be deleted.
    • Maximum of 25 files can be deleted.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request - Group Task

Copiedcurl "https://mail.zoho.com/api/tasks/groups/5******048/48184******91002/attachments" \
-X DELETE \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken ****************" \
-d '{
  "attachmentId": [
    139308222824380020,
    139308222824380053
  ]
}'

Sample Request - Personal Task

Copiedcurl "https://mail.zoho.com/api/tasks/me/34523******67511/attachments" \
-X DELETE \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken ****************" \
-d '{
  "attachmentId": [
    139308222824380020,
    139308222824380053
  ]
}'

Sample Success Response - Group & Personal Task

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {}
}

Sample Failure Response - Group & Personal Task

Copied{
  "status": {
    "code": 0,
    "description": "The input passed is invalid"
  },
  "data": {}
}