Delete a file

View as Markdown

Deletes a file. Refuses (409) while the file is referenced by a run, parked for an approval, or has a confirm in flight. ?purge=true (admin only) force-deletes the file, its thumbnail, and every derived file. Requires project:manage on the project.

Authentication

AuthorizationBearer

WorkOS session JWT or an organization API key, sent as Authorization: Bearer <token>.

Path parameters

projectIdstringRequired
fileIdstringRequired

Query parameters

purgestringOptional

Response

The file was deleted.
okboolean

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
503
Service Unavailable Error