---
title: "Add member to group"
url: https://hexelstudio.com/docs/api/ciam-iam/groups/add-member-to-group
---

# Add member to group

**POST** `/groups/{group_id}/members`

The user must be a member or service user of the group's organization (422 not_org_member).

## Path parameters

- `group_id: string`

  Group ID

## Headers

- `Authorization: string`

  `Bearer <token>`.

## Returns

`201` Created (`GroupMember`)

- `added_at: optional string`

- `added_by_user_id: optional string`

- `group_id: optional string`

- `id: optional string`

- `user_id: optional string`

## Errors

- `400` Bad Request
- `422` Unprocessable Entity

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/groups/{group_id}/members' \
  --header "Authorization: Bearer $ACCESS_TOKEN"
```

### Response (201)

```json
{
  "added_at": "2026-01-01T00:00:00Z",
  "added_by_user_id": "string",
  "group_id": "string",
  "id": "string",
  "user_id": "string"
}
```

### Response (400)

```json
{
  "key": "string"
}
```

### Response (422)

```json
{
  "key": "string"
}
```
