Uploads
Delete upload API
Delete an uploaded file.
DELETE
https://serastudio.app/api/v1/uploads/{id}Usage notes
- The key needs the delete permission.
- A generation that already used the file is not affected. A new generation that names a deleted upload fails with
404.
Response
{
"id": "vid_3f2c7a9e-5d1b-4c8e-9f20-7a6b5c4d3e21",
"object": "upload",
"deleted": true
}Errors
| Status | Code | When it happens | Retry |
|---|---|---|---|
401 | api_key_missing | No Bearer key was sent in the Authorization header. | No |
401 | api_key_invalid | The key is malformed or unknown. | No |
401 | api_key_revoked | The key was deleted in the console. | No |
401 | api_key_disabled | The key is disabled in the console. | No |
401 | api_key_expired | The key is past its expiration date. | No |
403 | insufficient_scope | The key lacks the delete permission. Keys created in the console have it. | No |
403 | workspace_forbidden | The account that owns the workspace is suspended or scheduled for deletion. | No |
404 | not_found | The id is unknown or the file was already deleted. | No |
503 | temporarily_unavailable | The request could not be completed just now. | Yes |
500 | internal_error | Something failed on our side. The request_id identifies the request. | Yes |
503 | api_unavailable | The API is turned off. | No |