The whole hunk
from line 1, old and new numbered
/
lines
from line 1
1---
2title: Upload File
3url: https://platform.claude.com/docs/en/api/beta/files/upload
4---
5
16# Upload File
27
38**POST** `/v1/files`
from line 17
1217
1318 - `string`
1419
15 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
20 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
1621
1722 - `"message-batches-2024-09-24"`
1823
from line 65
6065
6166 - `"user-profiles-2026-08-18"`
6267
68 - `"user-profiles-2026-09-04"`
69
6370 - `"advisor-tool-2026-03-01"`
6471
6572 - `"managed-agents-2026-04-01"`
from line 109
102109
103110 - `"mid-conversation-system-clear-at-2026-08-21"`
104111
112- `"anthropic-workspace-id": optional string`
113
105114## Body parameters (form-data)
106115
107116- `file: string`
108117
109 The file to upload
118 The file to upload. Only the final path component of the part's `filename` is kept; an absent or empty `filename` is replaced with `unnamed` plus the extension for the file's stored `mime_type`, when known.
110119
111120 format: binary
112121
from line 129
120129
121130- `BetaFileMetadata object`
122131
132 - `type: "file"`
133
134 Object type.
135
136 For files, this is always `"file"`.
137
123138 - `id: string`
124139
125140 Unique object identifier.
from line 165
150165
151166 minimum: 0
152167
153 - `type: "file"`
154
155 Object type.
156
157 For files, this is always `"file"`.
158
159168 - `downloadable: optional boolean`
160169
161170 Whether the file can be downloaded.
from line 181
172181
173182 The scope of this file, indicating the context in which it was created (e.g., a session).
174183
175 - `id: string`
176
177 The ID of the scoping resource (e.g., the session ID).
178
179184 - `type: "session"`
180185
181186 The type of scope (e.g., `"session"`).
187
188 - `id: string`
189
190 The ID of the scoping resource (e.g., the session ID).
182191
183192## Example
184193