POST /api/auth/reset/consume — set a new password using a reset token. The token holder is authenticated by possession of the single-use token. Returns 200 on success; 400 for a weak password or an invalid/expired/used token. The password is validated and the token consumed BEFORE the expensive Argon2 hash, so a bad token cannot be used to force hashing work.
const url = 'https://example.com/api/auth/reset/consume';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"password":"example","token":"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/api/auth/reset/consume \ --header 'Content-Type: application/json' \ --data '{ "password": "example", "token": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "password": "example", "token": "example"}Responses
Section titled “Responses”Password reset consumed and password updated
object
Examplegenerated
{ "ok": true}Invalid token or weak password
The canonical JSON body of every error response — the single source of truth
the frontend binds to. Every AppError serializes as this exact shape, and
the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is
what the frontend error schema is generated from, so there is no hand-written
error schema on either end.
object
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response — the single source of truth
the frontend binds to. Every AppError serializes as this exact shape, and
the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is
what the frontend error schema is generated from, so there is no hand-written
error schema on either end.
object
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Example
{ "code": "not_found"}