Account groups
Named sets of accounts in a workspace, such as one client's profiles. An account can belong to several groups. Pass a group's account_ids as a post's accounts to post to the whole group.
List account groups
Returns every account group in the workspace, oldest first, each with the ids of its accounts. This endpoint is not paginated and accepts no query parameters. Every workspace role can call it, including VIEWER.
Create an account group
Creates an account group. `name` is required; `accounts` is optional, so a group can start empty. Every account must belong to the workspace. Returns `201 Created` with the new group. Requires the ADMIN or MEMBER workspace role; the VIEWER role receives `403`.
Get an account group
Returns a single account group by its UUID, with the ids of its accounts. The response is a bare object (not wrapped in `data`). Every workspace role can call it, including VIEWER.
Update an account group
Renames an account group, changes its accounts, or both. Only the fields sent are changed: sending only `name` keeps the accounts, and sending only `accounts` keeps the name. `accounts` replaces the whole set, so to add or remove one account send the group's current `account_ids` with that change; an empty array empties the group. Returns the updated group. Requires the ADMIN or MEMBER workspace role; the VIEWER role receives `403`.
Delete an account group
Deletes an account group. Only the group is removed: its accounts stay connected and their posts are untouched. Requires the ADMIN or MEMBER workspace role; the VIEWER role receives `403`.