Change Password
POST
/auth/change-password/
const url = 'https://example.com/auth/change-password/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"current_password":"example","new_password":"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/auth/change-password/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "current_password": "example", "new_password": "example" }'Change the current user’s password (requires current password).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
ChangePasswordRequest
object
current_password
required
Current Password
string
new_password
required
New Password
New password (policy: min 12 chars, 3+ character classes: lowercase, uppercase, digits, symbols). The min_length=8 here is a schema floor; the runtime validator enforces the full policy.
string
Example generated
{ "current_password": "example", "new_password": "example"}Responses
Section titled “ Responses ”Successful Response
Bad request — invalid query parameters or payload
Media type application/problem+json
Unauthorized — missing or invalid credentials
Media type application/problem+json
Forbidden — caller lacks access to this resource
Media type application/problem+json
Not found
Media type application/problem+json
Validation error
Media type application/problem+json
Too many requests — retry after the advertised interval
Media type application/problem+json
Headers
Section titled “Headers ” Retry-After
integer
Seconds until the request may be retried
Internal server error
Media type application/problem+json
Service unavailable — the database could not serve the request
Media type application/problem+json