PUT - Restore a Deleted Group/Personal Task

Purpose

This API is used to restore a previously deleted group or personal task. The task will be restored to the same category under group/personal tasks from which it was deleted.

When a task along with a subtask is deleted and moved to trash, restoring the parent task will restore the subtask too. However, if only the subtask is restored, it will be restored as an individual parent task.

OAuth Scope

Use the scope

ZohoMail.tasks.ALL (or) ZohoMail.tasks.UPDATE

to generate the Authtoken.

ALL - Full access to tasks.

UPDATE - Restore the deleted tasks.

Request URL

Method: PUT

Group Task:

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

Personal Task:

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

Path Parameters

  • zgidlong
    • Specifies the unique identifier used for groups in an organization.
    • This parameter can be retrieved from the Get all groups API.
  • taskIdlong

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request - Group Tasks

Copiedcurl "https://mail.zoho.com/api/tasks/groups/5******048/48184******91002/restore" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ****************"

Sample Request - Personal Tasks

Copiedcurl "https://mail.zoho.com/api/tasks/me/48184******91002/restore" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ****************"

Sample Success Response - Group and Personal Tasks

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {
    "id": "17**************100"
  }
}

Sample Failure Response - When Group/Personal Task is Not Available in Trash

Copied{
  "status": {
    "code": 0,
    "description": "ENTITY_NOT_IN_TRASH"
  },
  "data": {}
}