Skip to content

Set Password

POST
/api/auth/set-password
curl --request POST \
--url https://example.com/api/auth/set-password \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "new_password": "example" }'

Set an initial password for users who don’t have one (OAuth-only accounts).

Unlike change-password, this does NOT require a current password. It will reject requests from users who already have a password identity.

Media type application/json
SetPasswordBody

Body for setting an initial password (users without password identity).

object
new_password
required
New Password
string
Example generated
{
"new_password": "example"
}

Successful Response

Media type application/json
SetPasswordResponse

{"set": True} after a successful initial-password set.

object
set
required
Set
boolean
Example generated
{
"set": true
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}