dokkaiv0.1.0
API Reference

Change your own password

Verify the current password, then rotate it. Keeps this session, revokes all others.

PATCH/auth/users/me/passwordany

Requires any authenticated role. Verifies current_password first (401 on mismatch), then invalidates every other session for this user — the session making this request stays valid.

Body

current_passwordstringrequired
Your existing password.
new_passwordstringrequired
The replacement password.

Request

cURL
bash
curl -X PATCH localhost:8000/auth/users/me/password \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"current_password":"admin","new_password":"<a strong password>"}'

Responses

200Password updated
json
{ "message": "password updated" }
401current_password didn't match
json
{ "detail": "invalid current password" }