post__mfa_reset

POST /mfa/reset

Reset MFA Configuration

Reset the user's multi-factor authentication configuration. This endpoint allows users to reset their MFA setup when they lose access to their MFA methods. Organization owners and administrators can also reset MFA settings for other users in their organization.

Request Body

Name
Type
Required
Description

resetUserId

string

false

Optional user ID to reset MFA for. If not provided, resets the authenticated user's MFA. Requires OWNER or ADMINISTRATOR role.

TypeScript Client Library

// Note: This endpoint doesn't have a direct client method in the provided TypeScript client
// You would need to use the generic makeRequest method:
// For self-reset:
// this.makeRequest<any>('mfa/reset', 'POST', null);
// For admin reset:
// this.makeRequest<any>('mfa/reset', 'POST', { resetUserId: 'user-id' });

Code Samples

# Self-reset (reset your own MFA)
curl -X POST https://backend.flashback.tech/mfa/reset \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

# Admin reset (reset another user's MFA - requires OWNER or ADMINISTRATOR role)
curl -X POST https://backend.flashback.tech/mfa/reset \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -H 'Content-Type: application/json' \
  -d '{"resetUserId": "user-id-to-reset"}'

Example responses

200 Response

{
  "success": true,
  "message": "MFA reset successfully"
}

403 Response

{
  "success": false,
  "error": "Insufficient permissions. OWNER or ADMINISTRATOR role required to reset another user's MFA."
}

404 Response

{
  "success": false,
  "error": "User not found"
}

500 Response

{
  "success": false,
  "error": "Failed to reset MFA"
}

Responses

Status
Meaning
Description
Schema

200

MFA reset completed successfully

Inline

403

Insufficient permissions to reset another user's MFA

Inline

404

User not found

Inline

500

Internal server error

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Indicates if the request was successful

» message

string

false

none

Success message confirming the reset

Status Code 403

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Indicates if the request was successful

» error

string

false

none

Error message describing the permission issue

Status Code 404

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Indicates if the request was successful

» error

string

false

none

Error message describing the user not found

Status Code 500

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Indicates if the request was successful

» error

string

false

none

Error message describing the issue

Last updated

Was this helpful?