---
title: "Bulk update content items."
method: POST
path: "/api/content/{app}/bulk"
tags: ["Contents"]
---

# Bulk update content items.

`POST /api/content/{app}/bulk`

You can read the generated documentation for your app at /api/content/{appName}/docs.

## Path parameters

- `app` string, required

## Query parameters

- `schema` string

## Request body

- BulkUpdateContentsDto
  - `jobs` BulkUpdateContentsJobDto[], required — The contents to update or insert.
    - `query` QueryJsonDto
      - `filter` unknown
      - `fullText` string, nullable
      - `collation` string, nullable
      - `skip` integer, required
      - `take` integer, required
      - `random` integer, required
      - `top` integer, required
      - `sort` SortNode[], nullable
        - `path` string, required
        - `order` 'Ascending' | 'Descending', required
    - `id` string, nullable — An optional ID of the content to update.
    - `data` ContentData
    - `status` string, nullable — The new status when the type is set to 'ChangeStatus' or 'Upsert'.
    - `dueTime` string, date-time, nullable — The due time.
    - `type` 'Upsert' | 'ChangeStatus' | 'Create' | 'Delete' | 'Patch' | 'Update' | 'Validate' | 'EnrichDefaults'
    - `schema` string, nullable — The optional schema id or name.
    - `patch` boolean — Makes the update as patch.
    - `permanent` boolean — True to delete the content permanently.
    - `enrichDefaults` boolean — Enrich the data with the default values when updating a content item.
    - `expectedCount` integer — The number of expected items. Set it to a higher number to update multiple items when a query is defined.
    - `expectedVersion` integer — The expected version.
  - `publish` boolean — True to automatically publish the content.
  - `doNotScript` boolean — True to turn off scripting for faster inserts. Default: true.
  - `enrichRequiredFields` boolean — True, to also enrich required fields. Default: false.
  - `doNotValidate` boolean — True to turn off validation for faster inserts. Default: false.
  - `doNotValidateWorkflow` boolean — True to turn off validation of workflow rules. Default: false.
  - `checkReferrers` boolean — True to check referrers of deleted contents.
  - `optimizeValidation` boolean — True to turn off costly validation: Unique checks, asset checks and reference checks. Default: true.

## Response `200`

- BulkResultDto[]
  - `error` ErrorDto
    - `message` string, required — Error message.
    - `errorCode` string, nullable — The error code.
    - `traceId` string, nullable — The optional trace id.
    - `type` string, nullable — Link to the error details.
    - `details` string[], nullable — Detailed error messages.
    - `statusCode` integer, required — Status code of the http response.
  - `jobIndex` integer, required — The index of the bulk job where the result belongs to. The order can change.
  - `id` string, nullable — The ID of the entity that has been handled successfully or not.
  - `contentId` string, nullable — The ID of the entity that has been handled successfully or not.

## Other responses

- `400` — Contents request not valid.
- `404` — Contents references, schema or app not found.
- `500` — Operation failed.

---

[API](https://skmtc.net/squidex/apis/squidex-api.md) · [All operations](https://skmtc.net/squidex/apis/squidex-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/squidex/squidex-api/versions/b4a9b62f113a/schema)
