Command: change own password (current password required).
POST
/profile/change-password
const url = 'https://example.com/api/v1/profile/change-password';const options = { method: 'POST', headers: {cookie: 'dnse_session=<dnse_session>', '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://example.com/api/v1/profile/change-password \ --header 'Content-Type: application/json' \ --cookie dnse_session=<dnse_session> \ --data '{ "currentPassword": "example", "newPassword": "example" }'Authorizations
Abschnitt betitelt „Authorizations“Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“Media typeapplication/json
object
currentPassword
required
string format: password
newPassword
required
string format: password
Examplegenerated
{ "currentPassword": "example", "newPassword": "example"}Responses
Abschnitt betitelt „Responses“Password changed.
Malformed request.
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}