Skip to main content

Overview

Changes the password for the currently authenticated user. The current password must be provided and correct for the update to succeed.

Endpoint

PUT /api/profile/password
Requires authentication. Requests are made with a Bearer token via the Authorization header.

Request

Body parameters

currentPassword
string
required
The user’s existing password. Must match the password currently set on the account.
newPassword
string
required
The new password to set on the account.

Response

message
string
A confirmation message indicating the password was changed successfully.

Example

TypeScript
import { updatePassword } from "./api/Profile";

const response = await updatePassword({
  currentPassword: "hunter2",
  newPassword: "correctHorseBatteryStaple",
});

console.log(response.message);