---
title: "Add member to workspace"
url: https://hexelstudio.com/docs/api/ciam-core/workspaces/add-member-to-workspace
---

# Add member to workspace

**POST** `/workspaces/{workspace_id}/members`

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

## Path parameters

- `workspace_id: string`

  Workspace ID

## Headers

- `Authorization: string`

  `Bearer <token>`.

## Body parameters

- `created_at: optional string`

- `deleted_at: optional string`

- `id: optional string`

- `joined_at: optional string`

- `role: optional string`

  ADMIN, MEMBER, DEVELOPER, VIEWER

- `status: optional string`

  ACTIVE, INACTIVE, SUSPENDED

- `updated_at: optional string`

- `user_id: optional string`

- `workspace_id: optional string`

## Returns

`201` Created (`WorkspaceMember`)

- `created_at: optional string`

- `deleted_at: optional string`

- `id: optional string`

- `joined_at: optional string`

- `role: optional string`

  ADMIN, MEMBER, DEVELOPER, VIEWER

- `status: optional string`

  ACTIVE, INACTIVE, SUSPENDED

- `updated_at: optional string`

- `user_id: optional string`

- `workspace_id: optional string`

## Errors

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

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/workspaces/{workspace_id}/members' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "created_at": "2026-01-01T00:00:00Z",
  "deleted_at": "2026-01-01T00:00:00Z",
  "id": "string",
  "joined_at": "2026-01-01T00:00:00Z",
  "role": "string",
  "status": "string",
  "updated_at": "2026-01-01T00:00:00Z",
  "user_id": "string",
  "workspace_id": "string"
}'
```

### Response (201)

```json
{
  "created_at": "2026-01-01T00:00:00Z",
  "deleted_at": "2026-01-01T00:00:00Z",
  "id": "string",
  "joined_at": "2026-01-01T00:00:00Z",
  "role": "string",
  "status": "string",
  "updated_at": "2026-01-01T00:00:00Z",
  "user_id": "string",
  "workspace_id": "string"
}
```

### Response (400)

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

### Response (422)

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