Loading API documentation...
Complete API reference for RentAmac Portal endpoints
/loginemailUser's email address
passwordUser's password
twoFactorCode2FA code from authenticator app (optional)
twoFactorRecoveryCode2FA recovery code (optional, alternative to twoFactorCode)
Login credentials with optional 2FA code or recovery code
{
"email": "user@example.com",
"password": "yourpassword",
"twoFactorCode": "123456",
"twoFactorRecoveryCode": null
}{
"tokenType": "Bearer",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600,
"refreshToken": "def50200..."
}Authentication tokens
/refreshrefreshTokenValid refresh token obtained from login
Refresh token to generate new access token
{
"refreshToken": "def50200..."
}{
"tokenType": "Bearer",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600,
"refreshToken": "def50200..."
}New authentication tokens
/registeremailValid email address for the new account
passwordStrong password for the account (minimum requirements apply)
User registration details
{
"email": "newuser@example.com",
"password": "securepassword123"
}trueRegistration success status
/confirmEmailuserIdUser ID from registration
codeEmail confirmation code sent to user's email
changedEmailNew email if email was changed (optional)
trueEmail confirmation success status
/forgotPasswordemailEmail address of the account to reset password for
Email address for password reset
{
"email": "user@example.com"
}truePassword reset request success status
/resetPasswordemailEmail address of the account
resetCodePassword reset code received via email
newPasswordNew password for the account
Password reset details
{
"email": "user@example.com",
"resetCode": "ABC123",
"newPassword": "newsecurepassword123"
}truePassword reset success status
/api/portal/users/two-factor/authenticator/begin{
"value": {
"base32Secret": "JBSWY3DPEHPK3PXP",
"otpauthUri": "otpauth://totp/Rent%20a%20Mac%3Ayou%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=Rent%20a%20Mac&digits=6&period=30"
},
"isSuccess": true
}The pending secret expires after 10 minutes
/api/portal/users/two-factor/authenticator/confirmcodeThe 6-digit code from the authenticator app
A code generated from the secret returned by the begin call
{
"code": "123456"
}{
"value": ["a1b2c-3d4e5", "f6g7h-8i9j0"],
"isSuccess": true
}The recovery codes, shown only once
/api/portal/users/two-factor{
"enabled": true,
"method": "authenticator",
"recoveryCodesLeft": 10
}method is "authenticator" or "email"; null when 2FA is off
/api/portal/users/two-factor/email/begin{
"isSuccess": true,
"successMessage": "We sent a 6-digit code to you@example.com."
}Subject to a 60 second resend cooldown
/api/portal/users/two-factor/email/confirmcodeThe 6-digit code that was emailed
The code from the enrollment email
{
"code": "123456"
}{
"isSuccess": true,
"successMessage": "Two-factor authentication is on. Please sign in again."
}2FA enrollment result
/api/portal/users/two-factor/send-code{
"isSuccess": true,
"successMessage": "We sent a 6-digit code to you@example.com."
}Subject to a 60 second resend cooldown
/api/portal/users/two-factor/disablecodeA currently valid second factor
An authenticator code, an emailed code, or a recovery code
{
"code": "123456"
}{
"isSuccess": true,
"successMessage": "Two-factor authentication is off."
}2FA removal result
/api/portal/auth/two-factor/send-codeemailAccount email address
passwordAccount password
The same credentials just submitted to /login
{
"email": "you@example.com",
"password": "your-password"
}{
"isSuccess": true,
"successMessage": "If that account needs a code, we have emailed one."
}Always a success, whatever the outcome
/manage/infonewPasswordNew password
oldPasswordCurrent password
Password change details
{
"newPassword": "newpassword123",
"oldPassword": "currentpassword"
}{
"email": "user@example.com",
"isEmailConfirmed": true
}Updated user information
/api/portal/users/email-change/requirements{
"challenge": "password"
}challenge is "twoFactorCode", "password" or "emailCode"
/api/portal/users/email-change/send-identity-code{
"isSuccess": true,
"successMessage": "We sent a 6-digit code to you@example.com."
}Subject to a 60 second resend cooldown
/api/portal/users/email-change/requestnewEmailThe address to switch to; must not belong to another account
passwordCurrent password, when the challenge is "password"
codeA second factor (challenge "twoFactorCode") or the code sent to the current address (challenge "emailCode")
The new address plus the proof named by the requirements endpoint
{
"newEmail": "new@example.com",
"password": "currentpassword",
"code": null
}{
"isSuccess": true,
"successMessage": "We sent a 6-digit code to new@example.com. Enter it to confirm the change."
}Subject to a 60 second resend cooldown
/api/portal/users/email-change/confirmcodeThe 6-digit code
The code sent to the new address
{
"code": "123456"
}{
"isSuccess": true,
"successMessage": "Your email has been changed. Please sign in again with your new email."
}Email change result