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

# List Workspaces

> Return the workspaces the authenticated user belongs to.

## Authentication & Scope

Requires the `workspaces-read` ability.

## Request

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

No query parameters are supported.

## Response

`200 OK` – An array of Workspace objects.

```json theme={null}
[
  {
    "id": 1,
    "name": "My Workspace",
    "icon": "📊",
    "settings": {},
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]
```

`403 Forbidden` – The token lacks `workspaces-read` or you do not have the necessary permissions.


## OpenAPI

````yaml get /workspaces
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List Workspaces
      description: >-
        Retrieve all workspaces the user has access to. Requires
        `workspaces-read`.
      operationId: listWorkspaces
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Workspace'
        '403':
          description: Forbidden
components:
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        icon:
          type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````