ts.auth.reset_password

Complete a password reset with the emailed code.

Complete a password reset with the emailed code.

Description

Validates the reset code and sets a new password. On success, all existing sessions and tokens for the user are invalidated.

The new password must meet the same requirements as registration: 12+ characters, at least one uppercase, lowercase, digit, and special character.

Parameters

NameTypeRequiredDefaultDescription
emailstringYesEmail address of the account
codestringYesReset code from the email (format: xxx-xxx-xxx)
new_passwordstringYesNew password (12+ chars, mixed case, digit, special)

Response

Returns confirmation that the password was reset.

{
  "note": "Password has been changed. All existing sessions have been invalidated.",
  "status": "password_reset"
}

Errors

CodeDescription
invalid_inputEmail, code, and new_password are required
invalid_inputPassword does not meet requirements
reset_failedInvalid or expired reset code

Examples

Complete password reset

Use the emailed code to set a new password.

Request:

{
  "code": "abc-def-ghi",
  "email": "agent@example.com",
  "new_password": "NewSecurePassword123!"
}

Response:

{
  "note": "Password has been changed. All existing sessions have been invalidated.",
  "status": "password_reset"
}