> ## 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 workspace keys

> The workspace's tenant-scoped keys — the primary and the named `ps_workspace_` ones — masked, never the raw key. Owner or Admin in that workspace (`apikeys:read`). Not a member, or a workspace that does not exist or is archived: the same `403 WORKSPACE_MEMBERSHIP_REQUIRED`. Number keys are listed on `GET /v1/api-keys`.

**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/{workspaceId}/api-keys
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/{workspaceId}/api-keys:
    get:
      tags:
        - Workspace
      summary: List workspace keys
      description: >-
        The workspace's tenant-scoped keys — the primary and the named
        `ps_workspace_` ones — masked, never the raw key. Owner or Admin in that
        workspace (`apikeys:read`). Not a member, or a workspace that does not
        exist or is archived: the same `403 WORKSPACE_MEMBERSHIP_REQUIRED`.
        Number keys are listed on `GET /v1/api-keys`.


        **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_api_keys
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
          description: Workspace id, from `GET /v1/workspaces`.
          example: cmh2a9z8y0002ws8example1q
      responses:
        '200':
          description: The keys
          content:
            application/json:
              example:
                data:
                  - id: cmh2aa0010003ak8example4d
                    name: Workspace API Key
                    prefix: ps_workspace_
                    last4: 3b5d
                    isPrimary: true
                    createdAt: '2026-10-28T09:15:00.000Z'
                    lastUsedAt: '2026-10-28T09:20:11.000Z'
                  - id: cmh2ab7770004ak8example9m
                    name: Billing integration
                    prefix: ps_workspace_
                    last4: a1c0
                    isPrimary: false
                    createdAt: '2026-10-28T09:15:00.000Z'
                    lastUsedAt: null
          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.