Skip to main content
GET
/
api
/
v1
/
tenants
/
{tenant_id}
/
audit
curl -X GET https://cp.gosentrix.io/api/v1/tenants/{tenant_id}/audit \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "results": [
    {
      "id": "audit-123",
      "event_type": "user.login",
      "actor": {
        "id": "user-456",
        "email": "[email protected]"
      },
      "timestamp": "2024-01-01T12:00:00Z",
      "metadata": {
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0..."
      }
    }
  ],
  "count": 1
}
Retrieve audit event logs for your tenant.
curl -X GET https://cp.gosentrix.io/api/v1/tenants/{tenant_id}/audit \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "results": [
    {
      "id": "audit-123",
      "event_type": "user.login",
      "actor": {
        "id": "user-456",
        "email": "[email protected]"
      },
      "timestamp": "2024-01-01T12:00:00Z",
      "metadata": {
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0..."
      }
    }
  ],
  "count": 1
}

Export Audit Logs

curl -X GET https://cp.gosentrix.io/api/v1/tenants/{tenant_id}/audit/export?format=csv \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Query Parameters

event_type
string
Filter by event type
start_date
string
Start date (ISO 8601)
end_date
string
End date (ISO 8601)
format
string
Export format (json, csv)

Notes

  • Audit logs are immutable
  • Retention period: 7 years (compliance requirement)
  • See Audit & Compliance for details