---
title: "Perform multiple operations with item-links"
method: POST
path: "/api/workspaces/{workspaceId}/links/bulk"
tags: ["CRUD", "Items:Links"]
---

# Perform multiple operations with item-links

`POST /api/workspaces/{workspaceId}/links/bulk`

## Request

- Base URL: `https://app.airfocus.com`
- URL: `https://app.airfocus.com/api/workspaces/{workspaceId}/links/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 item-links.<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

## Path parameters

- `workspaceId` string, uuid, required

## Query parameters

- `actAsAdmin` boolean

## Request body

- ItemLinkBulkAction[]
  - union
    - ItemLinkBulkCreate
      - `resource` CreateItemLinkRequest, required
        - `fromItemId` string, uuid, required
        - `fromOrder` integer, required: How this item-link is ordered in the list of links of the "fromItem".
        - `toItemId` string, uuid, required
        - `toOrder` integer, required: How this item-link is ordered in the list of links of the "toItem".
        - `typeId` string, uuid, required
      - `type` 'create', required
    - ItemLinkBulkDelete
      - `id` string, uuid, required
      - `type` 'delete', required
    - ItemLinkBulkPatch
      - `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
    - ItemLinkBulkUpdate
      - `id` string, uuid, required
      - `resource` UpdateItemLinkRequest, required
        - `fromItemId` string, uuid, required
        - `fromOrder` integer, required: How this item-link is ordered in the list of links of the "fromItem".
        - `toItemId` string, uuid, required
        - `toOrder` integer, required: How this item-link is ordered in the list of links of the "toItem".
        - `typeId` string, uuid, required
      - `type` 'update', required

## Response `200`

- ItemLinkWithItemLinkEmbed[]
  - `_embedded` ItemLinkEmbed, required
    - `apps` object, required
    - `constraints` ItemLinkConstraint[], required
      - union
        - ItemLinkConstraintReadonly
          - `extensionId` string, uuid, required
          - `type` 'readonly', required
        - ItemLinkConstraintUndeletable
          - `extensionId` string, uuid, required
          - `type` 'undeletable', required
    - `fromWorkspaceId` string, uuid, required
    - `toWorkspaceId` string, uuid, required
  - `fromItemId` string, uuid, required
  - `fromOrder` integer, required: How this item-link is ordered in the list of links of the "fromItem".
  - `id` string, uuid, required
  - `toItemId` string, uuid, required
  - `toOrder` integer, required: How this item-link is ordered in the list of links of the "toItem".
  - `typeId` string, uuid, required

## 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)
