---
search:
  tags:
    - users
    - DELETE
seo:
  description: >-
    Deletes the TOTP secret and the recovery codes, and ends… Reference for the
    DELETE /api/v1/users/{id}/two-factor endpoint in the TimescaleDB Enterprise
    API.
  noindex: true
sidebar:
  label: Reset a user's two-factor
  badge: DELETE
title: Reset a user's two-factor
type: openapi-operation
---
Deletes the TOTP secret and the recovery codes, and ends the sessions of the user. For a lost device. An admin cannot reset the own two-factor here. An OIDC user has no two-factor here: 409.

`DELETE /api/v1/users/{id}/two-factor`

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "created_at": "2019-08-24T14:15:22Z",
  "disabled": true,
  "display_name": "string",
  "id": "string",
  "last_login_at": "2019-08-24T14:15:22Z",
  "must_change_password": true,
  "role": "none",
  "service_grants": [
    {
      "role": "viewer",
      "service_id": "string"
    }
  ],
  "source": "local",
  "two_factor": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "username": "string"
}
```
