Signup & Login
Email/password authentication with verification and session management
Email/Password Signup
bash
curl -X POST https://api.scalix.world/v1/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure-password",
"data": {"name": "Alice"}
}'Response:
json
{
"user": {
"id": "usr_abc123",
"email": "user@example.com",
"is_anonymous": false,
"created_at": "2026-05-20T10:00:00Z"
},
"session": {
"access_token": "eyJhbGciOi...",
"refresh_token": "a1b2c3d4e5...",
"expires_in": 3600,
"token_type": "bearer"
}
}Email Verification
Send a verification email:
bash
curl -X POST https://api.scalix.world/v1/auth/verify \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"type": "email"}'Login
bash
curl -X POST https://api.scalix.world/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure-password"
}'Token Refresh
bash
curl -X POST https://api.scalix.world/v1/auth/refresh \
-d '{"refresh_token": "a1b2c3d4e5..."}'Logout
bash
curl -X POST https://api.scalix.world/v1/auth/logout \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"refresh_token": "a1b2c3d4e5..."}'Magic Link (Passwordless)
bash
curl -X POST https://api.scalix.world/v1/auth/magic-link \
-d '{"email": "user@example.com"}'The user receives an email with a one-time login link. Clicking it returns an access token.
Password Reset
Request a password reset:
bash
curl -X POST https://api.scalix.world/v1/auth/recover \
-d '{"email": "user@example.com"}'The user receives an email with a reset token, then:
bash
curl -X PUT https://api.scalix.world/v1/auth/recover/reset \
-d '{"token": "reset-token", "password": "new-secure-password"}'