Sign in
POST
/api/auth/signin
const url = 'http://localhost:3000/api/auth/signin';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 http://localhost:3000/api/auth/signin \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example" }'Rate-limited to 10 attempts per 15 minutes per IP.
Request Body required
Section titled “Request Body required ” Media type application/json
object
email
required
string format: email
password
required
string
Example generated
{ "email": "hello@example.com", "password": "example"}Responses
Section titled “ Responses ”Signed in. Sets a session cookie and returns the profile with sessionToken for non-browser clients (use as Cookie: session=
Media type application/json
object
data
object
id
required
string format: uuid
email
required
string format: email
firstName
string
lastName
string
avatarUrl
string
role
required
string
isActive
required
boolean
createdAt
required
string format: date-time
sessionToken
string
Example
{ "data": { "role": "super_admin" }}Invalid email or password
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}Account deactivated
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}Too many signin attempts
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}