Disable MFA

DELETE /v1/mfa/disable

Turn off two-factor authentication for your user. Removing a sign-in factor needs two proofs on top of your credential, both checked by the server: your current password and a current code (an authenticator code, or a backup code — which is used up). The request carries them as a JSON body.

Interactive session only. This call requires an interactive dashboard session (a session JWT): sign in with /auth/login (followed by /auth/mfa when MFA is on) and send the token as Authorization: Bearer <session_jwt>. API keys and OAuth/MCP tokens get 403 with code: "interactive_session_required".

What happens on success:

  • Sign-in no longer asks for a code. The authenticator secret and the remaining backup codes stop working; to turn MFA on again, enroll anew (new secret, new codes).
  • Every signed-in session of your user ends — session tokens issued before this call are revoked, in the dashboard and anywhere else. The response carries a fresh session token (access_token) so the caller can carry on. API keys are not affected.
  • The change is recorded as a security event in your activity log.

Rate limits

The password check shares one counter with every other current-password check (for example changing your password, or regenerating backup codes): after five attempts without a correct password, requests are refused with 429 until 15 minutes pass with no further attempt — each attempt restarts the 15 minutes. A correct password resets the counter. The code check counts toward the shared limit of 5 code checks per hour per user (with sign-in, /mfa/activate, /mfa/verify and backup-code regeneration); it runs only after the password is accepted.

Request body

password string Req
Your current password (the one you sign in with).
token string Req
A current six-digit authenticator code, or one of your backup codes.

Response (200 OK)

success boolean
true.
message string
MFA disabled successfully.
access_token string
A new session token (JWT) for your user, usable as Authorization: Bearer … — the one you signed in with is now revoked. Omitted if the earlier sessions could not be revoked (MFA is off all the same, and your current session keeps working) or a new token could not be issued (sign in again).

Errors

Error bodies are {"success": false, "message": "…", "error": "…"} (error carries the same text as message), except where noted.

400 Bad Request
Current password and a current authentication code are required to disable MFA., Invalid request body, or MFA is not enabled for this account.
401 Unauthorized
Current password is incorrect. or Invalid MFA code or backup code — or missing / invalid auth.
403 Forbidden
The credential is an API key or an OAuth/MCP token: this call needs an interactive dashboard session (a session JWT). Body {"error": "…", "code": "interactive_session_required"}.
429 Too Many Requests
Too many failed attempts. Please try again later. (password counter) or Too many MFA attempts. Try again in N minutes. (code limit).
500 Internal Server Error
The MFA record could not be read or the code could not be checked; or, after both proofs passed, MFA could not be turned off (plain-text body Failed to disable MFA). MFA stays on.
Request
curl -X DELETE "https://api.ngris.com/v1/mfa/disable" \ -H "Authorization: Bearer <session_jwt>" \ -H "Content-Type: application/json" \ -d '{ "password": "<your_password>", "token": "123456" }'
Response — 200 OK
{ "success": true, "message": "MFA disabled successfully", "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." }
On this page
Disable MFA