LoguDocs
Open Logu

Sign-in · setPassword

Set or change your password

POST /api/auth/password

Needs the current password unless this session started in the last 15 minutes (the magic-link reset path). Signs out the other sessions.

Who may call it
Anyone (no credentials)
Server
https://api.logu.dev

Request body#

Content type application/json (required).

A new password (and the current one, unless fresh). Strict.

FieldTypeRequiredNotes
newPasswordstringrequired10–128 chars
currentPasswordstringoptional0–128 chars
{
  "newPassword": "a long new password",
  "currentPassword": "the old one"
}

Example#

curl -s -X POST "https://api.logu.dev/api/auth/password" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"newPassword":"a long new password","currentPassword":"the old one"}'

Responses#

200

Saved.

{
  "ok": true,
  "revoked": 2
}
Response fields
FieldTypeRequiredNotes
oktruerequired
revokedintegerrequired

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
400unknown_fieldThe body has a field the endpoint doesn't know (often a typo or snake_case).
400bad_requestThe request is malformed or a field is invalid (see issues).
401unauthorizedNo credentials, or the API key or session is invalid or revoked.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
429rate_limitedThis API key sent too many requests, or a human did too much too fast: sign-in attempts, workspaces created in a day, or a global daily cap on new accounts was reached.
500internal_errorSomething went wrong on Logu's side.