---
title: "Batch update TestDefinition"
method: PATCH
path: "/api/v3/test-definition:batch-update"
tags: ["Test Definition"]
---

# Batch update TestDefinition

`PATCH /api/v3/test-definition:batch-update`

## Request

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

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

Each item follows the same field requirements and archive constraints as the single-update endpoint. If any item fails validation, the transaction fails and no Test Definitions are updated.

## Headers

- `EARLY-ACCESS` string

## Request body

- object
  - `items` UpdateTestDefinitionInputWithPathParams[], required
    - `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`.
    - `description` string: Updated human-readable description. Empty strings are allowed; values must be at most 255 characters.
    - `id` string, required: The API ID of the test definition to update.
    - `name` string: Updated display name. When provided, it is trimmed and must be non-empty and unique within the organization.
    - `organizationId` string: Updated owning organization. Moving to a different organization requires admin access to that organization.
    - `resultSchemaId` string: Updated result schema. Cannot be changed after test orders have been created for this test definition.

## Response `200`

OK

- TestDefinitionBatchupdateResponse200
  - `items` TestDefinition[], required
    - `__typename` string
    - `archiveReason` string, nullable
    - `archived` boolean
    - `createdAt` string, datetime: Timestamp of when the test definition was created.
    - `creator` PrincipalRef
      - `__typename` string
      - `id` string, api_id
    - `description` string: The description of the test definition. Empty strings are allowed.
    - `id` string: The ID of the test definition.
    - `modifiedAt` string, datetime: Timestamp of when the test definition was last modified.
    - `name` string: The name of the test definition.
    - `organization` OrganizationRef
      - `__typename` string
      - `id` string, api_id
    - `resultSchema` ResultSchemaRef
      - `__typename` string
      - `id` string, api_id

## 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/c9f087b98b8b?raw)
