Create an account and start a session.
const url = 'https://api.tradr.cloud/api/auth/register';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example","timezone":"Europe/London"}'};
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://api.tradr.cloud/api/auth/register \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example", "timezone": "Europe/London" }'Public. Creates a user and sets the session cookie, so a successful register leaves the caller signed in. Rate limited to 5 requests per 15 minutes per client, tightening to 3 while the shared rate-limit store is unavailable. emailVerified is false until the address is confirmed; when transactional email is not configured there is nothing to confirm and the flag stays false without blocking use.
An operator can close sign-up by setting DISABLE_REGISTRATION=true, in which case every request here is refused with 403 REGISTRATION_DISABLED whatever the client, and no account is created. The default leaves registration open, so an instance that does not set the variable behaves as described above. Sign-in and password reset are never gated.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional IANA zone the client detected in the browser, stored as the user’s reporting timezone. Omit it and the account is created with the default, UTC; it is changeable afterwards via PUT /api/users/me/timezone. Unrelated to an account’s trading-day timezone.
Example
Europe/LondonResponses
Section titled “Responses”The new user. The session cookie is set.
object
object
Examplegenerated
{ "user": { "email": "hello@example.com", "emailVerified": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "isAdmin": true }}Validation error.
Registration is closed on this instance (REGISTRATION_DISABLED).
That email is already registered.
Rate limit exceeded.