Chahge password for loggedin user.
Users
PATCH change password
Endpoint
PATCH /api/v1/users
Parameters
| Name | Description |
|---|---|
| user[password] required | New password |
| user[password_confirmation] required | Password confirmation |
| user[current_password] required | Current password |
Request
Route
PATCH /api/v1/users
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxOTMyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDE1LCJleHAiOjE3NjYyMTg0MTUsImp0aSI6IjhlMDY2ZmVkLTA4YjktNDEzZS04MmFiLTA4ZjEyZTU2OTExZSJ9.13wZV1YYpN-8pUAwDLSk4j00ga6PTlIw4zPXk-CuSBc
Host: example.org
Cookie:
Body
{
"user": {
"password": "new_valiD_passw0rd!",
"password_confirmation": "new_valiD_passw0rd!",
"current_password": "valiD_passw0rd!"
}
}
Response
Simulated Response
Status
200
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
set-cookie: _interslice_session=YgEo7NE4PZ%2BbuA5F1IFE89M4PbOtkuimmikeo0P2zxGWian7pLalp%2BNPm1FptlvoEzRQ8QK0Vsgh55Feh8zUBGRfhSHQ1EgoP5OmK%2FYcxDArannKRtmMj%2Ft3DoxZG7YotBM08ImFXIAisU5A241KvC1JabRnwlL5Yx5zpzstW075Ngac%2Fv3r%2Ffkjd%2BAWbaGdSyjRpKJL8b75Bp55z%2Ft9x9fpTNa8Hk%2FD5alrlOapdK7XVlRGSvXczyXjB%2FoFcKfa8jQWqgL1WxN2GqNwduF0TRhUo7aqvDKypua1NuK5yQ%3D%3D--eECCZSg7lYJXi9WQ--fY6R5o9Q5cwr3zw4vOLwaQ%3D%3D; path=/; httponly; samesite=lax
etag: W/"c47fa78fdb744a9b31848f50abd00e78"
cache-control: max-age=0, private, must-revalidate
x-request-id: 3f43bbda-5604-4186-aee8-a1f8d1ad8628
x-runtime: 0.019114
content-length: 257
Body
{
"user": {
"id": 1932,
"company": null,
"contact_phone_number": null,
"email": "lettie.gleason+operator@example.com",
"financial_company_id": null,
"first_name": "Lettie",
"job_position": null,
"last_name": "Gleason",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}