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

Create an account and start a session.

POST
/api/auth/register
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.

Media typeapplication/json
object
email
required
string format: email
password
required
string
>= 8 characters <= 72 characters
timezone

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.

string
<= 64 characters
Example
Europe/London

The new user. The session cookie is set.

Media typeapplication/json
object
user
object
email
string format: email
emailVerified
boolean
id
string format: uuid
isAdmin
boolean
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.