Docs · DELETE /file/{dirId}/{fileName}
Reference · Files

DELETE/file/{dirId}/{fileName}

Deletes a file now, without waiting for its directory to expire. It can’t be undone.

Parameters

Parameters
dirIdstringThe directory’s id.
fileNamestringThe file’s name, URL-encoded if it holds characters a path can’t.

Request body

This request has no body.

Example

Request
curl -X DELETE https://media.logicboostkit.com/file/dir_pi23jgy1yxlmigi873bz/source.mp4 \
  -H "Authorization: Basic $MEDIA_KEY"
Response
HTTP/1.1 200 OK
X-Request-Id: job_0mv6ihz6vfx5ua0h05x8bmql

{
  "ok": true,
  "deleted": {
    "file_path": "dir_pi23jgy1yxlmigi873bz/source.mp4"
  }
}

Response fields

Response fields
okbooleantrue when the file was deleted.
deleted.file_pathstringThe file that is gone: dir_id/file_name.

Status codes

Status codes
200The file is deleted. Not charged.
401The Authorization header is missing, or the key is invalid, revoked or expired.
403The account isn’t active. The error says what to do.
404File not found: the file or its directory isn’t in your account, or the directory has expired.
429More than 300 requests in a minute on this key. Wait for the number of seconds in Retry-After.

Every error has the shape {"ok": false, "error": "…"} and is never charged.