Create Group

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

This API creates a new user group in a WorkDrive team.

Endpoints

OAuth Scope

WorkDrive.groups.CREATECopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/workdrive/api/v1/groups \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/vnd.api+json' \
  --data '{"data":{"attributes":{"parent_id":"ly9zmae16b43c258f458a9a57ac02c4f8d763","name":"Employees","description":"Groups for employees","type":"1"},"type":"groups"}}'

Request Body

application/vnd.api+json
dataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
parent_idstring(Required)

The unique ID of the team.

namestring(Required)

The name of the group.

descriptionstring(Optional)

A detailed overview of the group.

typeinteger(Required)

The type of the group:

  • 1 - WorkDrive Group.
  • 2 - ZohoOne Group / Org Group.

typestring(Required)

The JSON:API resource type. Always "groups".

Allowed Values :
Show Values
groupsCopied!
Copied!Copy all as JSON Array

Body Parameters

Copied!
  {
    "data": {
      "attributes": {
        "parent_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
        "name": "Employees",
        "description": "Groups for employees",
        "type": "1"
      },
      "type": "groups"
    }
  }
                
Show full

Response Example

A001

I007

R701

I026

I026

F000

201
201
400
401
422
500
Copied!
  {
    "data": [
      {
        "id": "ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002020",
        "type": "groups",
        "attributes": {
          "owner": "747937818",
          "created_time": "Apr 13, 12:15 AM",
          "capabilities": {
            "can_read": true,
            "can_delete": true,
            "can_edit": true,
            "can_trash": true,
            "can_rename": true,
            "can_restore": true,
            "can_add_members": true
          },
          "description": "",
          "type": 1,
          "created_by": "Zylker Creation",
          "modified_time": "Apr 13, 12:15 AM",
          "avatar_url": "https://js.zohostatic.com/personal/stable/jsapps/ui-lab/dist/assets/dev/svg-icons/common/groups_logo-1b99e1d06fa5e3bb404e335e6ce2f43a.svg",
          "parent_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
          "name": "Employees",
          "modified_by": "Zylker Creation",
          "members_count": 1,
          "status": 1
        },
        "relationships": {
          "groupmembers": {
            "links": {
              "self": "https://www.zohoapis.com/workdrive/groups/ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002020/relationships/groupmembers",
              "related": "https://www.zohoapis.com/workdrive/groups/ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002020/groupmembers"
            }
          }
        },
        "links": {
          "self": "https://www.zohoapis.com/workdrive/groups/ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002020"
        }
      },
      {
        "id": "ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002021",
        "type": "groups",
        "attributes": {
          "owner": "747937818",
          "created_time": "Apr 13, 12:15 AM",
          "capabilities": {
            "can_read": true,
            "can_delete": true,
            "can_edit": true,
            "can_trash": true,
            "can_rename": true,
            "can_restore": true,
            "can_add_members": true
          },
          "description": "",
          "type": 1,
          "created_by": "Zylker Creation",
          "modified_time": "Apr 13, 12:15 AM",
          "avatar_url": "https://js.zohostatic.com/personal/stable/jsapps/ui-lab/dist/assets/dev/svg-icons/common/groups_logo-1b99e1d06fa5e3bb404e335e6ce2f43a.svg",
          "parent_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
          "name": "Managers",
          "modified_by": "Zylker Creation",
          "members_count": 1,
          "status": 1
        },
        "relationships": {
          "groupmembers": {
            "links": {
              "self": "https://www.zohoapis.com/workdrive/groups/ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002021/relationships/groupmembers",
              "related": "https://www.zohoapis.com/workdrive/groups/ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002021/groupmembers"
            }
          }
        },
        "links": {
          "self": "https://www.zohoapis.com/workdrive/groups/ly9zmae16b43c258f458a9a57ac02c4f8d763-2774428000000002021"
        }
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "A001",
        "title": "Invalid action type passed"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "I007",
        "title": "Unauthorized App"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R701",
        "title": "Group with same name exists in your team. Please use a different name"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "I026",
        "title": "Invalid resource type"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F000",
        "title": "General exception"
      }
    ]
  }
                
Show full