Skip to main content

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 TypeDescription
USER_LOGINUser login attempt
USER_LOGOUTUser logout
USER_CREATEDNew user created
PAYMENT_EXECUTEDPayment processed
TRANSFER_COMPLETEDTransfer completed
SUBSCRIBER_REGISTEREDNew subscriber
SUBSCRIBER_BLOCKEDSubscriber blocked
CARD_LINKEDCard linked to subscriber
COMPLIANCE_ALERTCompliance alert triggered
API_KEY_CREATEDAPI key generated

Errors

StatusCodeDescription
400INVALID_REQUESTInvalid query parameters
401UNAUTHORIZEDNot authenticated
403FORBIDDENNot authorized to access logs