Skip to main content
POST
/
v1
/
process
/
knowledges
/
deleteStorage
curl --location 'https://api.sarasfinance.com/v1/process/knowledges/deleteStorage' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
    "fileIds": ["file_a781b2e9"],
    "recover": false
}'
{
  "success": true,
  "message": "Files deleted successfully"
}

Body Parameters

fileIds
string[]
required
List of unique file IDs to delete.
recover
boolean
default:"false"
Set true to recover/restore deleted files instead of deleting them.

Response

success
boolean
Status of the deletion request.
message
string
A descriptive status message.
curl --location 'https://api.sarasfinance.com/v1/process/knowledges/deleteStorage' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
    "fileIds": ["file_a781b2e9"],
    "recover": false
}'
{
  "success": true,
  "message": "Files deleted successfully"
}

Error Codes

CodeIDDescription
ERROR_PROCESS_META_IS_MISSING_IN_REQUEST1200Metadata missing in request
ERROR_FILE_ID_NOT_FOUND1704File ID does not exist
ERROR_STORAGE_LOCKED1712Storage repository is currently locked