Authentication Methods
ActumX supports two authentication methods depending on the use case:- Session-based authentication - For dashboard UI requests
- API key authentication - For programmatic API access
Session-Based Authentication
The dashboard uses better-auth for session management with email and password authentication.Session Details
- Sessions are managed via secure HTTP-only cookies
- Session TTL: 30 days
- Base path:
/auth/api - Cross-subdomain cookies enabled in production (
.actumx.app)
Login
Login is handled through the better-auth endpoints at/auth/api. Sessions are automatically maintained via cookies.
API Key Authentication
API keys are used for programmatic access to the ActumX API. They can be created through the dashboard.Using API Keys
API keys can be passed in two ways:Option 1: Using the x-api-key header (Recommended)
Option 2: Using the Authorization header with Bearer token
API Key Format
API keys follow this format:Security Best Practices
- Store API keys in environment variables
- Use separate API keys for different applications
- Rotate keys regularly
- Revoke unused keys immediately
- The full API key is only shown once at creation
x402 Payment Headers
For endpoints that require payment (HTTP 402), you’ll need to include additional headers after settlement:x-payment-id- The payment ID from the 402 responsex-payment-proof- The receipt ID returned from the settlement endpoint
Example with Payment Headers
Protected Endpoints
Most endpoints require authentication. Unauthenticated requests will receive a 401 status:Next Steps
Create API Keys
Learn how to create and manage API keys
API Keys Endpoint
API reference for managing keys programmatically