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

# List your workspaces

> The workspaces the account key's user is an ACTIVE member of, with the user's role in each, oldest membership first. Archived workspaces are left out. Use an `id` in `x-workspace-id` to act inside that workspace with the same account key.

**Requires an account key** (`ps_account_`, created in Profile → API). Workspace keys, number keys and OAuth/MCP tokens get `403 ACCOUNT_KEY_REQUIRED`. Sent with `Cache-Control: no-store`.



## OpenAPI

````yaml openapi.json GET /v1/workspaces
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    Public REST API for Pilot Status. Authenticate with the `x-api-key: ps_...`
    header (or `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/workspaces:
    get:
      tags:
        - Workspace
      summary: List your workspaces
      description: >-
        The workspaces the account key's user is an ACTIVE member of, with the
        user's role in each, oldest membership first. Archived workspaces are
        left out. Use an `id` in `x-workspace-id` to act inside that workspace
        with the same account key.


        **Requires an account key** (`ps_account_`, created in Profile → API).
        Workspace keys, number keys and OAuth/MCP tokens get `403
        ACCOUNT_KEY_REQUIRED`. Sent with `Cache-Control: no-store`.
      operationId: get_workspaces
      responses:
        '200':
          description: Your workspaces
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Workspace id — the value of `x-workspace-id`.
                        name:
                          type: string
                        role:
                          type: string
                          enum:
                            - OWNER
                            - ADMIN
                            - AGENT
                            - ANALYST
                          description: Your role in that workspace.
                        plan:
                          type: string
                          description: >-
                            Current plan (`FREE`, `PAY_AS_YOU_GO`, `ON_DEMAND`,
                            …).
                        createdAt:
                          type: string
                          format: date-time
                        sharedCard:
                          type: object
                          description: >-
                            Whether the workspace is linked to a shared
                            (reserve) card, and to which source workspace.
                          properties:
                            linked:
                              type: boolean
                              description: >-
                                `true` when the workspace falls back to the
                                reserve card of `sourceWorkspaceId`.
                            sourceWorkspaceId:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The workspace whose saved card backs this one;
                                `null` when not linked.
                          required:
                            - linked
                            - sourceWorkspaceId
              example:
                data:
                  - id: cmh2a9z8y0002ws8example1q
                    name: Bakery Downtown
                    role: OWNER
                    plan: PAY_AS_YOU_GO
                    createdAt: '2026-10-28T09:15:00.000Z'
                    sharedCard:
                      linked: true
                      sourceWorkspaceId: cmh2a1b2c0001ws8example7k
          headers:
            Cache-Control:
              schema:
                type: string
              example: no-store
        '401':
          description: Missing, invalid or revoked API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Invalid API key
        '403':
          description: >-
            Not an account key (`ACCOUNT_KEY_REQUIRED`), not an active member of
            the workspace (`WORKSPACE_MEMBERSHIP_REQUIRED`), or a role below
            Admin (`PERMISSION_DENIED`)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  This endpoint requires an account API key (ps_account_…),
                  created in Profile → API. Workspace keys, number keys and
                  OAuth tokens cannot use it | Este endpoint exige uma API key
                  de conta (ps_account_…), criada em Perfil → API. Chaves de
                  workspace, de número e tokens OAuth não podem usá-lo
                code: ACCOUNT_KEY_REQUIRED
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ps_ API key
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: API key id (alternative to x-api-key)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.