Sign in and start a session.
POST
/api/auth/login
const url = 'https://api.tradr.cloud/api/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"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://api.tradr.cloud/api/auth/login \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example" }'Public. On success sets the session cookie; every authenticated endpoint reads it. Rate limited to 10 requests per 15 minutes per client, tightening to 5 while the shared rate-limit store is unavailable. A wrong email and a wrong password are answered identically, so the response does not reveal whether an address is registered. A user may hold 5 concurrent sessions; signing in a sixth time ends the oldest one.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
password
required
string
Examplegenerated
{ "email": "hello@example.com", "password": "example"}Responses
Section titled “Responses”The signed-in 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.
Invalid email or password.
Rate limit exceeded.