Change Password
POST
/api/v1/users/password
const url = 'https://api.spartanauth.com/api/v1/users/password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"currentPassword":"example","newPassword":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.spartanauth.com/api/v1/users/password \ --header 'Content-Type: application/json' \ --data '{ "currentPassword": "example", "newPassword": "example" }'Replaces the signed-in user’s password after the current password matches. A replacement that has appeared in a data breach is rejected. If the breach check is unavailable the password is left unchanged.
Request Body
Section titled “Request Body ” Media type application/json
object
currentPassword
string
newPassword
string
Example generated
{ "currentPassword": "example", "newPassword": "example"}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
status
string
message
string
Example generated
{ "status": "example", "message": "example"}default
Section titled “default ”An unexpected error response.
Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}