Delete File
api/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/files/delete Changed · +9 / -14 lines
# Delete File ## Path parameters ## Returns ## Example ### Response (200) ## Delete File ### Path Parameters ### Returns ### Example #### Response
---- -title: Delete File -url: https://platform.claude.com/docs/en/api/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. -### Returns +## Returns -- `DeletedFile object { id, type }` +- `DeletedFile 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 {