Reference
API reference
Generated from the OpenAPI/Swagger definition that ships with the API (swagger.json). Base URL: http://localhost:8080/.
Authentication
| Scheme | In | Header | Notes |
|---|---|---|---|
AdminApiKey | header | X-Admin-API-Key | Admin API Key for protected admin routes |
ApiKeyAuth | header | Authorization | Type "Bearer" + your JWT token |
AppApiKey | header | X-App-API-Key | Per-application API Key for app-scoped routes |
AppID | header | X-App-ID | The UUID of the application context |
2FA
POST/2fa/backup-email
Add backup email
Register a secondary email address for 2FA recovery (sends verification email)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.AddBackupEmailRequest | Backup email |
Body
| Field | Type | Description |
|---|---|---|
backup_email required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/2fa/backup-email
Remove backup email
Remove the backup email address from the user account
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/backup-email/disable
Disable backup email 2FA
Disable backup-email-based 2FA for the authenticated user. No verification code required — authentication alone is sufficient.
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/backup-email/enable
Enable backup email 2FA
Enable backup-email-based 2FA for the authenticated user. The backup email must already be verified.
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TwoFAEnableResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/backup-email/resend
Resend backup email 2FA code
Resend a new 2FA verification code to the user's backup email during login
| Name | In | Required | Type | Description |
|---|---|---|---|---|
resend | body | yes | object | Temporary login token |
Body
| Field | Type | Description |
|---|---|---|
temp_token | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/2fa/backup-email/status
Get backup email status
Return the current backup email address and whether it is verified
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.BackupEmailStatusResponse |
401 | Unauthorized | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
GET/2fa/backup-email/verify
Verify backup email
Confirm a backup email using the token from the verification email
| Name | In | Required | Type | Description |
|---|---|---|---|---|
token | query | yes | string | Verification token |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
POST/2fa/disable
Disable 2FA
Disable 2FA for the user (requires TOTP code or email 2FA code)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
disable | body | yes | dto.TwoFADisableRequest | Disable 2FA Data |
Body
| Field | Type | Description |
|---|---|---|
code required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/email/enable
Enable email-based 2FA
Enable email-based 2FA for the user (sends codes to registered email)
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TwoFAEnableResponse |
400 | Bad Request | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/email/resend
Resend email 2FA code
Resend a new 2FA verification code to the user's email during login
| Name | In | Required | Type | Description |
|---|---|---|---|---|
resend | body | yes | object | Temporary login token |
Body
| Field | Type | Description |
|---|---|---|
temp_token | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/enable
Enable 2FA
Enable 2FA for the user after successful verification
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TwoFAEnableResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/generate
Generate 2FA setup
Generate a 2FA secret and QR code for user setup
| Status | Description | Schema |
|---|---|---|
200 | OK | twofa.TwoFASetupResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/login-verify
Verify 2FA during login
Verify the 2FA code during the login process (supports TOTP, email code, or recovery code)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
verify | body | yes | dto.TwoFALoginRequest | 2FA Login Data |
Body
| Field | Type | Description |
|---|---|---|
code | string | |
device_name | string | Human-readable label for the trusted device |
method | string | Method optionally forces how the submitted code is verified. Leave empty to use the user's primary 2FA method. "sms_recovery" verifies a one-time code sent to the user's verified phone number via POST /2fa/sms/recovery/send. |
recovery_code | string | |
remember_device | boolean | When true, create a trusted device record |
temp_token required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.LoginResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/2fa/methods
Get available 2FA methods
Get the 2FA methods available for the current application
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TwoFAMethodsResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/passkey/begin
Begin passkey 2FA verification
Start the WebAuthn assertion ceremony for 2FA verification during login
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.Passkey2FABeginRequest | Temp token |
Body
| Field | Type | Description |
|---|---|---|
temp_token required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.Passkey2FABeginResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/passkey/finish
Finish passkey 2FA verification
Complete the WebAuthn assertion ceremony for 2FA verification during login
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.Passkey2FAFinishRequest | Assertion response |
Body
| Field | Type | Description |
|---|---|---|
credential required | object | |
temp_token required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.LoginResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/recovery-codes
Generate new recovery codes
Generate and display new recovery codes (requires password and/or TOTP code)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
verify | body | yes | dto.TwoFAVerifyRequest | TOTP Code |
Body
| Field | Type | Description |
|---|---|---|
code required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TwoFARecoveryCodesResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/sms/enable
Enable SMS-based 2FA
Enable SMS-based 2FA for the user (phone number must be verified first)
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TwoFAEnableResponse |
400 | Bad Request | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/sms/recovery/send
Send an SMS recovery code
Send a one-time recovery code via SMS during login. This is a fallback for users whose primary 2FA method (e.g. an authenticator app) is unavailable. Requires: SMS 2FA enabled for the application, a configured SMS provider, 2FA active on the user, and a verified phone number. The code is valid for 5 minutes and must be submitted to POST /2fa/login-verify with method="sms_recovery".
| Name | In | Required | Type | Description |
|---|---|---|---|---|
recovery | body | yes | object | Temporary login token |
Body
| Field | Type | Description |
|---|---|---|
temp_token | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/2fa/sms/resend
Resend SMS 2FA code
Resend a new SMS 2FA verification code to the user's phone during login
| Name | In | Required | Type | Description |
|---|---|---|---|---|
resend | body | yes | object | Temporary login token |
Body
| Field | Type | Description |
|---|---|---|
temp_token | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/2fa/trusted-devices
List trusted devices
List all trusted devices for the authenticated user in the current app
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TrustedDevicesListResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/2fa/trusted-devices
Revoke all trusted devices
Revoke all trusted devices for the authenticated user in the current app
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/2fa/trusted-devices/{id}
Revoke a trusted device
Revoke a specific trusted device by ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Trusted device UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
POST/2fa/verify-setup
Verify 2FA setup
Verify the initial 2FA setup with a TOTP code
| Name | In | Required | Type | Description |
|---|---|---|---|---|
setup | body | yes | dto.TwoFAVerifyRequest | TOTP Code |
Body
| Field | Type | Description |
|---|---|---|
code required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/phone
Add phone number
Register a phone number for SMS 2FA (sends verification SMS)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.AddPhoneRequest | Phone number |
Body
| Field | Type | Description |
|---|---|---|
phone_number required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/phone
Remove phone number
Remove the phone number from the user account
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/phone/status
Get phone number status
Return the current phone number and whether it is verified
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.PhoneStatusResponse |
401 | Unauthorized | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
POST/phone/verify
Verify phone number
Confirm a phone number using the code from the verification SMS
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.VerifyPhoneRequest | Verification code |
Body
| Field | Type | Description |
|---|---|---|
code required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
Activity Logs
GET/activity-logs
Get user activity logs
Retrieve the authenticated user's activity logs with pagination and filtering
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | Page number (default: 1) |
limit | query | no | integer | Items per page (default: 20, max: 100) |
event_type | query | no | string | Filter by event type |
start_date | query | no | string | Start date filter (YYYY-MM-DD) |
end_date | query | no | string | End date filter (YYYY-MM-DD) |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.ActivityLogListResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/activity-logs/event-types
Get available event types
Retrieve list of available activity log event types for filtering
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
401 | Unauthorized | dto.ErrorResponse |
GET/activity-logs/export
Export user activity logs
Export the authenticated user's activity logs as CSV or JSON (max 10,000 rows). Use the X-Export-Truncated response header to detect if the result was capped.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
format | query | no | string | Export format: csv or json (default: json) |
event_type | query | no | string | Filter by event type |
start_date | query | no | string | Start date filter (YYYY-MM-DD) |
end_date | query | no | string | End date filter (YYYY-MM-DD) |
| Status | Description | Schema |
|---|---|---|
200 | CSV export | string |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/activity-logs/{id}
Get activity log by ID
Retrieve a specific activity log by ID (users can only access their own logs)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Activity Log ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.ActivityLogResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/activity-logs
Get all activity logs (Admin)
Retrieve all users' activity logs with pagination and filtering (admin access required)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | Page number (default: 1) |
limit | query | no | integer | Items per page (default: 20, max: 100) |
event_type | query | no | string | Filter by event type |
start_date | query | no | string | Start date filter (YYYY-MM-DD) |
end_date | query | no | string | End date filter (YYYY-MM-DD) |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.ActivityLogListResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/activity-logs/export
Export all activity logs (Admin)
Export all users' activity logs as CSV or JSON (max 10,000 rows). Use the X-Export-Truncated response header to detect if the result was capped.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
format | query | no | string | Export format: csv or json (default: json) |
event_type | query | no | string | Filter by event type |
start_date | query | no | string | Start date filter (YYYY-MM-DD) |
end_date | query | no | string | End date filter (YYYY-MM-DD) |
| Status | Description | Schema |
|---|---|---|
200 | CSV export | string |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Admin
POST/admin/apps
Create a new application
Register a new application under a specific tenant
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app | body | yes | dto.CreateAppRequest | Application Creation Data |
Body
| Field | Type | Description |
|---|---|---|
description | string | |
frontend_url | string | |
magic_link_enabled | boolean | |
magic_link_path | string | |
name required | string | |
reset_password_path | string | Email Action Link Paths (optional; empty = use system defaults) |
tenant_id required | string | |
verify_email_path | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.AppResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/apps/{id}
Get application details
Retrieve details of a specific application including OAuth configurations
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.AppResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
POST/admin/apps/{id}/oauth-config
Set OAuth configuration
Configure OAuth provider credentials (Google, GitHub, etc.) for an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
config | body | yes | dto.UpsertOAuthConfigRequest | OAuth Config Data |
Body
| Field | Type | Description |
|---|---|---|
client_id required | string | |
client_secret required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
provider required | string | e.g., "google", "github" |
redirect_url required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OAuthConfigResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/tenants
List all tenants
Retrieve a paginated list of all tenants
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/tenants
Create a new tenant
Register a new tenant organization in the system
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tenant | body | yes | dto.CreateTenantRequest | Tenant Creation Data |
Body
| Field | Type | Description |
|---|---|---|
name required | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.TenantResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/users/{id}/trusted-devices
List trusted devices for a user
Returns all trusted devices registered by a specific user across all apps
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | User UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.TrustedDevicesListResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/users/{id}/trusted-devices
Revoke all trusted devices for a user
Removes all trusted devices for a user, forcing full 2FA on all devices
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | User UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/users/{id}/trusted-devices/{device_id}
Revoke a trusted device
Removes a specific trusted device, forcing the user to re-authenticate with 2FA on that device
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | User UUID |
device_id | path | yes | string | Trusted Device UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Webhooks
GET/admin/apps/{app_id}/webhook-deliveries
List all delivery logs for an app (admin)
Get paginated delivery history for all webhook endpoints of an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application ID |
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.WebhookDeliveryListResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/apps/{app_id}/webhooks
List webhook endpoints for an app (admin)
Returns all webhook endpoints registered for the given application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application ID |
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.WebhookEndpointListResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/apps/{app_id}/webhooks
Create webhook endpoint (admin)
Register a new webhook endpoint for an application. Returns the secret only once.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application ID |
request | body | yes | dto.CreateWebhookRequest | Webhook endpoint details |
Body
| Field | Type | Description |
|---|---|---|
event_type required | string | |
url required | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.CreateWebhookResponse |
400 | Bad Request | dto.ErrorResponse |
409 | Conflict | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/webhooks
List all webhook endpoints (admin)
Returns all registered webhook endpoints across all applications
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.WebhookEndpointListResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/webhooks/{id}
Delete webhook endpoint (admin)
Soft-delete a webhook endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Webhook Endpoint ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/webhooks/{id}/deliveries
List delivery logs for endpoint (admin)
Get paginated delivery history for a specific webhook endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Webhook Endpoint ID |
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.WebhookDeliveryListResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
PUT/admin/webhooks/{id}/toggle
Toggle webhook endpoint active state (admin)
Enable or disable a webhook endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Webhook Endpoint ID |
request | body | yes | dto.ToggleWebhookRequest | Active state |
Body
| Field | Type | Description |
|---|---|---|
is_active | boolean |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/app/{id}/webhooks
List webhook endpoints (app API)
Returns all webhook endpoints for this application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.WebhookEndpointListResponse |
400 | Bad Request | dto.ErrorResponse |
POST/app/{id}/webhooks
Create webhook endpoint (app API)
Register a new webhook endpoint for this application. Returns the secret only once.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
request | body | yes | dto.CreateWebhookRequest | Webhook endpoint details |
Body
| Field | Type | Description |
|---|---|---|
event_type required | string | |
url required | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.CreateWebhookResponse |
400 | Bad Request | dto.ErrorResponse |
409 | Conflict | dto.ErrorResponse |
DELETE/app/{id}/webhooks/{endpoint_id}
Delete webhook endpoint (app API)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
endpoint_id | path | yes | string | Webhook Endpoint ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
GET/app/{id}/webhooks/{endpoint_id}/deliveries
List webhook delivery logs (app API)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
endpoint_id | path | yes | string | Webhook Endpoint ID |
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.WebhookDeliveryListResponse |
400 | Bad Request | dto.ErrorResponse |
PUT/app/{id}/webhooks/{endpoint_id}/toggle
Toggle webhook endpoint (app API)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
endpoint_id | path | yes | string | Webhook Endpoint ID |
request | body | yes | dto.ToggleWebhookRequest | Active state |
Body
| Field | Type | Description |
|---|---|---|
is_active | boolean |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
Admin - Email
GET/admin/apps/{id}/email-config
Get default SMTP config for application
Retrieve the default SMTP server configuration for an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.EmailServerConfigResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
PUT/admin/apps/{id}/email-config
Save SMTP config for application
Create or update an SMTP server configuration for an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
config | body | yes | dto.EmailServerConfigRequest | SMTP Config |
Body
| Field | Type | Description |
|---|---|---|
from_address required | string | |
from_name | string | |
is_active | boolean | |
is_default | boolean | |
name | string | |
smtp_host required | string | |
smtp_password | string | #nosec G101 -- This is a DTO field |
smtp_port required | integer | |
smtp_username | string | |
use_tls | boolean |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/apps/{id}/email-config
Delete SMTP configs for application
Remove all SMTP server configurations for an application (falls back to global)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/apps/{id}/email-test
Send test email (app-scoped)
Send a test email to verify the default SMTP configuration for an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
request | body | yes | dto.EmailTestRequest | Test Email Data |
Body
| Field | Type | Description |
|---|---|---|
to_email required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/apps/{id}/send-email
Send an email
Send an email of the specified type using app's SMTP config and templates
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
request | body | yes | dto.SendEmailRequest | Send Email Data |
Body
| Field | Type | Description |
|---|---|---|
to_email required | string | |
type_code required | string | |
variables | object |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.SendEmailResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-templates
List email templates
Retrieve email templates for a specific app or global defaults
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | no | string | Application ID (omit for global defaults) |
| Status | Description | Schema |
|---|---|---|
200 | OK | array<dto.EmailTemplateResponse> |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/email-templates
Save email template
Create or update an email template for a specific app or as global default
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | no | string | Application ID (omit for global default) |
email_type_id | query | yes | string | Email Type ID |
template | body | yes | dto.EmailTemplateRequest | Template Data |
Body
| Field | Type | Description |
|---|---|---|
body_html | string | |
body_text | string | |
from_email | string | |
from_name | string | |
is_active | boolean | |
name required | string | |
server_config_id | string | |
subject required | string | |
template_engine required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/email-templates/preview
Preview email template
Render a template with sample variables for preview
| Name | In | Required | Type | Description |
|---|---|---|---|---|
preview | body | yes | dto.EmailPreviewRequest | Preview Data |
Body
| Field | Type | Description |
|---|---|---|
body_html | string | |
body_text | string | |
subject required | string | |
template_engine required | string | |
variables | object |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.EmailPreviewResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-templates/{id}
Get email template
Retrieve a specific email template by ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Template ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.EmailTemplateResponse |
404 | Not Found | dto.ErrorResponse |
DELETE/admin/email-templates/{id}
Delete email template
Remove an email template by ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Template ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-types
List all email types
Retrieve all registered email types
| Status | Description | Schema |
|---|---|---|
200 | OK | array<dto.EmailTypeResponse> |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/email-types
Create a custom email type
Register a new custom email type for use in templates
| Name | In | Required | Type | Description |
|---|---|---|---|---|
emailType | body | yes | dto.CreateEmailTypeRequest | Email Type Data |
Body
| Field | Type | Description |
|---|---|---|
code required | string | |
default_subject | string | |
description | string | |
name required | string | |
variables | array<dto.EmailTypeVariableResponse> |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.EmailTypeResponse |
400 | Bad Request | dto.ErrorResponse |
409 | Conflict | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-types/{code}
Get email type by code
Retrieve a specific email type by its code
| Name | In | Required | Type | Description |
|---|---|---|---|---|
code | path | yes | string | Email Type Code |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.EmailTypeResponse |
404 | Not Found | dto.ErrorResponse |
PUT/admin/email-types/{id}
Update an email type
Update an existing email type's name, description, subject, or variables
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Email Type ID |
emailType | body | yes | dto.UpdateEmailTypeRequest | Email Type Update Data |
Body
| Field | Type | Description |
|---|---|---|
default_subject | string | |
description | string | |
is_active | boolean | |
name | string | |
variables | array<dto.EmailTypeVariableResponse> |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.EmailTypeResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/email-types/{id}
Delete a custom email type
Delete a custom email type (system types cannot be deleted)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Email Type ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-variables
List well-known email template variables
Returns all variables that the system can automatically resolve from user profiles, app settings, or that must be passed explicitly. Use this as a reference when adding variables to email types.
| Status | Description | Schema |
|---|---|---|
200 | OK | array<dto.EmailTypeVariableResponse> |
Admin - Email Servers
GET/admin/apps/{id}/email-servers
List SMTP configs for application
Retrieve all SMTP server configurations for a specific application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | array<dto.EmailServerConfigResponse> |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-servers
List all SMTP configs
Retrieve all SMTP server configurations across all applications
| Status | Description | Schema |
|---|---|---|
200 | OK | array<dto.EmailServerConfigResponse> |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/email-servers
Create SMTP config
Create a new SMTP server configuration for an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Application ID |
config | body | yes | dto.EmailServerConfigRequest | SMTP Config |
Body
| Field | Type | Description |
|---|---|---|
from_address required | string | |
from_name | string | |
is_active | boolean | |
is_default | boolean | |
name | string | |
smtp_host required | string | |
smtp_password | string | #nosec G101 -- This is a DTO field |
smtp_port required | integer | |
smtp_username | string | |
use_tls | boolean |
| Status | Description | Schema |
|---|---|---|
201 | Created | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/email-servers/{id}
Get SMTP config by ID
Retrieve a specific SMTP server configuration by its ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Config ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.EmailServerConfigResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
PUT/admin/email-servers/{id}
Update SMTP config
Update an existing SMTP server configuration by its ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Config ID |
config | body | yes | dto.EmailServerConfigRequest | SMTP Config |
Body
| Field | Type | Description |
|---|---|---|
from_address required | string | |
from_name | string | |
is_active | boolean | |
is_default | boolean | |
name | string | |
smtp_host required | string | |
smtp_password | string | #nosec G101 -- This is a DTO field |
smtp_port required | integer | |
smtp_username | string | |
use_tls | boolean |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/email-servers/{id}
Delete SMTP config by ID
Remove a specific SMTP server configuration by its ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Config ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/email-servers/{id}/test
Send test email by config ID
Send a test email to verify a specific SMTP configuration
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Config ID |
request | body | yes | dto.EmailTestRequest | Test Email Data |
Body
| Field | Type | Description |
|---|---|---|
to_email required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Admin - IP Rules
GET/admin/apps/{id}/ip-rules
List IP rules for an application
Retrieve all IP access rules (allow/block) for a specific application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
include_inactive | query | no | boolean | Include inactive rules |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.IPRuleListResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/apps/{id}/ip-rules
Create an IP rule
Add a new IP access rule (allow or block) for a specific application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
request | body | yes | dto.IPRuleCreateRequest | IP rule data |
Body
| Field | Type | Description |
|---|---|---|
description | string | |
is_active | boolean | |
match_type required | string | |
rule_type required | string | |
value required | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.IPRuleResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/apps/{id}/ip-rules/check
Check IP access
Evaluate whether a specific IP address is allowed to access an application based on its IP rules
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
request | body | yes | dto.IPAccessCheckRequest | IP address to check |
Body
| Field | Type | Description |
|---|---|---|
ip_address required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.IPAccessCheckResponse |
400 | Bad Request | dto.ErrorResponse |
503 | Service Unavailable | dto.ErrorResponse |
GET/admin/apps/{id}/ip-rules/{rule_id}
Get an IP rule
Retrieve a specific IP access rule by its ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
rule_id | path | yes | string | IP Rule ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.IPRuleResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
PUT/admin/apps/{id}/ip-rules/{rule_id}
Update an IP rule
Update an existing IP access rule by its ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
rule_id | path | yes | string | IP Rule ID |
request | body | yes | dto.IPRuleUpdateRequest | Updated IP rule data |
Body
| Field | Type | Description |
|---|---|---|
description | string | |
is_active | boolean | |
match_type | string | |
rule_type | string | |
value | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.IPRuleResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/apps/{id}/ip-rules/{rule_id}
Delete an IP rule
Remove an IP access rule by its ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application ID |
rule_id | path | yes | string | IP Rule ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Admin OIDC
GET/admin/oidc/apps/{id}/clients
List OIDC clients for an app
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | array<dto.OIDCClientResponse> |
POST/admin/oidc/apps/{id}/clients
Create an OIDC client
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application UUID |
request | body | yes | dto.CreateOIDCClientRequest | Client data |
Body
| Field | Type | Description |
|---|---|---|
allowed_grant_types required | string | comma-separated |
allowed_scopes required | string | comma-separated |
description | string | |
is_confidential | boolean | |
login_primary_color | string | LoginPrimaryColor overrides Bootstrap's default primary color (e.g. "#4f46e5"). Empty = Bootstrap default. |
login_theme | string | LoginTheme controls the color scheme of OIDC pages: "app" (inherit from Application), "auto" (default, follow OS preference), "light", or "dark". |
logo_url | string | |
name required | string | |
pkce_required | boolean | |
redirect_uris required | string | JSON array string, e.g. '["https://app.example.com/cb"]' |
require_consent | boolean |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.OIDCClientResponse |
GET/admin/oidc/apps/{id}/clients/{cid}
Get a single OIDC client
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application UUID |
cid | path | yes | string | Client UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCClientResponse |
PUT/admin/oidc/apps/{id}/clients/{cid}
Update an OIDC client
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application UUID |
cid | path | yes | string | Client UUID |
request | body | yes | dto.UpdateOIDCClientRequest | Update data |
Body
| Field | Type | Description |
|---|---|---|
allowed_grant_types | string | |
allowed_scopes | string | |
description | string | |
is_active | boolean | |
is_confidential | boolean | |
login_primary_color | string | LoginPrimaryColor overrides Bootstrap's default primary color. Empty = Bootstrap default. |
login_theme | string | LoginTheme controls the color scheme of OIDC pages: "app" (inherit from Application), "auto", "light", or "dark". |
logo_url | string | |
name | string | |
pkce_required | boolean | |
redirect_uris | string | |
require_consent | boolean |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCClientResponse |
DELETE/admin/oidc/apps/{id}/clients/{cid}
Delete an OIDC client
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application UUID |
cid | path | yes | string | Client UUID |
| Status | Description | Schema |
|---|---|---|
204 | No Content |
POST/admin/oidc/apps/{id}/clients/{cid}/rotate-secret
Rotate client secret
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Application UUID |
cid | path | yes | string | Client UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCClientResponse |
Admin - RBAC
GET/admin/rbac/permissions
List all permissions
Retrieve all available permissions in the system
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/rbac/permissions
Create a permission
Create a new custom permission (resource:action pair)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
permission | body | yes | dto.CreatePermissionRequest | Permission Data |
Body
| Field | Type | Description |
|---|---|---|
action required | string | |
description | string | |
resource required | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.PermissionResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/rbac/roles
List roles for an application
Retrieve all roles (including permissions) for a specific application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Application ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/rbac/roles
Create a new role
Create a custom role for an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
role | body | yes | dto.CreateRoleRequest | Role Data |
Body
| Field | Type | Description |
|---|---|---|
app_id required | string | |
description | string | |
name required | string |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.RoleResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/rbac/roles/{id}
Get role by ID
Retrieve a specific role with its permissions
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Role ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.RoleResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
PUT/admin/rbac/roles/{id}
Update a role
Update a role's name and description (system roles cannot be renamed)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Role ID |
role | body | yes | dto.UpdateRoleRequest | Role Update Data |
Body
| Field | Type | Description |
|---|---|---|
description | string | |
name required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/rbac/roles/{id}
Delete a role
Delete a custom role (system roles cannot be deleted)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Role ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
PUT/admin/rbac/roles/{id}/permissions
Set role permissions
Replace all permissions for a role with the specified permission IDs
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Role ID |
permissions | body | yes | dto.SetRolePermissionsRequest | Permission IDs |
Body
| Field | Type | Description |
|---|---|---|
permission_ids required | array<string> |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/rbac/user-roles
List user-role assignments
Retrieve all user-role assignments for a specific application with pagination
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Application ID |
page | query | no | integer | Page number |
page_size | query | no | integer | Page size |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/rbac/user-roles
Assign a role to a user
Assign a role to a user within an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Application ID |
assignment | body | yes | dto.AssignRoleRequest | Assignment Data |
Body
| Field | Type | Description |
|---|---|---|
role_id required | string | |
user_id required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/admin/rbac/user-roles
Revoke a role from a user
Remove a role assignment from a user within an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Application ID |
user_id | query | yes | string | User ID |
role_id | query | yes | string | Role ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/admin/rbac/user-roles/user
Get user's roles
Retrieve all roles assigned to a specific user in an application
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Application ID |
user_id | query | yes | string | User ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.UserRolesResponse |
400 | Bad Request | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Users
GET/admin/users/export
Export users as CSV or JSON (Admin)
Export all users as CSV or JSON (max 10,000 rows). Optionally filter by app_id or search term. Use the X-Export-Truncated response header to detect if the result was capped at 10,000 rows.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
format | query | no | string | Export format: csv or json (default: csv) |
app_id | query | no | string | Filter by application UUID |
search | query | no | string | Filter by email or name (case-insensitive) |
| Status | Description | Schema |
|---|---|---|
200 | CSV export | string |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/admin/users/import
Bulk import users from CSV or JSON (Admin)
Upload a CSV or JSON file to bulk-create users under a specific application. The app_id query parameter is required. Duplicate emails are skipped and reported. Imported users have no password — they must use the password reset flow to set one. CSV expected columns: email (required), name, first_name, last_name, locale (all optional). JSON: top-level array or {"users":[...]} object, same fields.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | query | yes | string | Target application UUID |
file | formData | yes | file | CSV or JSON file to import |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.UserImportResult |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Public
GET/app-config/{app_id}
Get public login configuration for an app
Returns enabled social providers and OIDC availability for the login/register UI
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.AppLoginConfigResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
social
GET/auth/facebook/callback
Facebook OAuth2 Callback
Handles Facebook OAuth2 callback and returns JWT tokens
| Name | In | Required | Type | Description |
|---|---|---|---|---|
state | query | yes | string | State token |
code | query | yes | string | Authorization code |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | object |
401 | Unauthorized | object |
500 | Internal Server Error | object |
GET/auth/facebook/link
Link Facebook account
Initiates OAuth flow to link a Facebook account to the authenticated user
| Name | In | Required | Type | Description |
|---|---|---|---|---|
redirect_uri | query | no | string | Frontend callback URL |
| Status | Description | Schema |
|---|---|---|
307 | Redirect | string |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/auth/facebook/link/callback
Facebook link callback
Handles callback from Facebook OAuth to link account to existing user
| Name | In | Required | Type | Description |
|---|---|---|---|---|
state | query | yes | string | State token |
code | query | yes | string | Authorization code |
| Status | Description | Schema |
|---|---|---|
302 | Redirect with error | string |
GET/auth/facebook/login
Facebook OAuth2 Login
Redirects user to Facebook OAuth2 login page
| Name | In | Required | Type | Description |
|---|---|---|---|---|
redirect_uri | query | no | string | Frontend callback URL |
| Status | Description | Schema |
|---|---|---|
307 | Redirect | string |
GET/auth/github/callback
GitHub OAuth2 Callback
Handles GitHub OAuth2 callback and returns JWT tokens
| Name | In | Required | Type | Description |
|---|---|---|---|---|
state | query | yes | string | State token |
code | query | yes | string | Authorization code |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | object |
401 | Unauthorized | object |
500 | Internal Server Error | object |
GET/auth/github/link
Link GitHub account
Initiates OAuth flow to link a GitHub account to the authenticated user
| Name | In | Required | Type | Description |
|---|---|---|---|---|
redirect_uri | query | no | string | Frontend callback URL |
| Status | Description | Schema |
|---|---|---|
307 | Redirect | string |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/auth/github/link/callback
GitHub link callback
Handles callback from GitHub OAuth to link account to existing user
| Name | In | Required | Type | Description |
|---|---|---|---|---|
state | query | yes | string | State token |
code | query | yes | string | Authorization code |
| Status | Description | Schema |
|---|---|---|
302 | Redirect with error | string |
GET/auth/github/login
GitHub OAuth2 Login
Redirects user to GitHub OAuth2 login page
| Name | In | Required | Type | Description |
|---|---|---|---|---|
redirect_uri | query | no | string | Frontend callback URL |
| Status | Description | Schema |
|---|---|---|
307 | Redirect | string |
GET/auth/google/callback
Google OAuth2 Callback
Handles Google OAuth2 callback and returns JWT tokens
| Name | In | Required | Type | Description |
|---|---|---|---|---|
state | query | yes | string | State token |
code | query | yes | string | Authorization code |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | object |
401 | Unauthorized | object |
500 | Internal Server Error | object |
GET/auth/google/link
Link Google account
Initiates OAuth flow to link a Google account to the authenticated user
| Name | In | Required | Type | Description |
|---|---|---|---|---|
redirect_uri | query | no | string | Frontend callback URL |
| Status | Description | Schema |
|---|---|---|
307 | Redirect | string |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/auth/google/link/callback
Google link callback
Handles callback from Google OAuth to link account to existing user
| Name | In | Required | Type | Description |
|---|---|---|---|---|
state | query | yes | string | State token |
code | query | yes | string | Authorization code |
| Status | Description | Schema |
|---|---|---|
302 | Redirect with error | string |
GET/auth/google/login
Google OAuth2 Login
Redirects user to Google OAuth2 login page
| Name | In | Required | Type | Description |
|---|---|---|---|---|
redirect_uri | query | no | string | Frontend callback URL |
| Status | Description | Schema |
|---|---|---|
307 | Redirect | string |
POST/auth/merge/confirm
Confirm account merge
Confirms merging a social-login provider into an existing email/password account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.MergeAccountRequest | Merge confirmation payload |
Body
| Field | Type | Description |
|---|---|---|
merge_token required | string | #nosec G101 -- DTO field, not a hardcoded credential |
password required | string | #nosec G101,G117 -- DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MergeAccountResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/profile/social-accounts
List linked social accounts
Returns all social accounts linked to the authenticated user
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.SocialAccountListResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/profile/social-accounts/{id}
Unlink a social account
Removes a linked social account from the authenticated user's profile
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Social account ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.UnlinkSocialAccountResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
auth
GET/auth/validate
Validate JWT Token
Validates a JWT token and returns basic user info for external services
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Auth
POST/forgot-password
Request password reset
Initiate password reset process
| Name | In | Required | Type | Description |
|---|---|---|---|---|
email | body | yes | dto.ForgotPasswordRequest | User Email |
Body
| Field | Type | Description |
|---|---|---|
email required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/login
User login
Authenticate user and issue JWTs
| Name | In | Required | Type | Description |
|---|---|---|---|---|
login | body | yes | dto.LoginRequest | User Login Data |
Body
| Field | Type | Description |
|---|---|---|
captcha_token | string | Google reCAPTCHA response token (required when CAPTCHA is triggered) |
email required | string | |
password required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.LoginResponse |
202 | 2FA verification or setup required | dto.TwoFARequiredResponse |
400 | Bad Request | dto.ErrorResponse |
401 | May include retry_after (seconds) advisory field | dto.ErrorResponse |
403 | CAPTCHA verification required | dto.CaptchaRequiredResponse |
423 | Account is locked | dto.AccountLockedResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/logout
User logout
Logout user and revoke refresh token
| Name | In | Required | Type | Description |
|---|---|---|---|---|
logout | body | yes | dto.LogoutRequest | Logout Data |
Body
| Field | Type | Description |
|---|---|---|
access_token required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
refresh_token required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/magic-link/request
Request a magic link login email
Send a magic link to the user's email for passwordless authentication. Always returns 200 regardless of whether the email exists (to prevent enumeration).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.MagicLinkRequest | Magic Link Request Data |
Body
| Field | Type | Description |
|---|---|---|
email required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/magic-link/verify
Verify a magic link token and log in
Verify the magic link token from the email and return access/refresh tokens. The token is single-use and expires after 10 minutes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.MagicLinkVerifyRequest | Magic Link Verification Data |
Body
| Field | Type | Description |
|---|---|---|
app_id | string | optional: overrides the X-App-ID header for multi-app token disambiguation |
token required | string | #nosec G101 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.LoginResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/refresh-token
Refresh access token
Get new access token using refresh token
| Name | In | Required | Type | Description |
|---|---|---|---|---|
refresh | body | yes | dto.RefreshTokenRequest | Refresh Token |
Body
| Field | Type | Description |
|---|---|---|
refresh_token required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.LoginResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/register
Register a new user
Register a new user with email and password
| Name | In | Required | Type | Description |
|---|---|---|---|---|
registration | body | yes | dto.RegisterRequest | User Registration Data |
Body
| Field | Type | Description |
|---|---|---|
email required | string | |
password required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
201 | Created | dto.UserResponse |
400 | Bad Request | dto.ErrorResponse |
409 | Conflict | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/resend-verification
Resend email verification
Resend verification email to user. Returns a generic success message regardless of whether the email exists or is already verified (to prevent email enumeration).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.ResendVerificationRequest | Email address |
Body
| Field | Type | Description |
|---|---|---|
email required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/reset-password
Reset password
Complete password reset process
| Name | In | Required | Type | Description |
|---|---|---|---|---|
reset | body | yes | dto.ResetPasswordRequest | Reset Token and New Password |
Body
| Field | Type | Description |
|---|---|---|
new_password required | string | |
token required | string | #nosec G101 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
429 | Too Many Requests | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/verify-email
Verify email
Verify user's email address
| Name | In | Required | Type | Description |
|---|---|---|---|---|
token | query | yes | string | Verification Token |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Health
GET/health
System health check
Checks the connectivity and latency of PostgreSQL, Redis, and SMTP. Returns 200 when all configured components are up, 503 when any are down.
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.HealthResponse |
503 | Service Unavailable | dto.HealthResponse |
GET/metrics
Prometheus metrics
Exposes application and runtime metrics in Prometheus exposition format. Requires Admin API Key authentication.
| Status | Description | Schema |
|---|---|---|
200 | Prometheus text format metrics | string |
401 | Unauthorized | dto.ErrorResponse |
OIDC
GET/oidc/{app_id}/.well-known/jwks.json
JWKS endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | oidc.JWKS |
GET/oidc/{app_id}/.well-known/openid-configuration
OIDC discovery document
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCDiscoveryDocument |
404 | Not Found | dto.ErrorResponse |
GET/oidc/{app_id}/authorize
OIDC authorization endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
response_type | query | yes | string | Must be 'code' |
client_id | query | yes | string | OIDC client ID |
redirect_uri | query | yes | string | Registered redirect URI |
scope | query | yes | string | Requested scopes (must include 'openid') |
state | query | no | string | Opaque state value |
nonce | query | no | string | Nonce |
code_challenge | query | no | string | PKCE code challenge |
code_challenge_method | query | no | string | PKCE method (S256) |
POST/oidc/{app_id}/authorize
OIDC authorize form submit
GET/oidc/{app_id}/end_session
OIDC RP-Initiated Logout
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
id_token_hint | query | no | string | Previously-issued ID token |
post_logout_redirect_uri | query | no | string | URI to redirect to after logout |
state | query | no | string | Opaque value returned with redirect |
| Status | Description | Schema |
|---|---|---|
200 | OK | |
302 | Found |
POST/oidc/{app_id}/introspect
OIDC token introspection (RFC 7662)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCIntrospectResponse |
POST/oidc/{app_id}/revoke
OIDC token revocation (RFC 7009)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
token | formData | yes | string | Token to revoke |
token_type_hint | formData | no | string | access_token or refresh_token |
client_id | formData | no | string | Client ID (confidential clients) |
client_secret | formData | no | string | Client secret (confidential clients) |
| Status | Description | Schema |
|---|---|---|
200 | OK | |
401 | Unauthorized | dto.OIDCTokenErrorResponse |
POST/oidc/{app_id}/token
OIDC token endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCTokenResponse |
400 | Bad Request | dto.OIDCTokenErrorResponse |
GET/oidc/{app_id}/userinfo
OIDC userinfo endpoint
| Name | In | Required | Type | Description |
|---|---|---|---|---|
app_id | path | yes | string | Application UUID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.OIDCUserInfoResponse |
401 | Unauthorized | dto.ErrorResponse |
Passkeys
POST/passkey/login/begin
Begin passwordless login
Start a passwordless login ceremony using discoverable credentials (passkeys)
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.PasskeyLoginBeginResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/passkey/login/finish
Finish passwordless login
Complete the passwordless login ceremony with the client's assertion response
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.PasskeyLoginFinishRequest | Assertion response |
Body
| Field | Type | Description |
|---|---|---|
credential required | object | |
session_id required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.LoginResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/passkey/register/begin
Begin passkey registration
Start the WebAuthn registration ceremony to add a new passkey
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.PasskeyRegisterBeginResponse |
401 | Unauthorized | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/passkey/register/finish
Finish passkey registration
Complete the WebAuthn registration ceremony with the client's attestation response
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.PasskeyRegisterFinishRequest | Registration response |
Body
| Field | Type | Description |
|---|---|---|
credential required | object | |
name required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
GET/passkeys
List passkeys
List all registered passkeys for the authenticated user
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.PasskeyListResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
PUT/passkeys/{id}
Rename a passkey
Update the friendly name of a registered passkey
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Passkey ID |
request | body | yes | dto.PasskeyRenameRequest | New name |
Body
| Field | Type | Description |
|---|---|---|
name required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
404 | Not Found | dto.ErrorResponse |
DELETE/passkeys/{id}
Delete a passkey
Remove a registered passkey
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Passkey ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
404 | Not Found | dto.ErrorResponse |
User
GET/profile
Get user profile
Retrieve authenticated user's profile information
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.UserResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
PUT/profile
Update user profile
Update authenticated user's profile information (name, first_name, last_name, profile_picture, locale)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
profile | body | yes | dto.UpdateProfileRequest | Profile Update Data |
Body
| Field | Type | Description |
|---|---|---|
first_name | string | |
last_name | string | |
locale | string | |
name | string | |
profile_picture | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.UserResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/profile
Delete user account
Delete authenticated user's account permanently. Password is required for password-based accounts; omit for social-only (OAuth) accounts.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
delete | body | yes | dto.DeleteAccountRequest | Account Deletion Data |
Body
| Field | Type | Description |
|---|---|---|
confirm_deletion required | boolean | |
password | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
PUT/profile/email
Update user email
Update authenticated user's email address (requires password verification and email re-verification)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
email | body | yes | dto.UpdateEmailRequest | Email Update Data |
Body
| Field | Type | Description |
|---|---|---|
email required | string | |
password required | string | #nosec G101,G117 -- This is a DTO field, not a hardcoded credential |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
409 | Conflict | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
PUT/profile/password
Update user password
Update authenticated user's password (requires current password verification)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
password | body | yes | dto.UpdatePasswordRequest | Password Update Data |
Body
| Field | Type | Description |
|---|---|---|
current_password required | string | |
new_password required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
POST/profile/set-password
Set initial password for social-only users
Set a password for a user who registered via social login and has no password yet. Returns 409 if a password is already set.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | dto.SetPasswordRequest | New password |
Body
| Field | Type | Description |
|---|---|---|
new_password required | string | #nosec G101,G117 -- DTO field |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
409 | Conflict | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
Sessions
GET/sessions
List active sessions
List all active sessions (devices/IPs) for the authenticated user
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.SessionListResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/sessions
Revoke all other sessions
Revoke all sessions except the current one
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
401 | Unauthorized | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
DELETE/sessions/{id}
Revoke a specific session
Revoke a specific session by its ID (logout a specific device)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string | Session ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | dto.MessageResponse |
400 | Bad Request | dto.ErrorResponse |
401 | Unauthorized | dto.ErrorResponse |
403 | Forbidden | dto.ErrorResponse |
500 | Internal Server Error | dto.ErrorResponse |
sso
POST/sso/exchange
Exchange SSO token for app-scoped tokens
Consume a single-use SSO token and receive access/refresh tokens for the target app.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
X-App-ID | header | yes | string | Target application ID |
request | body | yes | sso.exchangeRequest | SSO token |
Body
| Field | Type | Description |
|---|---|---|
sso_token required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | object |
403 | Forbidden | object |
404 | Not Found | object |
GET/sso/peers
Get SSO peer apps
Return peer apps in the same session group (no auth required).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
X-App-ID | header | yes | string | Requesting application ID |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
POST/sso/token
Issue SSO exchange token
Issue a 60-second single-use SSO token for cross-app login.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
request | body | yes | sso.issueTokenRequest | Target application ID |
Body
| Field | Type | Description |
|---|---|---|
target_app_id required | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | object |
400 | Bad Request | object |
403 | Forbidden | object |