# Create group membership

`POST /v1/organizations/{organization}/groups/{group}/memberships`, operation `groups.CreateGroupMembership`

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

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `organization` | path | Yes | `string` | The organization's ID. |
| `group` | path | Yes | `string` | The group's ID. |

## Request body

Content-Type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `member` | `string` | Yes | 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. |

## Responses

### 201

Created

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createTime` | `string (date-time)` | Yes | When the member joined the group. |
| `member` | `string` | Yes | The member: user:{user_id}, serviceAccount:{service_account_id} or group:{group_id}. |
| `name` | `string` | Yes | 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. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.