POST - Add Custom Status to a Group/Personal Task

Purpose

This API is used to add a custom status to a group or personal tasks.

Note:

Under Tasks, inprogress and completed are the currently available task status. In addition to these, users can now define their own status, referred to as custom status and add it to group or personal tasks.

OAuth Scope

Use the scope

ZohoMail.tasks.ALL (or) ZohoMail.tasks.CREATE

to generate the Authtoken.

ALL - Full access to tasks.

CREATE - Create a new custom status for tasks.

Request URL

Method: POST

Group Task:

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

Personal Task:

https://mail.zoho.com/api/tasks/me/customStatus

Path Parameters

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

Request Body ( JSON Object)

  • statusName* string
    • Specifies the name of the custom status to be added.
  • statusColour string
    • Specifies the color to represent the custom status.
    • The value must be provided in a hexadecimal color code format.

 

* - 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/78762952/customStatus" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken **************" \
-d '{
 "statusName": “Reopen”,
 "statusColour": “#2E8BD2“
}'

Sample Response - Group Tasks

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {
    "statusColour": "#2E8BD2",
    "statusName": "Reopen",
    "status": 11
  }
}

Sample Request - Personal Tasks

Copiedcurl "https://mail.zoho.com/api/tasks/me/customStatus" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ************" \
-d '{
 "statusName": “Testing”,
 "statusColour": “#2E8BD3“
}'

Sample Response - Personal Tasks

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {
    "statusColour": "#2E8BD3",
    "statusName": "Testing",
    "status": 12
  }
}