Audit Logs
GET
/audit/logsOpen in the API playground →
Info
Query system audit logs for compliance and monitoring. Only administrators can access audit logs.
Request
Authorizationstringheaderrequired
Bearer <token> - Admin JWT
Query Parameters
user_idstringquery
Filter by user ID
event_typestringquery
Filter by event type (e.g., PAYMENT_EXECUTED, USER_LOGIN)
fromstringquery
Start date (ISO 8601)
tostringquery
End date (ISO 8601)
limitintegerquery
Results limit (default: 50, max: 500)
offsetintegerquery
Pagination offset
Response
logsarray
Array of audit log entries
totalinteger
Total number of matching logs
Examples
Request
cURL
curl -X GET "https://demo.api.vultlocal.com/api/v1/audit/logs?event_type=PAYMENT_EXECUTED&limit=50" \
-H "Authorization: Bearer ADMIN_JWT"
Response
200 Success
{
"logs": [
{
"id": "log_123",
"event_type": "PAYMENT_EXECUTED",
"actor": "sub_abc123",
"actor_type": "subscriber",
"details": {
"amount": 5000,
"currency": "SLE",
"recipient": "sub_xyz789"
},
"ip_address": "192.168.1.1",
"timestamp": "2025-01-15T10:30:00Z"
},
{
"id": "log_124",
"event_type": "USER_LOGIN",
"actor": "admin@smartpay.sl",
"actor_type": "admin",
"details": {
"success": true,
"user_agent": "Mozilla/5.0..."
},
"ip_address": "10.0.0.1",
"timestamp": "2025-01-15T10:25:00Z"
}
],
"total": 1500
}
403 Forbidden
{
"success": false,
"error": "Not authorized to access audit logs",
"code": "FORBIDDEN"
}
Event Types
| Event Type | Description |
|---|---|
USER_LOGIN | User login attempt |
USER_LOGOUT | User logout |
USER_CREATED | New user created |
PAYMENT_EXECUTED | Payment processed |
TRANSFER_COMPLETED | Transfer completed |
SUBSCRIBER_REGISTERED | New subscriber |
SUBSCRIBER_BLOCKED | Subscriber blocked |
CARD_LINKED | Card linked to subscriber |
COMPLIANCE_ALERT | Compliance alert triggered |
API_KEY_CREATED | API key generated |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid query parameters |
| 401 | UNAUTHORIZED | Not authenticated |
| 403 | FORBIDDEN | Not authorized to access logs |