Members: insert

Requires authorization

Adds a user to the specified group. Try it now.

Request

HTTP request

POST https://www.googleapis.com/admin/directory/v1/groups/groupKey/members

Parameters

Parameter name Value Description
Path parameters
groupKey string Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/admin.directory.group.member
https://www.googleapis.com/auth/admin.directory.group

Request body

In the request body, supply a Members resource with the following properties:

Property name Value Description Notes
Optional Properties
role string The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center.

Acceptable values are:
  • "MANAGER": This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members.
  • "MEMBER": This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center.
  • "OWNER": This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER.
writable

Response

If successful, this method returns a Members resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Directory API
Directory API