Signup
Creates an organisation, admin user, team, and first workspace in a single atomic call.
Request body:
| Field | Type | Required | Description |
|---|
org_name | string | Yes | Organisation name |
admin_name | string | Yes | Admin user’s display name |
admin_email | string | Yes | Admin user’s email |
admin_password | string | Yes | Password (min 8 characters) |
workspace_name | string | Yes | First workspace name |
team_name | string | Yes | Team name for the workspace |
system_prompt | string | No | Optional system prompt for the workspace |
Response:
{
"status": "ok",
"org_id": "de14cfd7...",
"user_id": "20939ded...",
"workspace_id": "ws-support-bot"
}
Sets the session cookie automatically.
Login
Request body:
| Field | Type | Required |
|---|
email | string | Yes |
password | string | Yes |
Accepts both JSON and application/x-www-form-urlencoded.
Response:
{
"status": "ok",
"user": {"id": "...", "email": "...", "name": "...", "role": "admin"}
}
Sets the supaproxy_session cookie (JWT, httpOnly, 24h expiry).
Session
Response:
// Authenticated
{"user": {"id": "...", "email": "...", "name": "...", "role": "admin"}}
// Not authenticated
{"user": null}
Logout
Clears the session cookie. Redirects to /login or returns {"status": "ok"}.