Skip to main content
Hcfs • 2 mins read

DELETE /delete/{ss58}/{folder_hash}/{file_id}

DELETE /delete/{ss58}/{folder_hash}/{file_id}

Remove one file from a folder: drops the file_records row, decrements the user's storage summary, and deletes the ciphertext blob from storage.

Authentication

Authorization: Bearer <token>. The token's resolved SS58 must match the {ss58_address} path segment. See auth.md.

Request

Method and path

DELETE /delete/{ss58_address}/{folder_hash}/{file_id}

Path parameters

NameFormatNotes
ss58_addressstringOwner's SS58 address
folder_hash16-char hexFolder label's hash
file_id64-char hexpath_hash of the file

Headers

Authorization: Bearer <token>

Body

None.

Response — success (200)

{
"Success": {
"status": "deleted",
"file_id": "<64-char hex>",
"ss58_address": "5Grw...",
"folder_hash": "abc1234567890def"
}
}

Response — errors

Shared envelope shape in errors.md.

Statuserror codeCause
400invalid_file_idfile_id is not valid 64-char hex
401unauthorizedMissing / bad bearer token
403forbiddenToken resolves to a different SS58 than the path
404not_foundNo file at this (ss58_address, folder_hash, path_hash)
500database_errorTransient — retry with backoff

Example

curl -X DELETE \
-H "Authorization: Bearer $SS58" \
"$SERVER/delete/$SS58/$FOLDER_HASH/$FILE_ID"

Notes

  • Deletion is immediate. There is no undo endpoint.
  • To remove every file in a folder in one call, use /unregister_folder instead.
  • Concurrent deletes of the same file are idempotent: the first caller gets 200 Success, subsequent callers get 404 not_found.