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

# List workspaces

> Returns every workspace you're a member of, oldest first.

If your API key is scoped to specific workspaces, you'll only see those — even if you're a member of others. This stops a leaked key from revealing the existence of workspaces it shouldn't reach.



## OpenAPI

````yaml /openapi.json get /workspaces
openapi: 3.0.0
info:
  title: Postbreeze API
  description: >-
    Public REST API for scheduling and managing social posts. Authenticate every
    request with `Authorization: Bearer pb_live_…`. All endpoints are scoped to
    a single workspace; an API key issued for workspace A cannot access
    workspace B.
  version: 1.0.0
  contact: {}
servers:
  - url: http://localhost:4100/api/v1
security:
  - bearer: []
tags: []
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces
      description: >-
        Returns every workspace you're a member of, oldest first.


        If your API key is scoped to specific workspaces, you'll only see those
        — even if you're a member of others. This stops a leaked key from
        revealing the existence of workspaces it shouldn't reach.
      operationId: WorkspacesController_list
      parameters: []
      responses:
        '200':
          description: Array of workspaces the caller can access.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Prefixed cuid identifier.
                    name:
                      type: string
                      description: Display name.
                    slug:
                      type: string
                      description: Globally unique URL slug.
                    ownerUserId:
                      type: string
                      description: User id of the workspace owner.
                    timezone:
                      type: string
                      description: IANA timezone the workspace is scheduled against.
                    timeFormat:
                      type: string
                      enum:
                        - H24
                        - H12
                      description: Hour format used in the UI.
                    brandColor:
                      type: string
                      nullable: true
                      description: >-
                        Brand hex color used in the dashboard chrome. `null`
                        when unset.
                    logoUrl:
                      type: string
                      nullable: true
                      description: Workspace logo URL. `null` when unset.
                    deletedAt:
                      type: string
                      format: date-time
                      nullable: true
                      description: >-
                        Set when the workspace has been soft-deleted; otherwise
                        `null`.
                    createdAt:
                      type: string
                      format: date-time
                    updatedAt:
                      type: string
                      format: date-time
                    memberships:
                      description: >-
                        Memberships filtered to the calling user — always
                        exactly one row in this listing.
                      type: array
                      items:
                        type: object
                        properties:
                          role:
                            type: string
                            enum:
                              - OWNER
                              - MEMBER
                              - ADMIN
                              - EDITOR
                              - CLIENT_REVIEWER
                            description: >-
                              The caller's role in this workspace. Drives which
                              destructive operations are allowed.
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 400
                  code:
                    type: string
                    example: VALIDATION_FAILED
                  message:
                    type: string
                  requestId:
                    type: string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized
                  requestId:
                    type: string
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Your Postbreeze API key

````