API Reference
RESTful API for managing users, groups, applications, and analytics
REST API
JSON
OAuth 2.0
Base URL
All API requests are made to this base URL
https://www.omobl.com/apiFor local development: http://localhost:3000/api
Authentication
Bearer Token Authentication
All API requests require authentication via Clerk session tokens. Include the token in the Authorization header:
Authorization: Bearer <clerk-session-token>Getting Your Token
Use the Clerk
getToken() method from the useAuth() hook to retrieve the current session token.Rate Limiting
API rate limits and throttling
Standard Rate Limit:
100 requests / minute
Analytics Endpoints:
30 requests / minute
Webhook Endpoints:
No limit
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1609459200API Endpoints
User Management
Endpoints for managing users and their roles
GET
/api/usersGET
/api/users/[id]POST
/api/usersPATCH
/api/users/[id]DELETE
/api/users/[id]Group Management
Endpoints for managing groups and hierarchies
GET
/api/groupsPOST
/api/groupsPOST
/api/groups/[id]/membersDELETE
/api/groups/[id]Application Management
Endpoints for OAuth/OIDC applications
GET
/api/applicationsPOST
/api/applicationsPATCH
/api/applications/[id]POST
/api/applications/[id]/secretSession Management
Endpoints for managing active sessions
GET
/api/sessionsGET
/api/sessions/[id]POST
/api/sessions/[id]/logoutAnalytics
Endpoints for usage metrics and statistics
GET
/api/analytics/overviewGET
/api/analytics/usersGET
/api/analytics/appsAudit Logs
Endpoints for accessing audit trail
GET
/api/audit-logsGET
/api/audit-logs/[id]Response Format
Standard Response Structure
All API responses follow a consistent JSON structure:
// Success Response
{
"success": true,
"data": { ... },
"meta": {
"page": 1,
"limit": 20,
"total": 100
}
}
// Error Response
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid session token"
}
}Error Codes
400Bad Request401Unauthorized403Forbidden404Not Found409Conflict429Rate Limited500Internal Error503Service UnavailableExplore API Endpoints
Detailed documentation for each API category