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.eyJzdWIiOiIxODk5Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQ4NTE2NTQyLCJleHAiOjE3NTExMDg1NDIsImp0aSI6IjZlZGM0NDA0LTg1NjEtNDJjOC05MGI4LTJiMjRmZjk5MTUwMyJ9.tXUTl6-F8gTLqsuY9NQONOTq6MTdoxOfvFbXzvRDBjA
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=P%2BVU6EIg9GULHcBFBa1rWNCJBy9LxashiWhCTx6wv%2FbNcrrgT3r1pAVYUFPEjcniyY3ja1UC29ugg0%2FKktjfJM1Of%2B5J%2B8YZX9dGkmuBX5D7L4sQSKmwSHRJfA5kWayE6bhtRc2vXJyI5yy1CqyImPswOCC5JfYwJh0xP4u24ZCAP2zDuY9BxCcCUyiTnTrGe7dPoR6i3T%2B0DxB65%2Fv2BrT9VxfECOtxHO3u71hjAei9zO8jicktUmNpj7sQwPb5e%2FoqoGAhtmbJcBXqpWbjM0WlBPeigYMJThVtv8rJwg%3D%3D--FojTs7KPmC3pY6D5--nfueQUpgQ%2BTyWLS2YP1yeQ%3D%3D; path=/; httponly; SameSite=Lax
etag: W/"405d2ee1f6df0a41c922b62a4b52ec2c"
cache-control: max-age=0, private, must-revalidate
x-request-id: 57f8f7f4-7b3f-4e97-81dd-61c8fcaa6a09
x-runtime: 0.027251
content-length: 221
Body
{
"user": {
"id": 1899,
"company": null,
"contact_phone_number": null,
"email": "doug.white+operator@example.com",
"first_name": "Doug",
"job_position": null,
"last_name": "White",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}