API Reference

Use the delete method to delete a drive.

try {
  const id = 'drive_id_here'; // The ID of the drive to delete.
  
  const [data, error] = await sdk.drive.delete({ id });

  // Check for success
  if (error) {
    console.error('Failed to rename drive: ', error);
  } else {
    console.log('Drive deleted:', data);
  }
} catch (error) {
  console.error(error.message);
}

Params

  • id (string): The ID of the drive to delete.

Required API Key Permission

  • Delete Directory