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

# Get Workspaces

> Get all workspaces the user has access to

## Overview

Returns a list of all workspaces the authenticated user belongs to, including their role and permissions in each workspace.

## Query Parameters

<ParamField query="workspaceId" type="integer">
  Optional. When provided, the response includes detailed permissions for the user in that specific workspace.
</ParamField>

## Response

<ResponseField name="workspaces" type="array">
  Array of workspace objects

  <Expandable title="Workspace properties">
    <ResponseField name="id" type="integer">
      Unique workspace identifier
    </ResponseField>

    <ResponseField name="name" type="string">
      Workspace name
    </ResponseField>

    <ResponseField name="avatar" type="string">
      URL to workspace avatar image
    </ResponseField>

    <ResponseField name="owner_id" type="integer">
      ID of the workspace owner
    </ResponseField>

    <ResponseField name="members_count" type="integer">
      Number of members in the workspace
    </ResponseField>

    <ResponseField name="currentUser" type="object">
      Current user's membership details including role
    </ResponseField>

    <ResponseField name="owner" type="object">
      Workspace owner details
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Workspace creation timestamp
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      Last update timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://app.drime.cloud/api/v1/me/workspaces \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/me/workspaces', {
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const { workspaces } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://app.drime.cloud/api/v1/me/workspaces',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  workspaces = response.json()['workspaces']
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "workspaces": [
      {
        "id": 1873,
        "name": "My Workspace",
        "avatar": "https://www.gravatar.com/avatar/...",
        "owner_id": 15843,
        "created_at": "2025-12-18T18:39:07.000000Z",
        "updated_at": "2025-12-18T18:39:07.000000Z",
        "members_count": 1,
        "currentUser": {
          "role_name": "Workspace Owner",
          "email": "user@example.com",
          "workspace_id": 1873,
          "role_id": 3,
          "is_owner": true
        },
        "owner": {
          "role_name": "Workspace Owner",
          "email": "user@example.com",
          "is_owner": true
        }
      }
    ],
    "status": "success"
  }
  ```
</ResponseExample>
