# Workspace Users (Coinbax Core API)

> Source: https://developers.coinbax.com/reference/coinbax-core/workspace-users/
> Staging base URL: https://core-staging.coinbax.com/api/v1

## List workspace users

`GET /workspaces/{id}/users`

- Auth: Bearer token
- Operation ID: `listWorkspaceUsers`

Retrieve a paginated list of users belonging to a specific workspace.

**Permissions:** ADMIN or SUPER_ADMIN only

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes | Workspace UUID |
| `page` | query | integer | no |  |
| `limit` | query | integer | no |  |

### Example request

```bash
curl https://core-staging.coinbax.com/api/v1/workspaces/<id>/users \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Responses

**200** Users list retrieved successfully

```json
{
  "success": true,
  "meta": {
    "timestamp": "2026-02-24T12:00:00.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 150,
      "totalPages": 8
    }
  },
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "admin@coinbax.com",
      "firstName": "Admin",
      "lastName": "User",
      "role": "ADMIN",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "emailVerified": true,
      "avatarPath": "/uploads/avatars/user-123.png",
      "createdAt": "2026-01-15T10:00:00.000Z",
      "updatedAt": "2026-02-20T14:30:00.000Z"
    }
  ]
}
```

**401** Unauthorized - missing or invalid authentication

**403** Forbidden - insufficient permissions

**404** Resource not found

**500** Internal server error

---

## Invite users to workspace

`POST /workspaces/me/invite-users`

- Auth: Bearer token
- Operation ID: `inviteWorkspaceUsers`

Invite team members to the authenticated user's workspace organization.
Creates user accounts and sends invitation emails with temporary passwords.

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `users` | array of object | yes |  |

```json
{
  "users": [
    {
      "email": "john.doe@example.com",
      "firstName": "John",
      "lastName": "Doe"
    },
    {
      "email": "jane.smith@example.com",
      "firstName": "Jane",
      "lastName": "Smith"
    }
  ]
}
```

### Example request

```bash
curl -X POST https://core-staging.coinbax.com/api/v1/workspaces/me/invite-users \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "users": [
    {
      "email": "john.doe@example.com",
      "firstName": "John",
      "lastName": "Doe"
    },
    {
      "email": "jane.smith@example.com",
      "firstName": "Jane",
      "lastName": "Smith"
    }
  ]
}'
```

### Responses

**200** Invitation batch processed

```json
{
  "success": true,
  "data": {
    "invited": 2,
    "failed": 0,
    "users": [
      {
        "id": "uuid-1",
        "email": "john.doe@example.com",
        "firstName": "John",
        "lastName": "Doe"
      },
      {
        "id": "uuid-2",
        "email": "jane.smith@example.com",
        "firstName": "Jane",
        "lastName": "Smith"
      }
    ]
  },
  "meta": {
    "timestamp": "2026-02-24T12:00:00.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```

**400** Bad request - validation error

**401** Unauthorized - missing or invalid authentication

**500** Internal server error
