---
title: "Create File"
method: POST
path: "/api/v3/file"
tags: ["File"]
---

# Create File

`POST /api/v3/file`

## Request

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

Create File.

## Request body

- CreateFileInput
  - `customFields` CreateFileInputCustomFields
  - `filename` string: The name of the underlying file. Defaults to the ScratchFile's filename. Must not be blank, and its extension must not be blocked by the tenant's file upload settings.
  - `folderId` string, required
  - `name` string, required
  - `scratchFileId` string, required

## Response `201`

Created

- File: A File represents an uploaded document or data file that is surfaced in Benchling's Data Catalog for discovery and organization. Files are primarily created through Benchling Connect (for external file integrations) and the Analysis Tool (for pipeline outputs). Each File is backed by a ScratchFile containing the actual binary content and upload state. Files are folder-based items that can be starred for quick access, linked to Studies, and support custom fields. Files differ from EntryExternalFile (attachments within notebook entries) and Blob (raw binary storage) in that they are first-class data catalog items with full metadata and discovery capabilities.
  - `__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)
