Password Management

Change Password

The Change Password endpoint allows authenticated users to securely update their account password. The request requires the user's current password along with a new password and confirmation, ensuring that only the rightful account owner can perform the change. Once successfully processed, the new password takes effect immediately.

Endpoint

POST /changePassword

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 wishes to update their login credentials from within an authenticated session. This is appropriate for user-initiated password changes in account settings flows. It is not intended for password reset scenarios where the user has lost access to their account.

Request Body

FieldTypeRequiredDescription
currentPasswordstringYesThe user's existing password. Minimum length: 1 character.
passwordstringYesThe new password the user wants to set. Must meet platform password strength requirements. Minimum length: 1 character.
passwordConfirmstringYesConfirmation of the new password. Must match the password field exactly. Minimum length: 1 character.
{
  "currentPassword": "OldP@ssw0rd!",
  "password": "NewP@ssw0rd#2025",
  "passwordConfirm": "NewP@ssw0rd#2025"
}

Response

200 OK

A 200 status code indicates the password was changed successfully. The response body is empty on success.

{}

Error Codes

CodeWhen it happens
400Missing required fields, password and passwordConfirm do not match, or new password fails strength requirements
401Token missing, expired, or invalid
403Insufficient permissions
404Resource not found
500Internal server error

Common Mistakes

  • Providing a password and passwordConfirm that do not match — both fields must be identical.
  • Sending an incorrect currentPassword — the current password must exactly match the account's existing password.
  • Using an expired Bearer token — tokens expire after 10 minutes; refresh before making this call.
  • Choosing a new password that fails platform strength requirements (e.g., too short or missing required character types).

Related Endpoints

  • POST /api/auth/v2 — Obtain a new Bearer token using username and password credentials
  • POST /api/auth/refresh — Refresh an existing Bearer token before it expires

Example

curl -X POST https://api.banking.netevia.dev/changePassword \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "currentPassword": "OldP@ssw0rd!",
    "password": "NewP@ssw0rd#2025",
    "passwordConfirm": "NewP@ssw0rd#2025"
  }'
Body Params
string
required
length ≥ 1
string
required
length ≥ 1
string
required
length ≥ 1
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response
200

Success

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here!