---
title: "Batch update File"
method: PATCH
path: "/api/v3/file:batch-update"
tags: ["File"]
---

# Batch update File

`PATCH /api/v3/file:batch-update`

## Request

- Base URL: `https://{tenant_name}.benchling.com`
- URL: `https://{tenant_name}.benchling.com/api/v3/file:batch-update`
- Auth: HTTP bearer

Batch update File synchronously in one transaction. Maximum 25 items per request.

## Request body

- object
  - `items` UpdateFileInputWithPathParams[], required
    - `allowCustomFieldDeletion` boolean: When true, custom fields present on the object but omitted from the update payload will be deleted. When false or omitted, omitting existing custom fields is an error. Defaults to false.
    - `archiveReason` string: Why it is being archived. Required when `archived` is `true`, and not allowed when unarchiving.
    - `archived` boolean: Set to `true` to archive or `false` to unarchive it. Archiving requires `archiveReason`.
    - `customFields` UpdateFileInputWithPathParamsCustomFields
    - `expectedVersionId` string: The File's current version as last read by the caller. The update is rejected if another version has been published since.
    - `filename` string: The name of the underlying file. Names the content of `scratchFileId` if given, otherwise renames the current version in place. Must not be blank, and its extension must not be blocked by the tenant's file upload settings.
    - `folderId` string
    - `id` string, required
    - `name` string
    - `scratchFileId` string

## Response `200`

OK

- FileBatchupdateResponse200
  - `items` File[], required
    - `__typename` string
    - `archiveReason` string, nullable
    - `archived` boolean
    - `createdAt` string, datetime
    - `creator` PrincipalRef
      - `__typename` string
      - `id` string, api_id
    - `currentVersionId` string, nullable
    - `customFields` CustomField[], nullable
      - `__typename` string
      - `name` string, nullable
      - `value` string, nullable
    - `displayId` string, nullable
    - `externalFileId` string, nullable: Use scratchFile to access externalFileId.
    - `filename` string, nullable: Use scratchFile to access filename.
    - `folder` FolderRef
      - `__typename` string
      - `id` string, api_id
    - `id` string
    - `mimeType` string, nullable: Use scratchFile to access mimeType.
    - `modifiedAt` string, datetime
    - `name` string, nullable
    - `scratchFile` ScratchFileRef
      - `__typename` string
      - `id` string, api_id
    - `versions` string, uri: Published versions of the File, newest first.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests
- `500`: Internal Server Error

---

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