---
search:
  tags:
    - users
    - PUT
seo:
  description: >-
    When on, each local user without TOTP must enrol at the next… Reference for
    the PUT /api/v1/two-factor-policy endpoint in the TimescaleDB Enterprise
    API.
  noindex: true
sidebar:
  label: Set the two-factor policy
  badge: PUT
title: Set the two-factor policy
type: openapi-operation
---
When on, each local user without TOTP must enrol at the next login. Open sessions continue.

`PUT /api/v1/two-factor-policy`

**Request body** (`application/json`, required)

- `require_two_factor` (boolean, required) — Each local user without TOTP must enrol at the next login

Request body example:

```json
{
  "require_two_factor": true
}
```

**Responses**

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

Response example, 200:

```json
{
  "require_two_factor": true
}
```
