English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/storage/file/{fileId}Permanently remove a file from your storage. This action cannot be undone.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | ID of the file to remove, the _id from Get File. Its URL stops working, so schedules that still use it will fail. |
curl -X DELETE "https://api.repliz.com/public/storage/file/680affa5ce12f2f72916f67e" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const fileId = '680affa5ce12f2f72916f67e';
const response = await axios.delete(`https://api.repliz.com/public/storage/file/${fileId}`, {
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const fileId = '680affa5ce12f2f72916f67e';
const response = await fetch(`https://api.repliz.com/public/storage/file/${fileId}`, {
method: 'DELETE',
headers: {
Authorization: `Basic ${credentials}`,
},
});
const data = await response.json();
console.log(data);// No content returned on success{
"code": 404,
"message": "file not found"
}{
"code": 401,
"message": "unauthorized"
}