---
title: "Two-factor sign-in"
method: PUT
path: "/api/v2/account/two-factor"
tags: ["Account"]
---

# Two-factor sign-in

`PUT /api/v2/account/two-factor`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v2/account/two-factor`
- Auth: HTTP bearer

Turns two-factor sign-in on or off. Every other device is signed out so it must sign in again under the new
setting; the calling device stays signed in. Closed to guests.

## Request body

- object
  - `enabled` boolean, required

## Response `200`

the account block, as GET /account

- object
  - `user` object
    - `id` integer
    - `two_factor_enabled` boolean

## Other responses

- `401`: unauthenticated: No valid bearer token was sent.
- `403`
- `422`
- `429`: rate_limited: A throttle or a per-account allowance refused the request; `retry_after` or `remaining` may be present.
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
