---
title: "Batch create Attachment"
method: POST
path: "/api/v3/attachment:batch-create"
tags: ["Attachment"]
---

# Batch create Attachment

`POST /api/v3/attachment:batch-create`

## Request

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

Batch create Attachment synchronously in one transaction. Maximum 25 items per request.

## Request body

- object
  - `items` CreateAttachmentInput[], required
    - `generateImagePreview` boolean: Whether to generate an image preview for the attachment. Defaults to false.
    - `generatePdfPreview` boolean: Whether to generate a PDF preview for the attachment. Defaults to false.
    - `scratchFileId` string, required: ID of the ScratchFile to copy into the Attachment.

## Response `201`

Created

- AttachmentBatchcreateResponse201
  - `items` Attachment[], required
    - `__typename` string
    - `createdAt` string, datetime
    - `creator` PrincipalRef
      - `__typename` string
      - `id` string, api_id
    - `downloadUrl` string, nullable: A pre-signed download URL. The URL may be null if the file did not upload successfully.
    - `id` string
    - `mimeType` string: The MIME type of the file, e.g. 'image/jpeg'
    - `name` string
    - `uploadStatus` 'SUCCEEDED' | 'FAILED_VALIDATION' | 'IN_PROGRESS' | 'NOT_UPLOADED': Whether the attachment uploaded successfully, failed to upload or is still uploading.

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