:) paperlesspaper docs
API ReferenceDevicesBy device idDeviceid

Deactivate Device

Admin-or-support, dry-run-first deactivation by epd DeviceId. Missing app records produce warnings and do not block IoT deactivation. An optional previousDeviceObjectId from the admin search allows orphaned paper assignments to be detached; without a known app id, papers remain unchanged. A dry run is the default and returns the papers currently attached plus a confirmationToken. Papers and their cross-paper references are preserved. To execute, repeat with dryRun=false and that token. After a confirmed IoT reset, cleanup can be retried with the same token without resetting the device again; a completed request returns its saved result. Cleanup only affects the original database device and detaches its remaining paper references. Change counts describe the successful cleanup attempt.

Middlewares: authMiddleware, validateAdminOrSupport

DELETE
/devices/by-device-id/{deviceId}
x-api-key<token>

API key for authentication

In: header

Path Parameters

deviceIdstring

Epaper device serial / DeviceId

Match^epd[a-z0-9]*-[a-z0-9][a-z0-9-]*$
Lengthlength <= 128

Query Parameters

previousDeviceObjectId?string

Historical app device ObjectId from the admin search. Used only if the current app record is missing, to detach orphaned paper assignments.

Match^[a-f0-9]{24}$/i
dryRun?string

Defaults to true. Set to false only after obtaining a confirmationToken from a dry run.

Default"true"
Value in"true" | "false"
confirmationToken?string

Confirmation token returned by the latest dry run. Required when dryRun=false.

Match^[a-f0-9]{64}$

Response Body

application/json

curl -X DELETE "https://api.paperlesspaper.de/v1/devices/by-device-id/epd-0000000000"
{
  "dryRun": true,
  "deactivated": true,
  "preview": {
    "device": {
      "id": "string",
      "deviceId": "string",
      "kind": "string",
      "organizationId": "string"
    },
    "appDeviceMissing": true,
    "warnings": [
      "string"
    ],
    "papersToDetach": {
      "count": 0,
      "ids": [
        "string"
      ]
    },
    "iotDeviceWillBeDeactivated": true,
    "confirmationToken": "string"
  },
  "deleted": {
    "devices": 0
  },
  "updated": {
    "papers": 0
  },
  "iotDeviceDeactivated": true
}