> ## 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 Invites

> Requires workspace admin access. Personal Access Tokens must include `workspaces-write` and belong to a workspace admin. Lists pending & accepted invites.

# List Workspace Invites

Retrieve all pending or accepted invitations for a workspace.

## Authentication & Scope

Requires workspace admin access.

For Personal Access Tokens, the token must include the `workspaces-write` ability and the token owner must be an admin of the workspace. Non-admin workspace members and tokens with only `workspace-users-read` cannot list invites.

## Request

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

### Path Parameters

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

## Response

`200 OK` – Array of Invite objects.

```json theme={null}
[
  {
    "id": 55,
    "email": "invitee@example.com",
    "role": "user",
    "status": "pending",
    "valid_until": "2024-06-25T23:59:59Z"
  }
]
```

`403 Forbidden` – You are not a workspace admin, or your token lacks `workspaces-write`.


## OpenAPI

````yaml get /open/workspaces/{workspaceId}/invites
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}/invites:
    get:
      tags:
        - Workspace Users
      summary: List Workspace Invites
      description: >-
        Requires workspace admin access. Personal Access Tokens must include
        `workspaces-write` and belong to a workspace admin. Lists pending &
        accepted invites.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invite'
        '403':
          description: Forbidden
      security:
        - bearerAuth: []
components:
  schemas:
    Invite:
      type: object
      properties:
        id:
          type: number
        email:
          type: string
          format: email
        role:
          type: string
          enum:
            - admin
            - user
            - readonly
        status:
          type: string
          enum:
            - pending
            - accepted
        valid_until:
          type: string
          format: date-time
          description: Expiration timestamp for the invite
  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)

````