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

# Get Workspaces

> Retrieves all workspaces accessible to the authenticated user

Retrieves all workspaces accessible to the authenticated user. Workspaces are containers that organize your cards and team collaboration in CardClan.

## Response Details

The response returns an array containing workspace choices formatted for integration platforms:

* **key**: Always "workspace" to identify the data type
* **choices**: Array of available workspaces with their details

Each workspace in the choices array includes:

* **id**: Unique workspace identifier (use this for other API calls)
* **name**: Human-readable workspace name
* **key**: Same as ID (for integration platform compatibility)
* **label**: Description of the field type
* **value**: Display name for the workspace

## Use Cases

* **Dynamic Workspace Selection**: Let users choose which workspace to send cards from
* **Multi-Tenant Applications**: Support customers with multiple workspaces
* **Automation Setup**: Discover available workspaces for workflow configuration
* **Access Validation**: Verify which workspaces the integration key can access

## Response Example

```json theme={null}
[
  {
    "key": "workspace",
    "choices": [
      {
        "key": "60f7b2b5b8f4a20015a4f5a4",
        "label": "Workspace Id",
        "value": "Marketing Team",
        "id": "60f7b2b5b8f4a20015a4f5a4",
        "name": "Marketing Team"
      },
      {
        "key": "60f7b2b5b8f4a20015a4f5a5",
        "label": "Workspace Id", 
        "value": "Sales Team",
        "id": "60f7b2b5b8f4a20015a4f5a5",
        "name": "Sales Team"
      }
    ]
  }
]
```

## Next Steps

After getting workspaces, you typically want to:

1. **Get Cards**: Use the workspace ID to retrieve available cards
2. **Set Up Integration Config**: Create configurations linking cards to workflows
3. **Send Cards**: Execute card delivery using the workspace's cards


## OpenAPI

````yaml GET /integration/workspaces
openapi: 3.1.0
info:
  title: CardClan Integration API
  description: >-
    The CardClan Integration API enables third-party applications and automation
    platforms to send personalized digital cards, manage workflows, and
    integrate CardClan's functionality into existing systems.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://app.cardclan.io/api
security:
  - bearerAuth: []
paths:
  /integration/workspaces:
    get:
      tags:
        - Data Retrieval
      summary: Get User Workspaces
      description: Retrieves all workspaces accessible to the authenticated user
      responses:
        '200':
          description: Workspaces retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesResponse'
        '400':
          description: Error fetching workspaces
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WorkspacesResponse:
      type: array
      items:
        type: object
        properties:
          key:
            type: string
            example: workspace
          choices:
            type: array
            items:
              $ref: '#/components/schemas/Workspace'
    Error:
      type: object
      properties:
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Card ID is required
        statusCode:
          type: number
          example: 400
        timestamp:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00.000Z'
    Workspace:
      type: object
      properties:
        key:
          type: string
          example: 60f7b2b5b8f4a20015a4f5a4
        label:
          type: string
          example: Workspace Id
        value:
          type: string
          example: My Business Workspace
        id:
          type: string
          example: 60f7b2b5b8f4a20015a4f5a4
        name:
          type: string
          example: My Business Workspace
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Enter your CardClan integration key

````