---
title: "Unregister a device"
description: "Remove a device. Idempotent — unregistering an unknown token is a no-op,\nso a client retrying a logout never has to special-case 404."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: AI Gateway API › Notifications

`DELETE /notifications/devices/{token}`

Remove a device. Idempotent — unregistering an unknown token is a no-op,
so a client retrying a logout never has to special-case 404.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `token` (`unregister_device.path.token`; string, required)

## Header parameters

- `X-App-Id` (`unregister_device.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`
- `X-On-Behalf-Of` (`unregister_device.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`unregister_device.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://truememory-api.mvstg.com/notifications/devices/<token>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/notifications/devices/<token>';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/notifications/devices/<token>"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 204

Successful Response

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`unregister_device.response.422.detail`; array<object>, optional)
  - `loc` (`unregister_device.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`unregister_device.response.422.detail.msg`; string, required)
  - `type` (`unregister_device.response.422.detail.type`; string, required)
  - `input` (`unregister_device.response.422.detail.input`; unknown, optional)
  - `ctx` (`unregister_device.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/notifications/devices/delete/index.md
