# POST /auth/second-factor/disable

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the auth group.

Disable the caller's second factor

- Who may call it: administrator, reseller, customer
- Token scope: any
- Answers: 200 OK

Supply current_password to clear the second factor. The response contains enabled set to false.

## As a command

- [urbestack-user-set](https://urbestack.com/docs/commands/urbestack-user-set.md): Updates an existing UrbeStack account.

## Request body

JSON, the type [CurrentPassword](https://urbestack.com/docs/api/types/CurrentPassword.md).

- `current_password` (string, up to 128 characters, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/auth/second-factor/disable" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "current_password": "text"
  }'
```

Response, 200 OK:

```
{
  "enabled": true
}
```

## Errors

- 400: --name is required
- 400: <name> has an owner: move them to the administrator before changing their role
- 400: <name> is an administrator: administrators have no home, so nothing to back up
- 400: <name> is an administrator: administrators have no system account
- 400: <name> is an administrator: administrators have no system account, so no shell
- 400: Cannot demote or suspend the last active administrator
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid boolean
- 400: Invalid domain name
- 400: Invalid email address
- 400: Invalid id
- 400: Invalid password hash
- 400: Invalid password: 8 to 128 printable characters
- 400: Invalid port
- 400: Invalid role: admin, user or reseller
- 400: Invalid setting key
- 400: Invalid status
- 400: Invalid system password hash
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Nothing to change
- 400: Only a customer has an owner: an administrator or a reseller is the administrator's own
- 400: The second factor can only be turned off here; a user enrols from their own page
- 400: Username '<value>' is reserved
- 401: Authentication required
- 401: The password is not the panel password
- 404: Setting '<key>' not found
- 404: User '<name>' not found
- 409: <name> is on the package <p.name> of the reseller <p.owner>: change the package before the move
- 409: <name> owns <owned> 
- 409: <who> and its bandwidth for the month is used up: 
- 409: <who> and its disk is used up: 
- 409: The package <p.name> allows <limit> 
