Skip to main content

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

ParameterTypeRequiredDescription
deviceIdstringYesDevice ID to delete

Headers

HeaderValueRequired
AuthorizationBearer nle_your_api_key_hereYes

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:
  1. Device is unlinked from your account
  2. All shares are revoked - users with shared access lose access
  3. Device settings persist - temperature, schedule, etc. remain on the device
  4. Device remains functional - continues operating with last known settings
  5. 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:
  1. On the thermostat: Settings → Nest App → Get Entry Code
  2. In dashboard: Add Device → Enter the entry code
  3. 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