Skip to content
Connect an agent

Keys

Turn off two-step sign-in

Turns two-step sign-in off, proved with the current code or a recovery code.

POST/user/two-factor/disable

TL;DR

QuestionAnswer
What does it do?Turn off two-step sign-in.
What does it take?A JSON body of type SecondFactorBody.
What does it return?Status 200 with a body of type Accepted.
What can go wrong?400 the body is not valid; 401 not signed in, or the code is wrong (auth.two_factor_invalid); 403 the request came from an origin that may not make changes; 409 it is not on (account.two_factor_off), or an organisation requires it (account.two_factor_required_by_org); 429 too many requests. Every failure uses the one error envelope.

What it does

Turns two-step sign-in off, proved with the current code or a recovery code. Refused while an organisation you are in requires it.

Request body

The body has the type SecondFactorBody.

FieldTypeRequiredDescription
codestringnoThe six digits the authenticator app shows now. pattern ^\d{6}$.
recoveryCodestringnoOne of the recovery codes made when two-step sign-in was turned on. Each works once. at least 10 characters; at most 32 characters.

Responses

StatusMeaningBody
200Off.Accepted
400The body is not valid.ErrorResponse
401Not signed in, or the code is wrong (auth.two_factor_invalid).ErrorResponse
403The request came from an origin that may not make changes.ErrorResponse
409It is not on (account.two_factor_off), or an organisation requires it (account.two_factor_required_by_org).ErrorResponse
429Too many requests.ErrorResponse

Response body

A 200 answer has the type Accepted.

FieldTypeRequiredDescription
acceptedtrueyes

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools