---
title: "Delete File"
method: DELETE
path: "/v1/file/{file_id}"
tags: ["files"]
---

# Delete File

`DELETE /v1/file/{file_id}`

## Request

- Base URL: `https://api.ranch.bot`
- URL: `https://api.ranch.bot/v1/file/{file_id}`
- Auth: HTTP bearer

Current files HTTP operation. External credential scopes: write:records. Access is resolved for the authenticated user or by the endpoint-specific OAuth checks. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window per device account, 1000 per browser session, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429. Deletion behavior is described below; a successful status does not imply erasure from all retained history. Deletes the accessible file through the file service. Marks the file inactive; do not interpret this as immediate storage erasure.

## Path parameters

- `file_id` string, uuid, required

## Response `204`

Completed; no response body.

## Other responses

- `400`: Request validation failed.
- `401`: Missing/invalid authentication or insufficient farm role.
- `403`: Missing required scope or credential type is disallowed.
- `404`: Resource or active farm membership not found.
- `429`: Rate limit exceeded. Retry after the indicated delay.
- `500`: Unexpected server failure.

---

[API](https://skmtc.dev/ranch/apis/ranch-bot-http-api.md) · [All operations](https://skmtc.dev/ranch/apis/ranch-bot-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranch/apis/ranch-bot-http-api/revisions/24109d33fa02?raw)
