---
title: "Upload File"
method: POST
path: "/v1/files?beta=true"
---

# Upload File

`POST /v1/files?beta=true`

## Headers

- `anthropic-beta` string — Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
- `anthropic-version` string — The version of the Claude API you want to use. Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).

## Response `200`

Successful Response

- BetaFileMetadataSchema
  - `created_at` string, date-time, required — RFC 3339 datetime string representing when the file was created.
  - `downloadable` boolean — Whether the file can be downloaded.
  - `filename` string, required — Original filename of the uploaded file.
  - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
  - `mime_type` string, required — MIME type of the file.
  - `scope` BetaFileScope
    - `id` string, required — The ID of the scoping resource (e.g., the session ID).
    - `type` 'session', required — The type of scope (e.g., `"session"`).
  - `size_bytes` integer, required — Size of the file in bytes.
  - `type` 'file', required — Object type. For files, this is always `"file"`.

## Other responses

- `4XX` — Error response. See our [errors documentation](https://docs.claude.com/en/api/errors) for more details.

## Changes

- **2026-04-08** `69486316563e` — 1 info
  - added the optional property `scope` to the response with the `200` status

[Change history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/files?beta=true/post.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anthropics/apis/anthropic-api/revisions/478045ff0f4f?raw)
