Add Group Members

Purpose

This API is used to add members to the group and also define their roles in the group. 

OAuth Scope

Use the scope

ZohoMail.organization.groups.ALL (or) ZohoMail.organization.groups.UPDATE

to generate the Authtoken.

ALL - Full access to groups.

UPDATE - Update groups.

Request URL

Method : PUT

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

Path Parameters

  • zoid* long
    • This parameter denotes the unique Zoho Organization Identifier for the organization.
    • This parameter can be retrieved from the Organization Details API.
  • zgid* long
    • This parameter is used to identify the group in which the data has to be updated.
    • This parameter can be retrieved from the All Groups Details API.

 

Request Body (JSON Object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as addMailGroupMember.
  • mailGroupMemberList* JSON array of JSON object

    This array should contain objects detailing the members to be added to the group. Each object should have the following parameters:

    • memberEmailId* string
      • Provide the email address that should be added as a member of the group.
    • role string
      • This parameter specifies the role to be assigned to the member.
      • The possible values can be:
        • moderator
        • member

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/organization/99***293/groups/25606***" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" \
-d '{
    "mailGroupMemberList": [{
        "memberEmailId": "rebecca@zylker.com",
        "role": "moderator"
    },
    {
        "memberEmailId": "paula@zylker.com",
        "role": "member"
    }],
    "mode": "addMailGroupMember"
}'

Sample Request Body

Copied{
    "mailGroupMemberList": [{
        "memberEmailId": "rebecca@zylker.com",
        "role": "moderator"
    },
    {
        "memberEmailId": "paula@zylker.com",
        "role": "member"
    }],
    "mode": "addMailGroupMember"
}

Sample Response

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