Overview
Permanently remove a device from your account. This action cannot be undone.
This action is irreversible! The device will be unlinked from your account and will need to be reclaimed using an entry key.
Endpoint
DELETE https://nolongerevil.com/api/v1/thermostat/{deviceId}
Authentication
Required Scopes: write
Additional Requirement: Must be the device owner (not just shared access)
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|
deviceId | string | Yes | Device ID to delete |
| Header | Value | Required |
|---|
Authorization | Bearer nle_your_api_key_here | Yes |
Example Request
DELETE /api/v1/thermostat/dev_abc123xyz
Authorization: Bearer nle_your_api_key_here
Response
Success Response (200 OK)
{
"success": true,
"message": "Device deleted successfully"
}
Error Responses
403 Forbidden
{
"error": "Only device owners can delete devices"
}
Cause: You have shared access to this device but are not the owner.
Solution: Only the device owner can delete it. If you want to remove your access, ask the owner to revoke the share.
404 Not Found
{
"error": "Device not found"
}
Cause: Device ID doesn’t exist or you don’t have access to it.
Code Examples
curl -X DELETE https://nolongerevil.com/api/v1/thermostat/dev_abc123xyz \
-H "Authorization: Bearer nle_your_api_key_here"
What Happens After Deletion
When you delete a device:
- Device is unlinked from your account
- All shares are revoked - users with shared access lose access
- Device settings persist - temperature, schedule, etc. remain on the device
- Device remains functional - continues operating with last known settings
- Can be reclaimed - Generate a new entry key on the thermostat to reclaim it
Use Cases
Device Replacement
// When replacing an old thermostat
async function replaceDevice(oldDeviceId, newEntryKey) {
// Delete old device
await deleteDevice(oldDeviceId);
// Claim new device
await claimDevice(newEntryKey);
}
Selling/Moving
// When selling your home or moving out
async function removeAllDevices() {
const { devices } = await listDevices();
for (const device of devices) {
if (device.accessType === 'owner') {
await deleteDevice(device.id);
console.log(`Deleted ${device.name || device.serial}`);
}
}
}
Reclaiming a Deleted Device
To reclaim a device after deletion:
- On the thermostat: Settings → Nest App → Get Entry Code
- In dashboard: Add Device → Enter the entry code
- Device will be linked to your account again
Before deleting a device, consider if you just want to transfer ownership instead. Contact support for ownership transfer assistance.
Next Steps