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

# List Workspace Users

> Requires `workspace-users-read`. Returns members with their role.

# List Workspace Users

Fetch all members of a workspace, including their assigned role.

## Authentication & Scope

Requires `workspace-users-read` ability. The requesting user must belong to the workspace.

## Request

```http theme={null}
GET /open/workspaces/{workspaceId}/users HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter   | Type   | Description                      |
| ----------- | ------ | -------------------------------- |
| workspaceId | number | ID of the workspace to retrieve. |

No query parameters are supported.

## Response

`200 OK` – An array of user objects, each including a `role` field (from the pivot table).

```json theme={null}
[
  {
    "id": 3,
    "name": "Alice Porter",
    "email": "alice@example.com",
    "role": "admin"
  },
  {
    "id": 8,
    "name": "Bob Smith",
    "email": "bob@example.com",
    "role": "member"
  }
]
```

`403 Forbidden` – Token lacks `workspace-users-read` or you are not a member.


## OpenAPI

````yaml get /open/workspaces/{workspaceId}/users
openapi: 3.0.1
info:
  title: OpnForm API
  description: API for interacting with OpnForm, primarily used for Zapier integration
  version: 1.0.0
servers:
  - url: https://api.opnform.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Forms
    description: Manage and retrieve forms.
  - name: Submissions
    description: Access and manage form submissions.
  - name: Integrations
    description: Manage form integrations (webhooks) via API.
  - name: Zapier
    description: Legacy endpoints for the Zapier integration.
paths:
  /open/workspaces/{workspaceId}/users:
    get:
      tags:
        - Workspace Users
      summary: List Workspace Users
      description: Requires `workspace-users-read`. Returns members with their role.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserWorkspaceMember'
        '403':
          description: Forbidden
      security:
        - bearerAuth: []
components:
  schemas:
    UserWorkspaceMember:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        email:
          type: string
          format: email
        role:
          type: string
          description: Role of the user inside the workspace (admin, member, viewer).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Personal Access Token
      x-bearer-scopemap:
        workspaces-read: Read access to workspaces
        workspaces-write: Write access to workspaces
        workspace-users-read: Read access to workspace users
        workspace-users-write: Write access to workspace users
        forms-read: Read access to forms
        forms-write: Write access to forms
        manage-integrations: Manage form integrations (webhooks)

````