cURL
curl --location --request DELETE https://api.writer.com/v1/files/{file_id} \
--header "Authorization: Bearer <token>"import os
from writerai import Writer
client = Writer(
# This is the default and can be omitted
api_key=os.environ.get("WRITER_API_KEY"),
)
file = client.files.delete(
"file_id",
)
print(file.id)import Writer from 'writer-sdk';
const client = new Writer({
apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted
});
async function main() {
const file = await client.files.delete('file_id');
console.log(file.id);
}
main();{
"id": "7c36a365-392f-43ba-840d-8f3103b42572",
"deleted": true
}Files API
Delete file
Permanently delete a file from the system. This action cannot be undone.
DELETE
/
v1
/
files
/
{file_id}
cURL
curl --location --request DELETE https://api.writer.com/v1/files/{file_id} \
--header "Authorization: Bearer <token>"import os
from writerai import Writer
client = Writer(
# This is the default and can be omitted
api_key=os.environ.get("WRITER_API_KEY"),
)
file = client.files.delete(
"file_id",
)
print(file.id)import Writer from 'writer-sdk';
const client = new Writer({
apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted
});
async function main() {
const file = await client.files.delete('file_id');
console.log(file.id);
}
main();{
"id": "7c36a365-392f-43ba-840d-8f3103b42572",
"deleted": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.
Path Parameters
The unique identifier of the file.
Was this page helpful?