Skip to Content
kosemdocs
ReferenceAPIGroups

Create group membership

Adds a member of the organization, one of its service accounts, or another of its groups, to a group.

POST
/v1/organizations/{organization}/groups/{group}/memberships

Adds a member of the organization, one of its service accounts, or another of its groups, to a group.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

Match^org_[0-7][0-9a-hjkmnp-tv-z]{25}$
group*string

The group's ID.

Match^grp_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request Body

application/json
  1. body
member*string

The member: user:{email} or user:{user_id} for a member of the organization, serviceAccount:{service_account_id}, or group:{group_id} for another of its groups.

Length1 <= length

Response Body

Created

application/json
  1. response
createTime*string

When the member joined the group.

Formatdate-time
member*string

The member: user:{user_id}, serviceAccount:{service_account_id} or group:{group_id}.

name*string

Resource name, organizations/{organization_id}/groups/{group_id}/memberships/{member_id}, where the member's ID is a user's, a service account's or a group's.

Example Request
curl -X POST 'https://api.kosem.ai/v1/organizations/string/groups/string/memberships' \
  -H 'Content-Type: application/json' \
  -d '{
  "member": "string"
}'
Example Response
{
  "createTime": "2019-08-24T14:15:22Z",
  "member": "string",
  "name": "string"
}