Authentication
All API requests must include an Authorization header with your API key. Generate keys in Settings → API Keys.
Authorization: Bearer lx_live_your_api_key_here
https://api.ludex.cc/v2
Events API
Push event data to Ludex in real-time. Events are available for querying within milliseconds.
POST
/events
Track a single event
{
"event": "order_completed",
"timestamp": "2025-05-14T10:32:00Z",
"user_id": "usr_abc123",
"properties": {
"order_id": "ord_xyz789",
"revenue": 149.99,
"currency": "USD",
"plan": "professional"
}
}
POST
/events/batch
Send up to 1,000 events at once
Query API
Run SQL queries against your data and retrieve results programmatically.
POST
/query
Run a query
{
"sql": "SELECT date_trunc('day', timestamp) as day, COUNT(*) as orders, SUM(revenue) as revenue FROM events WHERE event = 'order_completed' AND timestamp > NOW() - INTERVAL '30 days' GROUP BY 1 ORDER BY 1",
"timeout": 30
}
{
"data": [
{ "day": "2025-05-01", "orders": 142, "revenue": 21480.58 },
{ "day": "2025-05-02", "orders": 158, "revenue": 23891.20 }
],
"execution_time_ms": 47,
"rows_returned": 30
}
Dashboards
List, retrieve, and manage dashboards programmatically.
GET/dashboardsList all dashboards
GET/dashboards/{id}Get a dashboard
POST/dashboards/{id}/exportExport to PDF/PNG
POST/dashboards/{id}/shareGenerate share link
Users & Teams
GET/usersList users
POST/usersInvite a user
PUT/users/{id}Update user role
DELETE/users/{id}Remove user
Webhooks
Receive real-time notifications when alerts fire, syncs complete, or other events occur.
{
"event": "alert.fired",
"timestamp": "2025-05-14T10:32:00Z",
"alert": {
"id": "alt_abc123",
"name": "Revenue drop alert",
"condition": "daily_revenue < 10000",
"current_value": 8432
}
}
Rate Limits
| Plan | Events API | Query API | Management API |
| Starter | 100 req/min | 30 req/min | 60 req/min |
| Professional | 1,000 req/min | 100 req/min | 300 req/min |
| Enterprise | Custom | Custom | Custom |
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.