UploadsDelete upload

Uploads

Delete upload API

Delete an uploaded file.

DELETEhttps://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

StatusCodeWhen it happensRetry
401api_key_missingNo Bearer key was sent in the Authorization header.No
401api_key_invalidThe key is malformed or unknown.No
401api_key_revokedThe key was deleted in the console.No
401api_key_disabledThe key is disabled in the console.No
401api_key_expiredThe key is past its expiration date.No
403insufficient_scopeThe key lacks the delete permission. Keys created in the console have it.No
403workspace_forbiddenThe account that owns the workspace is suspended or scheduled for deletion.No
404not_foundThe id is unknown or the file was already deleted.No
503temporarily_unavailableThe request could not be completed just now.Yes
500internal_errorSomething failed on our side. The request_id identifies the request.Yes
503api_unavailableThe API is turned off.No