Skip to content
These docs describe Tradr v0.17.0. Running an older release? Check the release notes for what changed.

Clear an account lockout with an emailed unlock token.

POST
/api/auth/unlock
curl --request POST \
--url https://api.tradr.cloud/api/auth/unlock \
--header 'Content-Type: application/json' \
--data '{ "token": "example" }'

Public. Rate limited by client IP (10 / 15 min, the login posture — token guessing is primarily throttled by the token’s 256-bit entropy + 15 min TTL), tightening to 5 while the shared rate-limit store is unavailable. Atomically consumes the single-use account_unlock token and clears the per-address lock for its owner. Expired, already-consumed, unrecognized, and wrong-purpose tokens are indistinguishable: one generic 400 INVALID_OR_EXPIRED_TOKEN. An unlock for an address that is no longer locked still returns 200 — the token was spent. Sends no mail and stays functional when the instance has no email configured.

Media typeapplication/json
object
token
required

The raw token from the emailed link’s URL fragment.

string
/^[0-9a-f]{64}$/
Examplegenerated
{
"token": "example"
}

{ success: true } — the lock (if any) was cleared.

Validation error, or INVALID_OR_EXPIRED_TOKEN (expired / consumed / unknown / wrong purpose — one generic body).

Rate limit reached (IP-keyed).