Bulk device deletion from Esper Console: batch limit of 200 per operation, with API alternative for large-scale removal
Android
Title: Deleting devices in bulk — Console batch limit and API alternativeWhen removing large numbers of devices from Esper, the Esper Console limits each deletion operation to 200 devices at a time. For fleets of thousands, repeating manual batches becomes impractical, and the Esper API offers a faster alternative with no per-request device limit.
Why this happens
The Esper Console enforces a 200-device cap per deletion operation to protect against accidental mass removal and to keep Console performance stable during large transactions. The Esper API does not share this constraint, making it the recommended path for any deletion exceeding a few hundred devices.
Before you begin
- Decide whether each device needs to be wiped (factory reset, then removed) or simply deleted from the Console (removed from Esper without touching the physical device). These are separate operations with different outcomes.
- Identify the target devices. The Last Online Date filter in Devices & Groups is the fastest way to isolate inactive devices.
- If you plan to use the API, generate an API key first: Esper Console → API Key Management. Note your Enterprise ID from the same area — both are required for every API call.
Option 1: Delete devices in batches using the Esper Console (up to 200 per batch)
- Navigate to Devices & Groups in the Esper Console.
- Select the filter icon and set the Last Online Date range to match your target period — for example, all devices last seen before a specific date. This narrows the list so you are only selecting devices you intend to remove.
- Review the filtered results and use the checkboxes to select up to 200 devices.
- Select Actions → Delete and confirm the prompt.
- After the batch completes, refresh the device list and re-apply the same filter to confirm those devices no longer appear.
- Repeat steps 3–5 for each subsequent batch of 200 until all targeted devices are deleted. For example, removing 1,200 devices requires six batches.
Option 2: Delete devices at scale using the Esper API
The Esper API accepts individual delete requests with no batch size ceiling, making it suitable for removing thousands of devices efficiently through scripting or a tool like Postman.
The delete endpoint for a single device is:
DELETE /enterprise/{enterprise_id}/devices/{device_id}/
Using Postman:
- Prepare a CSV file containing the
device_idfor every device you want to delete. You can retrieve device IDs by querying the list endpoint:GET /enterprise/{enterprise_id}/devices/with any relevant filters such aslast_seendate range. - Create a Postman Collection with the DELETE request above, using a variable for
device_id. - Use the Collection Runner, import your CSV as the data file, and run the collection. Postman iterates through each row and issues one delete request per device.
- Add your API key as a Bearer token in the Authorization header of the request.
Using a custom script:
- Query
GET /enterprise/{enterprise_id}/devices/with your filter parameters to retrieve the list of target device IDs. - Loop through the results and issue a
DELETE /enterprise/{enterprise_id}/devices/{device_id}/request for each ID. - Log the HTTP response for each call — a
204 No Contentresponse confirms successful deletion.
GET /enterprise/{enterprise_id}/devices/ with the same filters you used to build your deletion list. The target devices should return no results. Cross-check the total device count in Devices & Groups in the Esper Console to confirm the reduction.
Troubleshooting
The Last Online Date filter returns unexpected results
Confirm the date range is set correctly and that you are viewing the right enterprise tenant. If your account manages multiple tenants, verify you are logged into the correct one before filtering.
A batch deletion fails partway through
One or more devices in the batch may have dependencies blocking removal — for example, active Blueprint assignments, pending commands, or group membership requirements. Open the individual device record in Devices & Groups → [Device Name], resolve any active assignments, then retry deletion for the affected devices.
API calls return authentication errors
Confirm your API key is active and has device-deletion scope. Generate a replacement key at Esper Console → API Key Management and update your request headers before retrying.
The device count is not decreasing after deletion
Hard-refresh the Esper Console (Ctrl+Shift+R or Cmd+Shift+R) and re-apply the filter. Device count updates are immediate — if the count remains unchanged, one or more deletions may have failed silently. Re-run the filter to identify any devices still present and retry their deletion individually to isolate the cause.
If this doesn't resolve it
If devices remain after following the steps above, collect the following before contacting Esper Support:
- The device IDs or serial numbers of devices that could not be deleted
- Screenshots of any error messages shown in the Console or returned by the API
- The HTTP status codes and response bodies from any failed API calls
- Your Enterprise ID and the date range used to filter devices
Contact Esper Support at support.esper.io with these details.
Still need help?
If you're encountering issues with bulk device deletion or need assistance with API implementation for large-scale removals, please submit a support ticket and include your device count, deletion method (Console or API), and any error messages received.
Please sign in to leave a comment.
Comments
0 comments