---
title: "Add a member to a group (team)"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a member to a group (team)

Path: CloudRaker Workspace API › Authorization

`POST /authorization/groups/{groupId}/members`

Adds an organization membership to the group named by the `groupId` path parameter, applying the group’s grants to that member. Authorization: organization administrators only — other callers get 403. Body: `organizationMembershipId` (required). Returns the group with status 201.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `groupId` (`addGroupMember.path.groupId`; string, required)

## Request body

_Required._

- `organizationMembershipId` (`addGroupMember.organizationMembershipId`; string, required)
  - minLength 1

## Example request

```json
{
  "organizationMembershipId": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/authorization/groups/<groupId>/members' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "organizationMembershipId": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/authorization/groups/<groupId>/members';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({organizationMembershipId: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/authorization/groups/<groupId>/members"

payload = { "organizationMembershipId": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

The member was added; the group is returned.

#### Example

```json
{
  "id": "string",
  "organizationId": "string",
  "name": "Legal",
  "description": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `id` (`addGroupMember.response.201.id`; string, required)
- `organizationId` (`addGroupMember.response.201.organizationId`; string, required)
- `name` (`addGroupMember.response.201.name`; string, required)
  - example `"Legal"`
- `description` (`addGroupMember.response.201.description`; string | null, required)
- `createdAt` (`addGroupMember.response.201.createdAt`; string, required)
  - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
- `updatedAt` (`addGroupMember.response.201.updatedAt`; string, required)
  - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`addGroupMember.response.400.success`; boolean, required)
  - one of `false`
- `error` (`addGroupMember.response.400.error`; array<unknown>, required)
- `data` (`addGroupMember.response.400.data`; unknown, required)

### 403

Caller is not an org admin


Source: https://docs.cloudraker.com/workspace/api/authorization/add-group-member/index.md
