Skip to content

Remove Folder Storage ​

DELETEhttps://api.repliz.com/public/storage/folder/{folderId}

Delete a storage folder. The files in it are kept and moved out of the folder, with the same URLs. To delete the files too, use Remove Files (Mass) first.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): storage:write
  • Access Tier: Addon Storage

Parameters ​

ParameterTypeRequiredDescription
folderIdstringYesID of the folder, the _id from Get Folder.

Example Request ​

bash
curl -X DELETE "https://api.repliz.com/public/storage/folder/6a4c3b580afd72bb342c3886" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const response = await axios.delete('https://api.repliz.com/public/storage/folder/6a4c3b580afd72bb342c3886', {
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY',
  },
});

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch('https://api.repliz.com/public/storage/folder/6a4c3b580afd72bb342c3886', {
  method: 'DELETE',
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

console.log(response.status);

Response ​

json
// No content returned on success
json
{
  "code": 404,
  "message": "folder not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}