Skip to main content
PromptGuard maintains detailed logs of all security events and interactions, accessible through the dashboard for security analysis and compliance reporting.
Advanced audit log API endpoints are planned for future releases. Currently, audit logs are available through the dashboard UI. The API endpoints described below are roadmap features.

Current Availability

Dashboard Access ✅

View audit logs and security events through the dashboard:
  1. Navigate to Interactions: app.promptguard.co → Projects → [Your Project] → Interactions
  2. Filter and Search: Use filters to find specific events by type, date, or content
  3. Export Data: Download interaction data for analysis

What Gets Logged

PromptGuard captures comprehensive audit trails for:

Security Events

  • Threat Detection: Security violations, blocked requests, policy triggers
  • PII Redaction: Automatic masking of sensitive data
  • Policy Decisions: Allow, block, or redact actions
  • Detection Methods: Regex, ML, or agentic evaluator used

API Activity

  • Request Details: All API calls with timestamps and metadata
  • Response Information: Status codes, processing times
  • Error Events: Failures, timeouts, and error conditions
  • Usage Tracking: Token consumption and costs

Log Structure

Standard Log Format

All security events follow a consistent structure:
{
  "id": "evt_abc123def456",
  "timestamp": "2024-01-15T10:30:15.123Z",
  "user_id": "user_123",
  "project_id": "proj_abc123",
  "api_key_id": "ak_xyz789",
  "decision": "block",
  "threat_type": "PROMPT_INJECTION",
  "detector": "ml_model",
  "confidence": 0.95,
  "content_preview": "Ignore all previous instructions...",
  "reason": "ML API detected injection (confidence: 0.95)",
  "metadata": {
    "model": "gpt-4o",
    "latency_ms": 42,
    "ip_address": "203.0.113.45"
  }
}

Event Categories

Security Events

{
  "decision": "block",
  "threat_type": "PROMPT_INJECTION",
  "detector": "ml_model",
  "confidence": 0.95,
  "reason": "ML API detected injection"
}

PII Redaction Events

{
  "decision": "redact",
  "threat_type": "PII_LEAK",
  "detector": "regex",
  "confidence": 1.0,
  "reason": "Credit card number detected and redacted"
}

Dashboard Access

Viewing Interactions

Access your security events through the dashboard:
  1. Navigate: app.promptguard.co → Projects → [Your Project] → Interactions
  2. Filter: Use the filters to find specific events:
    • Flagged Only: Show only blocked/redacted events
    • Search: Search in content or reason text
    • Date Range: Filter by last N days
  3. Details: Click on any event to see full details

Exporting Data

Currently, interaction data can be viewed and analyzed in the dashboard. Programmatic export APIs are planned for future releases.

Roadmap Features 🚧

The following advanced audit log features are planned but not yet available:

Audit Log API (Planned)

Programmatic access to audit logs via API:
# PLANNED - Not yet available
curl https://api.promptguard.co/api/v1/audit-logs \
  -H "X-API-Key: YOUR_PROMPTGUARD_API_KEY" \
  -G -d "limit=100" \
  -d "start_time=2024-01-15T00:00:00Z"

Streaming Logs (Planned)

Real-time log streaming:
# PLANNED - Not yet available
curl https://api.promptguard.co/api/v1/audit-logs/stream \
  -H "X-API-Key: YOUR_PROMPTGUARD_API_KEY" \
  -H "Accept: text/event-stream"

Log Analysis (Planned)

Advanced log analysis and pattern detection:
# PLANNED - Not yet available
curl https://api.promptguard.co/api/v1/audit-logs/analyze \
  -H "X-API-Key: YOUR_PROMPTGUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": {
      "event_type": "security.threat_detected",
      "time_range": "7d"
    },
    "analysis": ["threat_trends", "source_analysis"]
  }'

Export Integrations (Planned)

Integration with external logging systems:
  • Splunk Integration: Export logs to Splunk
  • Elasticsearch Integration: Stream logs to Elasticsearch
  • Azure Sentinel Integration: Send logs to Azure Sentinel
  • Custom Webhooks: Real-time log delivery via webhooks

Current Workarounds

Need Programmatic Access Now?

Option 1: Dashboard API Use the dashboard interactions endpoint (requires session authentication):
# Dashboard API - requires session cookie
curl https://api.promptguard.co/dashboard/interactions \
  -H "Cookie: session=YOUR_SESSION_COOKIE" \
  -G -d "days=7" \
  -d "page=1" \
  -d "page_size=50"
Option 2: Database Access For enterprise customers, direct database access can be arranged for advanced log analysis. Option 3: Contact Support Email [email protected] to discuss custom log export solutions.

Best Practices

Log Retention

  • Current: Logs are retained based on your plan tier
  • Free/Starter: 30 days retention
  • Growth: 90 days retention
  • Enterprise: Custom retention policies available

Compliance

  • All security events are logged for compliance
  • Logs include timestamps, user IDs, and decision metadata
  • Export capabilities coming soon for compliance reporting

Next Steps

Need advanced audit log features? Contact support to discuss enterprise solutions or early access to upcoming features.