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

# List workspaces

> List all workspaces in the company



## OpenAPI

````yaml /agency-api/openapi.json get /workspaces
openapi: 3.1.1
info:
  title: Ordinal Agency API
  version: 1.0.0
  description: API for agencies to manage multiple Ordinal workspaces
servers:
  - url: https://app.tryordinal.com/api/v1/company
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces in your company
  - name: API Keys
    description: Create and manage workspace API keys
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces
      description: List all workspaces in the company
      operationId: workspaces-list
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspaces:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        slug:
                          type: string
                        timezone:
                          anyOf:
                            - type: string
                            - type: 'null'
                        createdAt:
                          type: string
                          format: date-time
                          x-native-type: date
                      required:
                        - id
                        - name
                        - slug
                        - timezone
                        - createdAt
                required:
                  - workspaces
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
              examples:
                validationError:
                  summary: Validation error
                  value:
                    code: BAD_REQUEST
                    message: Bad Request
                    data:
                      errors:
                        id:
                          - Invalid UUID
                        email:
                          - Invalid email address
        '401':
          description: Unauthorized - User is not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                  message:
                    type: string
              examples:
                unauthorized:
                  summary: API Key Revoked
                  value:
                    code: UNAUTHORIZED
                    message: API key was revoked at 2025-8-24T02:29:50.000Z
        '404':
          description: Not Found - Resource does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
              examples:
                notFound:
                  summary: Resource not found
                  value:
                    code: NOT_FOUND
                    message: Resource not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Company API key (starts with ord_c_)

````