> ## 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 account groups

> The workspace's account groups (the groups in the post editor's account picker), in the order the editor shows them, with the numeric IDs of the accounts in each. Pass a group's `account_ids` as `accounts` when you [create a post](/publishing/posts/create-a-post), or its `uuid` as `group` to [list its accounts](/publishing/accounts/list-accounts).

**Required permission:** `publishing:accounts:read`



## OpenAPI

````yaml /api-reference/publishing.openapi.json get /{workspace}/accounts/groups
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:
  /{workspace}/accounts/groups:
    get:
      tags:
        - Accounts
      summary: List account groups
      description: >-
        The workspace's account groups (the groups in the post editor's account
        picker), in the order the editor shows them, with the numeric IDs of the
        accounts in each. Pass a group's `account_ids` as `accounts` when you
        [create a post](/publishing/posts/create-a-post), or its `uuid` as
        `group` to [list its accounts](/publishing/accounts/list-accounts).


        **Required permission:** `publishing:accounts:read`
      operationId: accounts.groups
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            Your workspace UUID. With a workspace API key it must be the key's
            workspace; a personal access token works in every workspace you
            belong to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountGroup'
components:
  schemas:
    AccountGroup:
      type: object
      properties:
        id:
          type: integer
          example: 12
        uuid:
          type: string
          format: uuid
        name:
          type: string
          example: Clients
        account_ids:
          type: array
          items:
            type: integer
          description: >-
            Numeric IDs of the accounts in the group, the IDs `accounts` takes
            when you create a post.
          example:
            - 101
            - 102
        accounts_count:
          type: integer
          example: 2
  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.