Remove current password and create another one

Restore Password

The POST /v2/restorePassword endpoint allows users to securely reset their password by providing a verification code along with a new password. This endpoint is the second step in the forgot-password flow: after requesting a reset code, the user submits that code together with their nickname and the desired new password. The password change takes effect immediately upon success.

Endpoint

POST /v2/restorePassword

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when a user has forgotten their password and has already initiated the forgot-password flow to receive a reset code. Submit the reset code along with the user's nickname and the new password to complete the password update. This is also appropriate when a partner application needs to facilitate a secure credential reset on behalf of a user.

Request Body

FieldTypeRequiredDescription
nickNamestringYesThe unique username/nickname identifying the account. Minimum length: 1.
codestringYesThe verification code received via the forgot-password flow. Minimum length: 1.
passwordstringYesThe new password to set. Must meet strength and complexity requirements. Minimum length: 1.
passwordConfirmstringYesConfirmation of the new password. Must exactly match password. Minimum length: 1.
{
  "nickName": "johndoe",
  "code": "847291",
  "password": "NewSecure@Pass1!",
  "passwordConfirm": "NewSecure@Pass1!"
}

Response

200 OK

FieldTypeDescription
restoreStatestring (nullable)Indicates the outcome state of the restore operation (e.g., "Success", "Failed").
errorsarray of strings (nullable)List of error messages if the operation encountered validation or processing issues. Empty or null on success.
successstring (nullable)A success message or confirmation string returned when the password is updated successfully.
{
  "restoreState": "Success",
  "errors": null,
  "success": "Password has been successfully updated."
}

Error Codes

CodeWhen it happens
400Missing required fields, password and passwordConfirm do not match, or new password fails complexity requirements
401Token missing, expired, or invalid
403Insufficient permissions to perform the password reset
404Account with the provided nickName not found
500Internal server error

Common Mistakes

  • Submitting a code that has expired or was already used — always request a fresh code if the previous one is no longer valid.
  • Providing a password that does not match passwordConfirm — both fields must be identical character for character.
  • Using a weak password that does not meet complexity requirements (minimum length, mix of letters, numbers, and symbols).
  • Omitting nickName — this field is required even though it may seem redundant after the forgot-password request step.

Related Endpoints

  • POST /v2/forgotPassword — Initiates the password reset flow and sends a verification code to the user
  • POST /api/auth/v2 — Authenticates a user and returns a Bearer token
  • POST /api/auth/refresh — Refreshes an existing Bearer token before it expires

Example

curl -X POST https://api.banking.netevia.dev/v2/restorePassword \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nickName": "johndoe",
    "code": "847291",
    "password": "NewSecure@Pass1!",
    "passwordConfirm": "NewSecure@Pass1!"
  }'
Body Params
string
required
length ≥ 1
string
required
length ≥ 1
string
required
length ≥ 1
string
required
length ≥ 1
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json