---
title: "PATCH /api/user/2fa/methods/{method}"
method: PATCH
path: "/api/user/2fa/methods/{method}"
tags: ["user"]
---

# PATCH /api/user/2fa/methods/{method}

`PATCH /api/user/2fa/methods/{method}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `sessionid`

Rename or remove one app or key.

Removing the last one turns two-factor off and deletes the recovery
codes.

## Path parameters

- `method` string, required

## Request body

- PatchedRenameRequest
  - `name` string

## Response `200`

- Method
  - `id` string, required: `totp-<n>` or `webauthn-<n>`
  - `kind` 'totp' | 'webauthn', required: * `totp` - totp * `webauthn` - webauthn
  - `name` string, required
  - `passkey` boolean, nullable, required: A key that can log in on its own. Null when the browser did not say.
  - `createdAt` string, date-time, nullable, required
  - `lastUsedAt` string, date-time, nullable, required

## Other responses

- `400`
- `401`
- `404`
- `405`
- `406`
- `415`
- `429`
- `500`

## Changes

- **2026-11-13** `7aaa5406d62c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/changes/api/user/2fa/methods/:method/patch.md)

---

[API](https://skmtc.dev/frikanalen/apis/frikanalen-django-api.md) - [All operations](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/llms.txt) - [OpenAPI document](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/revisions/ebd4175e41fe?raw)
