Create account
POST
/api/auth/signup
const url = 'http://localhost:3000/api/auth/signup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example","firstName":"example","lastName":"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/signup \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example", "firstName": "example", "lastName": "example" }'Rate-limited to 5 attempts per hour per IP. Duplicate emails return a generic 400 (no account enumeration).
Request Body required
Section titled “Request Body required ” Media type application/json
object
email
required
string format: email
password
required
string
firstName
string
lastName
string
Example generated
{ "email": "hello@example.com", "password": "example", "firstName": "example", "lastName": "example"}Responses
Section titled “ Responses ”Account created. Sets a session cookie; returns the profile with sessionToken for non-browser clients.
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" }}Validation error or email already registered (generic message)
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}Too many signup attempts
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}