POST - Create New Group Task

Purpose

This API is used to add a new task to the specified group.

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 task.

Request URL

Method: POST

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

Path Parameters

  • zgidlong
    • This parameter is used to identify the group in which the new task has to be created.
    • This parameter can be retrieved from the Get all groups API.

Request Body ( JSON Object)

  • title* string
    • Provide a title for the task that is being added.
  • description string
    • Provide a short description of the task being added.
  • status string
    • Provide the status of the completion of this task.
    • Possible values :
      • inprogress
      • completed
  • priority string
    • Provide the priority to be given for this task.
    • Possible values :
      • high 
      • medium
      • low
  • projectId long
  • parentTaskId long
    • Specifies the unique identifier given for the parent task.
  • dueDate string
    • Specifies the due date that you want to set for the task.
    • Format: "DD/MM/YYYY" (e.g.: 23/01/2024).
  • dueDateRemindersEnabled boolean
    • Specifies whether reminders on the date when the task is due are enabled or disabled.
    • Possible values :
      • true (enable).
      • false (disable).
  • reminderDate string
    • Specifies the date and time when you want to be reminded about the task.
    • Format: ISO 8601 (e.g.:2024-01-23T12:34:56+05:30).
  • emailReminder boolean
    • Specifies whether the reminders need to be sent via email.
    • Possible values :
      • true (enable reminder via email).
      • false (disable reminder via email).
  • popupReminder boolean
    • Specifies whether reminder notifications need be sent.
    • Possible values :
      • true (enable reminder notification).
      • false (disable reminder notification).
  • remindOwner boolean
    • Specifies whether the task owner needs to reminded.
    • Possible values :
      • true (enable to remind owner).
      • false (disable to remind owner).
  • remindAssignee boolean
    • Specifies whether the member to whom the task is assigned needs to be reminded.
    • Possible values :
      • true (enable to remind assignee).
      • false (disable to remind assignee).
  • assignee* long
    • Specifies the zuid of the member to whom the task is assigned.
    • This parameter can be retrieved from the User Account Details API.
  • subtask JSON Object
    • Provide the details of the subtask that has to be added as a task.
    • The parameters of this JSON Object are the same as the task.
  • accountId long
    • Specifies the account identifier for a specific account of a particular user.
    • This parameter can be retrieved from the User Account Details API.
  • messageId long
  • followers JSON Array of objects
    • This parameter should be passed as an array of single or multiple objects where each object represents members who need to follow this task.
    • Each object has the following parameters 
      • name string
        • Specifies the name of the follower.
      • id long
        • Specifies the zuid of the member who is added as a follower.
      • group boolean
        • Specifies whether the follower is a part of the group or not.
        • The possible values:
          • true (The follower is a part of the group).
          • false (The follower is not a part of the group).
  • lockInvites boolean
    • Specifies whether the permission to invite members has to be enabled or disabled.
    • Possible values :
      • true (to lock invite).
      • false (to unlock invite).
  • allowComments boolean
    • Specifies whether the comments for the task can be allowed or not.
    • Possible values :
      • true (to allow comments).
      • false (to disallow comments).
  • Recurring type string
    • Specifies the recurrence pattern for the task.
    • Possible values :
      • Daily
      • Weekly
      • Monthly
      • Yearly
  • recurringFrequency integer
    • Specifies the frequency at which the task has to recur.
    • Acceptable values: Any positive number.
  • recurFrom string
    • Specifies the date from which recurrence has to start.
    • Format: "DD/MM/YYYY" (e.g.: 23/01/2024).
  • recurUntil string
    • Specifies the date until which the task has to recur.
    • Format: "DD/MM/YYYY" (e.g.: 23/01/2024).
  • recurFor integer
    • Specifies the number of times the task has to recur.
    • Acceptable values: Any positive number.
  • recurDailyOnlyOnWeekdays boolean
    • Specifies whether the task has to recur every day on the weekdays.
    • Possible values :
      • true 
      • false 
  • recurWeeklyOn integer
    • Specifies the day of the week when the task has to recur every week.
    • Possible values : (1 - 7), where 1 denotes Sunday and 7 denotes Saturday.
  • recurMonthlyOnDayOfWeekInMonth integer
    • Specifies the day of the week in a particular month when the task has to recur every month.
    • Possible values : Any date of the month.
  • recurMonthlyOnDayOfMonth boolean
    • Specifies the day of the month when the task has to recur every month.
    • Possible values : Any date of the month.
  • recurMonthlyOnDayOfWeek boolean
    • Specifies the day of the week when the task has to recur every month.
    • Possible values : (1 - 7), where 1 denotes Sunday and 7 denotes Saturday.
  • recurYearlyOnDayOfWeekInMonth integer
    • Specifies the day of the week in a particular month when the task has to recur every year
    • Possible values : (1 - 4). For example: 3 denotes 3rd week of the month.
  • recurYearlyOnDayOfMonth integer
    • Specifies the date of the month when the task has to recur every year.
    • Possible values : Any date of the month.
  • recurYearlyOnDayOfWeek integer
    • Specifies the day of the week when the task has to recur every year.
    • Possible values : (1 -7), where 1 denotes Sunday - 7 denotes Saturday.
  • recurYearlyOnMonth integer
    • Specifies the month when the task has to recur for that year.
    • Possible values : (0 - 11), where 0 denotes January and 11 denotes December.
  • attachStoreName JSON array of string
    • This parameter should be passed as an array of names for the uploaded attachments.
    • This parameter can be retrieved from the To Upload Attachments API.
  • attachPath JSON array of string
    • This parameter should be passed as an array of paths for the uploaded attachments.
    • This parameter can be retrieved from the To Upload Attachments API.

 

* - Mandatory parameter

Note:

The 'recurMonthlyOnDayOfWeekInMonth' and 'recurMonthlyOnDayOfWeek' parameters should be used together. The 'recurYearlyOnDayOfMonth' and the 'recurYearlyOnMonth' parameters should be used together. Similarly, the 'recurYearlyOnDayOfWeek' and the 'recurYearlyOnMonth' parameters should be used together.

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/tasks/groups/5365*****" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****" \

-d '{
  "title" : “Blog Updates”,
  "description" : “Revamp update blog and announcements”,
  "priority" : "high",
  "reminderDate" : "2018-03-28T17:47:40+05:30",
  "emailReminder" : "true",
  "assignee" : "54161899",
  "recurringType" : "Monthly",
  "dueDate" : "29/08/2018",
  "recurMonthlyOnDayOfMonth" : "1",
  "recurringFrequency"  : "2",
  "followers" : ["54938724"],
  "lockInvites" : "true",
  "allowComments" : "false",
  "projectId" : "48184000000005003",
  "accountId" : "48019000000005001",
  "messageId" : "48019000000032001"
}'

Sample Response

Copied{
    "status": {
        "code": 200,
        "description": "success"
    },
    "data": {
        "owner": {
            "name": "Rebecca",
            "id": 54136518
        },
        "numberOfSubtasks": 0,
        "modifiedTime": "2018-03-28T17:13:40+05:30",
        "attachments": [],
        "reminder": {
            "dateTime": "2018-03-28T17:47:40+05:30",
            "emailReminder": true,
            "popupReminder": false
        },
        "subtasks": [],
        "recurring": {
            "recurMonthlyOnDayOfMonth": 1,
            "type": "Monthly",
            "frequency": 2
        },
        "dueDate": "29/08/2018",
        "description": "Make the announcement ready for the recent revamp",
        "project": {
            "name": "Blogging",
            "id": "48184000000005003"
        },
        "title": "Blog Updates",
        "priority": "High",
        "tags": [],
        "createdAt": "2018-03-28T17:13:40+05:30",
        "followers": [
            {
                "name": "Justin Case",
                "id": 54224987,
                "group": true
            },
            {
                "name": "Marketing",
                "id": 54938724
            }
        ],
        "namespaceId": "54224987",
        "id": "48184000000093001",
        "assignee": {
            "name": "Paula M",
            "id": 54161899
        },
        "status": "In Progress"
    }
}