Skip to main content

Change User's Password

This endpoint changes the password of the authenticated user

info

This operation requires authentication.

HTTP Request

PATCH /api/v2/user/{id}/change_password/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this user
passwordstringtruenoneThe current password
new_passwordstringtruenoneThe new password

Example Body Parameters

{
"password": "string",
"new_password": "string"
}

Example Request


const inputBody = '{
"password": "string",
"new_password": "string"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization: Bearer <token>'
};

fetch('/api/v2/user/{id}/change_password/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
204No ContentResponse status codeNone