> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openpayload.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove a device

> Permanently remove a device entry from a public OpenPayload DID record

Removing and tombstoning are different operations.

* **Remove** deletes the device entry from the active device list.
* **Tombstone** preserves a public record that the device was retired.

Use removal only when you intentionally want the runtime's `remove_device` operation. If other clients need to recognize a retired or compromised device, use [Tombstone a device](/api-reference/directory/dids/tombstone-device) instead.

## Request

<ParamField path="did" type="string" required>
  The DID that owns the device.
</ParamField>

<ParamField path="deviceId" type="string" required>
  The device identifier to remove.
</ParamField>

The request body is required and carries a DID-key proof with action `remove_device`, the current
`control_nonce`, `valid_until`, `signer_key_id`, `canonical_payload`, and `signature`. See
[Authorize a Directory update](/guides/authorization).

<RequestExample>
  ```bash Request theme={null}
  curl --request DELETE \
    --url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices/mobile-01" \
    --header "Content-Type: application/json" \
    --data '{"did":"did:openpayload:1111111111111111111111","action":"remove_device","nonce":"<control_nonce>","valid_until":"<epoch-millis>","signer_key_id":"<authorized-key-id>","canonical_payload":"<payload>","signature":"<signature>"}'
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 202 Response theme={null}
  {
    "status": "accepted",
    "did": "did:openpayload:1111111111111111111111",
    "extrinsic": "apply_control_with_proof",
    "tx_hash": "<transaction-hash>",
    "message": "Chain extrinsic submitted"
  }
  ```
</ResponseExample>

<Note>
  `202` confirms submission, not final chain settlement.
</Note>

## Straight to the point

```http theme={null}
DELETE /dids/{did}/devices/{deviceId}
```

* DID-key proof body required
* Operation: `remove_device`
* Accepted: `202`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.