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

  1. Create a Files instance with an array of file IDs.
  2. Call .delete() to remove them all in one request.
  3. The response includes:
    • deleted: IDs that were successfully deleted.
    • errors: any files that failed to delete with reasons.
  4. You can use the SDK or direct API to bulk delete: