Authentication
Kamustatus supports two authentication methods: session-based authentication for browser usage and API key authentication for programmatic access.
Session Authentication (Better Auth)
Kamustatus uses Better Auth for user authentication with email and password.
Sign Up
curl -X POST https://app.kamustatus.com/api/auth/sign-up/email \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Doe",
"email": "jane@example.com",
"password": "your-secure-password"
}'
Sign In
curl -X POST https://app.kamustatus.com/api/auth/sign-in/email \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{
"email": "jane@example.com",
"password": "your-secure-password"
}'
The response sets a session cookie. Use the cookie for subsequent requests:
curl https://app.kamustatus.com/api/projects \
-b cookies.txt
Get Current Session
curl https://app.kamustatus.com/api/auth/get-session \
-b cookies.txt
API Key Authentication
Each project has an API key prefixed with km_. Use it via the x-api-key header:
curl https://app.kamustatus.com/api/monitors \
-H "x-api-key: km_your_api_key"
API keys are scoped to a single project. You can find and regenerate your API key in the project settings.
When to Use Which
| Method | Use case |
|---|---|
| Session cookie | Browser-based access, account management, multi-project operations |
| API key | CI/CD, scripts, CLI, integrations, single-project operations |