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

# List Workspaces

> Workspaces the API key owner belongs to. Pass a workspace id as organizationId to GET /v1/projects to scope the brand list to it.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces
openapi: 3.1.0
info:
  title: Migma.ai API (v1)
  description: >-
    API for managing brands, contacts, email generation, sending, and
    integrations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.migma.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Projects/Brands
    description: Manage projects (brands) and import from websites
  - name: Contacts
    description: Manage your contacts, segments, tags, and topics
  - name: Segments
    description: Create and manage dynamic contact segments
  - name: Tags
    description: Organize contacts with tags
  - name: Topics
    description: Manage subscription topics and preferences
  - name: Emails
    description: Generate, send, and export emails
  - name: Email Validation
    description: Validate email content for compatibility and deliverability
  - name: Email Previews
    description: Preview emails across devices and email clients
  - name: Domains
    description: Manage sending domains and verification
  - name: Webhooks
    description: Manage webhook endpoints for real-time event notifications
  - name: Events
    description: Record customer events and conversions
  - name: Integrations
    description: Third-party platform integrations
  - name: Campaigns
    description: Create, schedule, send, and manage email campaigns
  - name: Billing
    description: View your plan and credits and create billing links
  - name: Project Editing
    description: Edit project assets, logos, images, and knowledge base entries
paths:
  /v1/workspaces:
    get:
      tags:
        - Projects/Brands
      summary: List Workspaces
      description: >-
        Workspaces the API key owner belongs to. Pass a workspace id as
        organizationId to GET /v1/projects to scope the brand list to it.
      operationId: ListWorkspaces
      responses:
        '200':
          description: Workspaces for the authenticated user
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      workspaces:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            type:
                              type: string
                            role:
                              type: string
                              description: The caller's role in this workspace
                            personal:
                              type: boolean
                              description: True for the caller's personal workspace
      x-codeSamples:
        - lang: javascript
          label: Node.js SDK
          source: |-
            import Migma from 'migma';

            const migma = new Migma('YOUR_API_KEY');

            const { data, error } = await migma.workspaces.list();
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where
        YOUR_API_KEY is obtained from the Migma dashboard under Settings →
        Developers → API Keys.

````