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

# List your workspaces

> Every workspace you belong to, most recently updated first, with its `uuid` and your `role`. Use the `uuid` in Publishing URLs and in the `X-Workspace` header of the Messaging and Link in Bio APIs.

Personal access tokens only: a workspace API key gets `403`.

**Required permission:** any publishing permission.



## OpenAPI

````yaml /api-reference/publishing.openapi.json get /workspaces
openapi: 3.1.0
info:
  title: Publishing API
  version: 1.0.0
  description: >-
    Social accounts, posts, scheduling, approval, tags, media and analytics for
    one workspace. Authenticate with a workspace API key or a personal access
    token; the workspace UUID is part of every URL.
servers:
  - url: https://app.onlysocial.io/os/api
    description: OnlySocial
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Diagnostics
  - name: Workspaces
  - name: Accounts
  - name: Posts
  - name: Media
  - name: Tags
  - name: Analytics
    description: >-
      Followers, reach, engagement and post performance, as the analytics
      dashboard shows them, plus when to post. Dates are UTC days unless a
      `timezone` is sent. Figures compared with the previous period of the same
      length are `{value, change}`, where `change` is a percentage (`100` when
      the previous period was zero, `null` when both are). Time series are lists
      of `{date, value}` points; breakdowns (ages, countries, keywords) are
      lists of `{label, value}`.
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List your workspaces
      description: >-
        Every workspace you belong to, most recently updated first, with its
        `uuid` and your `role`. Use the `uuid` in Publishing URLs and in the
        `X-Workspace` header of the Messaging and Link in Bio APIs.


        Personal access tokens only: a workspace API key gets `403`.


        **Required permission:** any publishing permission.
      operationId: workspaces.index
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 12
                        uuid:
                          type: string
                          format: uuid
                          example: c2a4f0d1-58e4-4c1b-a1f7-2b6f3e9d0a11
                        name:
                          type: string
                          example: Acme Marketing
                        pivot:
                          type: object
                          properties:
                            role:
                              type: string
                              enum:
                                - viewer
                                - member
                                - admin
                              example: admin
                            can_approve:
                              type: boolean
                              example: true
                            joined_at:
                              type: string
                              example: '2026-01-14 10:22:31'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A workspace API key (`Authorization: Bearer osk_...`) or a personal
        access token.
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        A workspace API key in the `x-api-key` header. Personal access tokens
        must use `Authorization: Bearer`.

````

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