Overview

Klyra’s Audit Logs provide a complete, immutable record of all moderation activities in your account. These logs help you track moderation decisions, investigate incidents, and maintain compliance with regulatory requirements.
Audit Logs are available on all paid plans. The retention period varies by plan: Startup (30 days), Business (90 days), Enterprise (1+ year).

Accessing Audit Logs

Via Dashboard

You can access Audit Logs directly in the Klyra Dashboard:
  1. Log in to the Klyra Dashboard
  2. Navigate to Project Settings > Audit Logs
  3. Use the filters to narrow down the logs by date, event type, user, etc.
  4. Click on any log entry to view its details

Via API

You can also access Audit Logs programmatically through our API:
curl -X GET "https://api.klyra.io/v1/audit-logs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "start_time": "2023-06-01T00:00:00Z",
    "end_time": "2023-06-30T23:59:59Z",
    "event_types": ["moderation.created", "moderation.updated"],
    "limit": 100
  }'

Log Types

Klyra logs the following types of events:

Moderation Events

EventDescription
moderation.createdA new moderation request was submitted
moderation.completedA moderation request completed processing
moderation.flaggedContent was flagged as potentially violating
moderation.appealedA moderation decision was appealed
moderation.overriddenA moderation decision was manually overridden

Administrative Events

EventDescription
api_key.createdA new API key was created
api_key.revokedAn API key was revoked
webhook.createdA new webhook endpoint was configured
webhook.updatedA webhook endpoint was updated
webhook.deletedA webhook endpoint was deleted
user.invitedA new user was invited to the organization
user.addedA new user joined the organization
user.removedA user was removed from the organization
role.assignedA user was assigned a role
settings.updatedAccount or project settings were updated

Log Data Structure

Each audit log entry contains the following fields:
{
  "id": "log_1a2b3c4d5e6f",
  "timestamp": "2023-06-15T14:30:45Z",
  "event_type": "moderation.created",
  "actor": {
    "type": "api_key",
    "id": "key_9z8y7x6w5v4u",
    "name": "Production API Key"
  },
  "resource": {
    "type": "moderation",
    "id": "mod_5t4r3q2p1o0n",
    "name": null
  },
  "action": "create",
  "status": "success",
  "metadata": {
    "client_ip": "198.51.100.123",
    "user_agent": "klyra-sdk/1.0.0 node/16.15.0",
    "content_type": "text",
    "content_hash": "a1b2c3d4e5f6",
    "categories": ["toxic", "harassment"]
  }
}
  • id: Unique identifier for the audit log entry
  • timestamp: When the event occurred (in ISO 8601 format)
  • event_type: The type of event (from the tables above)
  • actor: Who or what performed the action
  • resource: The object that was acted upon
  • action: The action that was performed (create, read, update, delete)
  • status: Whether the action succeeded or failed
  • metadata: Additional context about the event

Filtering Logs

You can filter logs by various criteria in both the Dashboard and API:
  • Time range: Filter logs by start and end time
  • Event types: Filter by specific event types
  • Actors: Filter by specific users or API keys
  • Resources: Filter by specific resources (e.g., moderation IDs)
  • Status: Filter by success or failure status
  • Client IP: Filter by the IP address that initiated the request

Log Exports

You can export audit logs for offline analysis or long-term storage:

Dashboard Export

  1. Apply filters to narrow down the logs you want to export
  2. Click the Export button
  3. Choose your preferred format (CSV or JSON)
  4. Click Export to download the file

API Export

curl -X POST "https://api.klyra.io/v1/audit-logs/export" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "start_time": "2023-06-01T00:00:00Z",
    "end_time": "2023-06-30T23:59:59Z",
    "event_types": ["moderation.created", "moderation.completed"],
    "format": "json"
  }'

Log Retention

Log retention periods vary by plan:
PlanRetention PeriodExport Capabilities
Startup30 daysCSV, JSON (last 30 days)
Business90 daysCSV, JSON (last 90 days)
Enterprise1+ yearCSV, JSON, SIEM integration

SIEM Integration

Enterprise customers can integrate Klyra Audit Logs directly with their Security Information and Event Management (SIEM) systems:

Supported Integrations

  • Splunk: Direct integration via HTTP Event Collector
  • Datadog: Log forwarding via Datadog’s API
  • Sumo Logic: Real-time log streaming
  • AWS CloudWatch: Log export to CloudWatch
  • Azure Monitor: Log export to Azure Monitor
  • Google Cloud Logging: Log export to Google Cloud Logging
Contact enterprise@klyra.io to set up SIEM integration for your organization.

Compliance

Klyra Audit Logs are designed to help you meet compliance requirements:
  • Immutable records: Logs cannot be altered or deleted
  • Tamper-evident: Cryptographically signed to detect tampering
  • Comprehensive: All user and system actions are logged
  • Detailed metadata: Each log includes relevant context
  • Access controls: Logs can only be viewed by authorized users
Our audit log system helps you comply with regulations such as SOC 2, GDPR, HIPAA, and CCPA.