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

# List sub-workspaces

> The sub-workspaces of this API key's workspace, newest first. This includes workspaces Avina staff placed under it, which usually have no `external_id`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /workspaces
openapi: 3.1.0
info:
  title: Avina API
  version: 1.0.0-draft
  description: >
    The Avina developer API, for calling Avina from your own servers.


    **Authentication.** Send your workspace API key: `Authorization: Bearer
    <key>`. Create keys in

    the Avina dashboard under Settings → API keys.


    **Credits.** `GET /usage` reports your workspace's signal credits for the
    current billing

    period: the same credits and period the dashboard shows.


    **Conventions.** JSON with snake_case fields and UTC ISO-8601 timestamps.
    Paginated lists use

    `limit` + `after` cursor pagination. `POST` requests accept an
    `Idempotency-Key` header

    (kept 24 hours). Every response has `X-Request-Id`. Request bodies must be
    JSON

    (`415 invalid_request` otherwise) and are limited to 100 KB (`413
    invalid_request`). A

    `503 internal_error` means the API key could not be checked; retry the
    request.
servers:
  - url: https://api.avina.io/v1
    description: Production (proposed domain)
security:
  - apiKey: []
tags:
  - name: Account
  - name: Personas
  - name: Workspaces
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List sub-workspaces
      description: >-
        The sub-workspaces of this API key's workspace, newest first. This
        includes workspaces Avina staff placed under it, which usually have no
        `external_id`.
      operationId: listWorkspaces
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/After'
      responses:
        '200':
          description: A page of sub-workspaces, newest first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      description: Page size.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    After:
      name: after
      in: query
      required: false
      description: '`next_cursor` from the previous page.'
      schema:
        type: string
  schemas:
    WorkspaceList:
      type: object
      required:
        - object
        - data
        - has_more
        - next_cursor
      properties:
        object:
          type: string
          const: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
        has_more:
          type: boolean
        next_cursor:
          type:
            - string
            - 'null'
    Workspace:
      type: object
      required:
        - object
        - id
        - name
        - domain
        - external_id
        - billed_to
        - parent_workspace
        - created_at
        - provisioning
      properties:
        object:
          type: string
          const: workspace
        id:
          type: string
          format: uuid
        name:
          type: string
        domain:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        billed_to:
          type: string
          enum:
            - parent
            - self
        parent_workspace:
          type: object
          required:
            - name
          properties:
            name:
              type: string
        created_at:
          type: string
          format: date-time
        provisioning:
          type: object
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - not_started
                - in_progress
                - completed
              description: >-
                Setting up the workspace's data takes a while after it is
                created. `not_started` means setup has not started yet; for a
                workspace created through the API, it starts again when the
                create is repeated with the same `external_id`. A workspace
                Avina staff placed under this workspace is `completed` once its
                own setup finished.
        invited_admins:
          type: array
          items:
            type: string
          description: >-
            Only in the `POST /workspaces` response. The `admin_emails` invited
            by that request (empty when the request returned an existing
            workspace). An email that is already a member of the workspace is
            not invited.
      example:
        object: workspace
        id: 3f2b8a52-7c1e-4d7a-9a51-2d8f0e6c4b10
        name: Acme West
        domain: acmewest.com
        external_id: crm-account-4821
        billed_to: parent
        parent_workspace:
          name: Acme
        created_at: '2026-10-13T17:02:11Z'
        provisioning:
          status: in_progress
        invited_admins:
          - owner@acmewest.com
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - invalid_api_key
                - permission_denied
                - not_found
                - workspace_exists
                - idempotency_key_reused
                - rate_limited
                - internal_error
                - timeout
            message:
              type: string
            request_id:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: foo is not a recognized field
              request_id: req_8f2a
              details:
                - field: foo
                  message: is not a recognized field
    Unauthorized:
      description: The API key is missing, invalid or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_api_key
              message: The API key is invalid or revoked.
              request_id: req_8f2a
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Workspace API key from the Avina dashboard (Settings → API keys).

````

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