API Reference
Auto-generated
Auth
API reference for auth endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.DELETE /api/v1/auth/account
DELETE
/api/v1/auth/accountDelete Account
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| password | string | Optional | password |
| confirm | boolean | Optional | ConfirmDefault: False |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/auth/account \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/add-password
POST
/api/v1/auth/add-passwordAdd Password
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| password | string | Required | Password |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/add-password \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"password": "example_password"
}'Response Example
JSON
{
"message": "example"
}POST /api/v1/auth/change-password
POST
/api/v1/auth/change-passwordChange Password
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| current_password | string | Required | Current Password |
| new_password | string | Required | New Password |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/change-password \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"current_password": "example_current_password",
"new_password": "example_new_password"
}'Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/check-email
POST
/api/v1/auth/check-emailCheck Email
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/check-email \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email"
}'Response Example
JSON
{
"exists": true,
"has_password": true
}GET /api/v1/auth/check-email-exists
GET
/api/v1/auth/check-email-existsCheck Email Provider
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required |
Request Example
Bash
curl -X GET 'https://api.alterlab.io/api/v1/auth/check-email-exists?email=<email>' \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/complete-signup
POST
/api/v1/auth/complete-signupComplete Signup
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required | ||
| code | string | Required | Code |
| device_fingerprint | object | Optional | Device fingerprint data collected from client. |
| attribution | object | Optional | First-touch attribution data captured at signup. All fields are optional strings — the frontend sends whatever it has. Values are sanitized (HTML stripped, max 500 chars each). |
| anonymous_id | string | Optional | anonymous_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/complete-signup \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email",
"code": "example_code"
}'Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/forgot-password
POST
/api/v1/auth/forgot-passwordForgot Password
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/forgot-password \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email"
}'Response Example
JSON
{
"message": "example"
}POST /api/v1/auth/initiate-signup
POST
/api/v1/auth/initiate-signupInitiate Signup
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required | ||
| password | string | Required | Password |
| name | string | Optional | name |
| device_fingerprint | object | Optional | Device fingerprint data collected from client. |
| attribution | object | Optional | First-touch attribution data captured at signup. All fields are optional strings — the frontend sends whatever it has. Values are sanitized (HTML stripped, max 500 chars each). |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/initiate-signup \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email",
"password": "example_password"
}'Response Example
JSON
{
"message": "example",
"email": "example",
"expires_in_minutes": 0
}GET /api/v1/auth/linked-accounts
GET
/api/v1/auth/linked-accountsGet Linked Accounts
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/linked-accounts \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"accounts": [],
"primary_method": "example",
"has_password": true
}POST /api/v1/auth/linked-accounts/callback
POST
/api/v1/auth/linked-accounts/callbackComplete Link
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| state | string | Required | State |
| provider | string | Required | Provider |
| provider_account_id | string | Required | Provider Account Id |
| provider_email | string | Optional | provider_email |
| display_name | string | Optional | display_name |
| avatar_url | string | Optional | avatar_url |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/linked-accounts/callback \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "example_state",
"provider": "example_provider",
"provider_account_id": "example_provider_account_id"
}'Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/linked-accounts/complete
POST
/api/v1/auth/linked-accounts/completeComplete Link Public
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| state | string | Required | State |
| provider | string | Required | Provider |
| provider_account_id | string | Required | Provider Account Id |
| provider_email | string | Optional | provider_email |
| display_name | string | Optional | display_name |
| avatar_url | string | Optional | avatar_url |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/linked-accounts/complete \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "example_state",
"provider": "example_provider",
"provider_account_id": "example_provider_account_id"
}'Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/linked-accounts/initiate
POST
/api/v1/auth/linked-accounts/initiateInitiate Link
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| provider | string | Required | Provider |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/linked-accounts/initiate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "example_provider"
}'Response Example
JSON
{
"auth_url": "example",
"state": "example"
}DELETE /api/v1/auth/linked-accounts/{provider}
DELETE
/api/v1/auth/linked-accounts/{provider}Unlink Account
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| provider | string | Required | provider |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/auth/linked-accounts/<provider> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"message": "example",
"remaining_methods": 0
}POST /api/v1/auth/login
POST
/api/v1/auth/loginLogin
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required | ||
| password | string | Required | Password |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/login \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email",
"password": "example_password"
}'Response Example
JSON
{
"id": "example",
"email": "example",
"name": "example",
"email_verified": true,
"is_admin": true,
"session_token": "example"
}GET /api/v1/auth/login-history
GET
/api/v1/auth/login-historyGet Login History
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | limitDefault: 10 |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/login-history \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/auth/me
GET
/api/v1/auth/meGet Current User
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/me \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"email": "example",
"name": "example",
"avatar_url": "example",
"created_at": "example",
"subscription_tier": "example"
}POST /api/v1/auth/oauth-signin
POST
/api/v1/auth/oauth-signinOauth Signin
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required | ||
| name | string | Optional | name |
| provider | string | Required | Provider |
| provider_account_id | string | Required | Provider Account Id |
| avatar_url | string | Optional | avatar_url |
| device_fingerprint | object | Optional | Device fingerprint data collected from client. |
| attribution | object | Optional | First-touch attribution data captured at signup. All fields are optional strings — the frontend sends whatever it has. Values are sanitized (HTML stripped, max 500 chars each). |
| anonymous_id | string | Optional | anonymous_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/oauth-signin \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email",
"provider": "example_provider",
"provider_account_id": "example_provider_account_id"
}'Response Example
JSON
{
"id": "example",
"email": "example",
"name": "example",
"email_verified": true,
"is_admin": true,
"session_token": "example"
}POST /api/v1/auth/onboarding-event
POST
/api/v1/auth/onboarding-eventRecord Onboarding Event
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| event | "completed" | "skipped" | Required | Event |
| at_step | integer | Optional | at_step |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/onboarding-event \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event": "..."
}'Response Example
JSON
{
"status": "ok"
}GET /api/v1/auth/profile
GET
/api/v1/auth/profileGet Profile
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/profile \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"email": "example",
"name": "example",
"avatar_url": "example",
"created_at": "example",
"subscription_tier": "example"
}PATCH /api/v1/auth/profile
PATCH
/api/v1/auth/profileUpdate Profile
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | name |
string | Optional |
Request Example
Bash
curl -X PATCH https://api.alterlab.io/api/v1/auth/profile \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"email": "example",
"name": "example",
"avatar_url": "example",
"created_at": "example",
"subscription_tier": "example"
}POST /api/v1/auth/reset-password
POST
/api/v1/auth/reset-passwordReset Password
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| token | string | Required | Token |
| new_password | string | Required | New Password |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/reset-password \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"token": "example_token",
"new_password": "example_new_password"
}'Response Example
JSON
{
"message": "example"
}GET /api/v1/auth/security-overview
GET
/api/v1/auth/security-overviewGet Security Overview
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/security-overview \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"primary_method": "example",
"has_password": true,
"linked_providers": [],
"can_add_password": true,
"email_verified": true
}POST /api/v1/auth/send-verification-code
POST
/api/v1/auth/send-verification-codeSend Verification Code
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/send-verification-code \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email"
}'Response Example
JSON
{
"status": "ok"
}GET /api/v1/auth/sessions
GET
/api/v1/auth/sessionsGet Sessions
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/sessions \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}DELETE /api/v1/auth/sessions
DELETE
/api/v1/auth/sessionsRevoke All Sessions
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/auth/sessions \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/auth/sessions/validate
GET
/api/v1/auth/sessions/validateValidate Session
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/sessions/validate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}DELETE /api/v1/auth/sessions/{session_id}
DELETE
/api/v1/auth/sessions/{session_id}Revoke Session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| session_id | string | Required | session_id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/auth/sessions/<session_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}PATCH /api/v1/auth/sessions/{session_id}/activity
PATCH
/api/v1/auth/sessions/{session_id}/activityUpdate Session Activity
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| session_id | string | Required | session_id |
Request Example
Bash
curl -X PATCH https://api.alterlab.io/api/v1/auth/sessions/<session_id>/activity \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/signup
POST
/api/v1/auth/signupSignup
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/signup \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/unlock-welcome-bonus
POST
/api/v1/auth/unlock-welcome-bonusUnlock Welcome Bonus
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/unlock-welcome-bonus \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/auth/verify-code
POST
/api/v1/auth/verify-codeVerify Code
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
string | Required | ||
| code | string | Required | Code |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/verify-code \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "example_email",
"code": "example_code"
}'Response Example
JSON
{
"success": true,
"message": "example",
"credits_awarded": 0
}POST /api/v1/auth/welcome-shown
POST
/api/v1/auth/welcome-shownMark Welcome Shown
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/auth/welcome-shown \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/auth/welcome-status
GET
/api/v1/auth/welcome-statusGet Welcome Status
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/auth/welcome-status \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"reduced": true,
"full_bonus": 0,
"received": 0,
"remaining": 0,
"sibling_accounts": [],
"can_unlock": true
}