Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Change the caller's password

Any signed in user. Replaces the caller’s password after verifying the current one. A new password under eight characters is refused, and every other session keeps the token it already holds.

POST/api/v1/auth/change-password
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Request body
requiredapplication/json
current_passwordstringrequired
min length 1
new_passwordstringrequired
min length 8
Responses
200

Password changed

okbooleanrequired
400

Current password is incorrect, or the current or new password is missing or too short

detailstringrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/auth/change-password' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "current_password": "string",
  "new_password": "stringst"
}'
Response
{
  "ok": true
}