---
title: "Perform multiple operations with workspace groups"
method: POST
path: "/api/workspaces/groups/bulk"
tags: ["CRUD", "WorkspaceGroups"]
---

# Perform multiple operations with workspace groups

`POST /api/workspaces/groups/bulk`

## Request

- Base URL: `https://app.airfocus.com`
- URL: `https://app.airfocus.com/api/workspaces/groups/bulk`
- Auth: HTTP bearer

Accepts a list of create/update/patch/delete operations (see the request model for more details).<br/>
Each operation can target a single or multiple workspace groups.<br/>
Returns a list of results for each input operation including errors.<br/>
Guarantees that the size and order of the returned results matches the order of input operations.<br/>Requirements:<br/>- auth-client scopes: "workspace"<br/>- user permission: "write" or higher

## Query parameters

- `actAsAdmin` boolean

## Request body

- WorkspaceGroupBulkAction[]
  - union
    - WorkspaceGroupBulkCreate
      - `resource` WorkspaceGroupParams, required: Payload to create or update a workspace-group.
        - `defaultPermission` 'comment' | 'full' | 'read' | 'write'
        - `name` string, required: Name of this group.
        - `order` integer: Order number of this group for sorting. If omitted, the group is appended at the end on create and kept as-is on update.
        - `parentId` string, uuid: UUID of the parent group (if applicable).
      - `type` 'create', required
    - WorkspaceGroupBulkDelete
      - `id` string, uuid, required
      - `type` 'delete', required
    - WorkspaceGroupBulkPatch
      - `id` string, uuid, required
      - `transform` JsonPatchOperation[], required: A JSON Patch document. See https://jsonpatch.com/ for more information.
        - union
          - JsonPatchAdd
            - `op` 'add', required
            - `path` string, required
            - `value` unknown, required
          - JsonPatchCopy
            - `from` string, required
            - `op` 'copy', required
            - `path` string, required
          - JsonPatchMove
            - `from` string, required
            - `op` 'move', required
            - `path` string, required
          - JsonPatchRemove
            - `old` unknown
            - `op` 'remove', required
            - `path` string, required
          - JsonPatchReplace
            - `old` unknown
            - `op` 'replace', required
            - `path` string, required
            - `value` unknown, required
          - JsonPatchTest
            - `op` 'test', required
            - `path` string, required
            - `value` unknown, required
      - `type` 'patch', required
    - WorkspaceGroupBulkUpdate
      - `id` string, uuid, required
      - `resource` WorkspaceGroupParams, required: Payload to create or update a workspace-group.
        - `defaultPermission` 'comment' | 'full' | 'read' | 'write'
        - `name` string, required: Name of this group.
        - `order` integer: Order number of this group for sorting. If omitted, the group is appended at the end on create and kept as-is on update.
        - `parentId` string, uuid: UUID of the parent group (if applicable).
      - `type` 'update', required

## Response `200`

- WorkspaceGroupWithWorkspaceGroupEmbed[]
  - `_embedded` WorkspaceGroupEmbed, required: An object embedded into each workspace-group when retrieving/listing specific workspaces.
    - `currentPermission` 'comment' | 'full' | 'read' | 'write'
    - `permissions` object, required: All explicitly defined permissions for all users for this workspace-group.
    - `userGroupPermissions` object, required: All explicitly defined permissions for all user groups for this workspace-group.
    - `workspaces` Workspace[], required: List of workspaces which belongs to this workspace-group.
      - `alias` string: A custom code of this workspace (e.g. PROD, DEV, etc), which is used to create aliases for items (e.g. DEV-123). Alias should consist of 1-10 uppercase letters, and should be unique within the team.
      - `assigneeSettings` WorkspaceAssigneeSettings
        - `required` boolean, required: Whether the assignees field is required when creating or updating items.
      - `createdAt` string, date-time, required: Timestamp of when this workspace was created.
      - `defaultPermission` 'comment' | 'full' | 'read' | 'write'
      - `description` RichText, required
        - `blocks` RichTextBlock[], required
          - union
            - RichTextBlockAttachment
              - …
            - RichTextBlockBlockquote
              - …
            - RichTextBlockCode
              - …
            - RichTextBlockCustom
              - …
            - RichTextBlockEmbed
              - …
            - RichTextBlockHeadline
              - …
            - RichTextBlockIndentation
              - …
            - RichTextBlockList
              - …
            - RichTextBlockPanel
              - …
            - RichTextBlockParagraph
              - …
      - `id` string, uuid, required: Unique identifier of this workspace.
      - `itemColor` 'amber' | 'azure' | 'black' | 'blue' | 'coco' | 'daulphine' | 'emerald' | 'fanta' | 'granite' | 'great' | 'leaf' | 'moss' | 'mutedAmber' | 'mutedAzure' | 'mutedBlack' | 'mutedBlue' | 'mutedCoco' | 'mutedDaulphine' | 'mutedEmerald' | 'mutedFanta' | 'mutedGranite' | 'mutedGreat' | 'mutedLeaf' | 'mutedMoss' | 'mutedOcean' | 'mutedOrange' | 'mutedPink' | 'mutedPurple' | 'mutedRed' | 'mutedSky' | 'mutedViolet' | 'mutedYellow' | 'ocean' | 'orange' | 'pink' | 'purple' | 'red' | 'sky' | 'violet' | 'yellow'
      - `itemType` 'bug' | 'epic' | 'experiment' | 'feature' | 'feedback' | 'idea' | 'initiative' | 'app:okr:objective' | 'opportunity' | 'product' | 'project' | 'story' | 'task'
      - `lastActivity` string, date-time, required: Timestamp of when any entities related to this workspace were last changed.
      - `lastUpdatedAt` string, date-time, required: Timestamp of when this workspace was last updated.
      - `metadata` WorkspaceWorkspaceMetadata
        - `duplicated` boolean, required: Whether this workspace was duplicated from another workspace.
        - `templateId` string: Id of the template used to create this workspace.
        - `templateWorkspaceRef` string: Which specific workspace-instruction in the template was used to create this workspace.
        - `version` string: Version of the server at the moment when this workspace was created.
      - `name` string, required: Name of this workspace.
      - `namespace` 'main' | 'app:okr' | 'app:portfolio', required
      - `order` integer, required: Order number of this workspace for sorting.
      - `progressMode` 'count' | 'none' | 'percentage', required
      - `statusPresetId` string, uuid: Optional reference to a shared status preset. When set, statuses are read from the preset instead of workspace-specific statuses.
      - `teamId` string, uuid, required: Id of the team this workspace belongs to.
  - `createdAt` string, date-time, required: Date-time when this group was created.
  - `defaultPermission` 'comment' | 'full' | 'read' | 'write'
  - `id` string, uuid, required: UUID of this group.
  - `lastUpdatedAt` string, date-time, required: Date-time when this group was last updated.
  - `name` string, required: Name of this group.
  - `order` integer, required: Order number of this group for sorting.
  - `parentId` string, uuid: UUID of the parent group (if applicable).
  - `teamId` string, uuid, required: UUID of the team which owns this group.

## Other responses

- `400`: If payload is invalid.
- `401`: If missing authentication token.
- `403`: If user does not have the required permission, or authenticated client does not have the required access scopes.
- `default`: If any other error happens.

---

[API](https://skmtc.dev/airfocus/apis/airfocus-api.md) · [All operations](https://skmtc.dev/airfocus/apis/airfocus-api/llms.txt) · [OpenAPI document](https://skmtc.dev/airfocus/apis/airfocus-api/revisions/fc9ccaa2ec6d?raw)
