Users Mutations

ForgotPassword

Triggers a password reset email

Parameters

email - String
User email address

Example

mutation ForgotPassword($email: String!) {
  ForgotPassword(email: $email)
}
{
  "email": "[email protected]"
}

Returned data

{
  "data": {
    "ForgotPassword": true
  }
}

ResetPassword

Resets a user password using a token

Parameters

email - String
User email address
token - String
Password reset token
password - String
New password

Example

mutation ResetPassword($email: String!, $token: String!, $password: String!) {
  ResetPassword(email: $email, token: $token, password: $password) {
    token
    type
    expires_at
  }
}
{
  "email": "[email protected]",
  "token": "RESET-TOKEN-123",
  "password": "NewStrongPassword!2025"
}

Returned data

{
  "data": {
    "ResetPassword": {
      "token": "jwt-token-example",
      "type": "bearer",
      "expires_at": "2025-12-31T23:59:59Z"
    }
  }
}

EnableTwoFactorAuth

Enables two-factor authentication for the current user

Parameters

None

Example

mutation {
  EnableTwoFactorAuth
}

Returned data

{
  "data": {
    "EnableTwoFactorAuth": {
      "qrcode": "data:image/png;base64,...",
      "secret": "ABCDEF123456",
      "backup_codes": ["CODE-1", "CODE-2"]
    }
  }
}

DisableTwoFactorAuth

Disables two-factor authentication for the current user

Parameters

None

Example

mutation {
  DisableTwoFactorAuth
}

Returned data

{
  "data": {
    "DisableTwoFactorAuth": {
      "status": "disabled"
    }
  }
}

ConfirmTwoFactorAuth

Confirms two-factor authentication with a verification code

Parameters

code - String
Verification code

Example

mutation ConfirmTwoFactorAuth($code: String) {
  ConfirmTwoFactorAuth(code: $code)
}
{
  "code": "123456"
}

Returned data

{
  "data": {
    "ConfirmTwoFactorAuth": "verified"
  }
}

Returned types

WebToken

FieldTypeDescription
tokenStringAuthentication token
typeStringToken type (e.g., bearer)
expires_atDateTimeExpiration timestamp