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

# List workspaces

> List all workspaces accessible to the API key.

Returns all workspaces owned by or shared with the authenticated user. Each workspace includes its computers (`desktops`).

## Response

<ResponseField name="workspaces" type="array">
  Array of workspace objects, each containing its `desktops`.
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.orgo.ai/api/workspaces \
    -H "Authorization: Bearer $ORGO_API_KEY"
  ```

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

  response = requests.get(
      "https://www.orgo.ai/api/workspaces",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  workspaces = response.json()["workspaces"]
  for ws in workspaces:
      n = len(ws.get("desktops") or [])
      print(f"{ws['name']}: {n} computers")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://www.orgo.ai/api/workspaces', {
    headers: { 'Authorization': `Bearer ${apiKey}` }
  });

  const { workspaces } = await response.json();
  workspaces.forEach(ws => {
    const n = (ws.desktops || []).length;
    console.log(`${ws.name}: ${n} computers`);
  });
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "workspaces": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "production",
      "user_id": "4d96f9a0-7727-4b63-889a-32544c206d7c",
      "status": "active",
      "icon_url": null,
      "created_at": "2026-04-07T10:30:00Z",
      "updated_at": "2026-04-07T10:30:00Z",
      "desktops": [
        {
          "id": "a3bb189e-8bf9-3888-9912-ace4e6543002",
          "name": "agent-1",
          "os": "linux",
          "ram": 4,
          "cpu": 1,
          "status": "running"
        }
      ]
    }
  ]
}
```


## OpenAPI

````yaml GET /workspaces
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Streaming
    description: Stream computer display via RTMP
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces
      description: Returns all workspaces for the authenticated user.
      operationId: listWorkspaces
      responses:
        '200':
          description: List of workspaces
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspaces:
                    type: array
                    items:
                      $ref: '#/components/schemas/Workspace'
              example:
                workspaces:
                  - id: 550e8400-e29b-41d4-a716-446655440000
                    name: production
                    user_id: 4d96f9a0-7727-4b63-889a-32544c206d7c
                    status: active
                    icon_url: null
                    created_at: '2026-04-07T10:30:00Z'
                    updated_at: '2026-04-07T10:30:00Z'
                    desktops: []
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: string
          description: Unique workspace identifier
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          description: Workspace name
          example: production
        user_id:
          type: string
          description: Owner user ID
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        icon_url:
          type: string
          nullable: true
          description: Optional icon URL
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````