Delete File
api/beta/files/delete
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/files/delete Changed · +10 / -15 lines
# Delete File ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Delete File ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Delete File -url: https://platform.claude.com/docs/en/api/beta/files/delete ---- +# Delete File -## Delete File +**DELETE** `/v1/files/{file_id}` -**delete** `/v1/files/{file_id}` - Delete File -### Path Parameters +## Path parameters - `file_id: string` ID of the File. -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Returns +## Returns -- `BetaDeletedFile object { id, type }` +- `BetaDeletedFile object` - `id: string`
For file deletion, this is always `"file_deleted"`. - - `"file_deleted"` + default: file_deleted -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/files/$FILE_ID \ -X DELETE \ -H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +### Response (200) ```json {