File
Delete Files (Bulk)
You can delete multiple files at once using the Files class or a single API call.
This is useful when cleaning up batches of files, removing multiple versions, or doing bulk cleanups efficiently.
How It Works
- Create a
Files
instance with an array of file IDs. - Call
.delete()
to remove them all in one request. - The response includes:
deleted
: IDs that were successfully deleted.errors
: any files that failed to delete with reasons.
- You can use the SDK or direct API to bulk delete: