IndigiArmorIndigiArmorDocs

Audit Logs

Every scan is recorded in the audit log with its tier, action, signals, and metadata. Use audit logs for compliance reporting, debugging, and monitoring. Full prompts are never stored by default. Audit logs include a truncated preview (first 120 characters) and scan metadata.

Plan requirement: Audit log retention varies by plan — Trial retains 7 days, Pro and Starter retain 30 days, Education and Professional retain 365 days, and Enterprise retains indefinitely. Personal plans do not include audit log access.

GET
/v1/audit

Query audit logs with pagination and filtering.

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoMax results to return (default: 50, max: 100)
offsetnumberNoNumber of results to skip (default: 0)
tier"green" | "yellow" | "red"NoFilter by risk tier
fromstringNoStart date filter (ISO 8601 datetime)
tostringNoEnd date filter (ISO 8601 datetime)

Response

200 OK
{
  "logs": [
    {
      "id": "uuid",
      "tier": "red",
      "action": "block",
      "risk_score": 85,
      "signals": [
        { "domain": "pii", "type": "ssn", "confidence": 0.98, "weight": 50 }
      ],
      "active_domains": ["pii", "education", "cultural", "reidentification", "injection"],
      "latency_ms": 8,
      "api_key_id": "uuid",
      "requesting_ip": "203.0.113.42",
      "prompt_preview": "Tell me about the traditional healing practices used by...",
      "created_at": "2026-01-20T14:30:00Z"
    }
  ],
  "total": 342,
  "limit": 50,
  "offset": 0
}

Response Fields

ParameterTypeRequiredDescription
logsAuditEntry[]YesArray of audit log entries
totalnumberYesTotal matching entries (for pagination)
limitnumberYesApplied limit
offsetnumberYesApplied offset

Audit Entry Fields

ParameterTypeRequiredDescription
idstringYesUnique audit log entry ID
tier"green" | "yellow" | "red"YesRisk classification tier
action"allow" | "warn" | "block"YesAction taken on the scan
risk_scorenumberYesNumerical risk score (0-100)
signalsSignal[]YesArray of detected signals with domain, type, confidence, and weight
prompt_previewstring | nullNoTruncated prompt preview (first 120 characters). Null if not available.
active_domainsstring[]YesDetection domains that were active during the scan
latency_msnumberYesScan processing time in milliseconds
created_atstringYesISO 8601 timestamp of the scan
GET
/v1/audit/:id

Get a single audit log entry by ID.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe audit log entry ID

Single Entry Response

200 OK
{
  "log": {
    "id": "uuid",
    "tier": "yellow",
    "action": "flag",
    "risk_score": 45,
    "signals": [
      { "domain": "cultural", "type": "ceremony_reference", "confidence": 0.85, "weight": 40 }
    ],
    "active_domains": ["pii", "education", "cultural", "reidentification", "injection"],
    "latency_ms": 6,
    "api_key_id": "uuid",
    "requesting_ip": "198.51.100.7",
    "created_at": "2026-01-19T09:15:00Z"
  }
}

Pagination

Use offset and limit to page through results. The total field tells you how many entries match your filters.

Example: Page 2
GET /v1/audit?limit=50&offset=50
// Returns entries 51-100, with total count for navigation

Examples

SDK
// Get recent red-tier events
const { logs, total } = await armor.listAuditLogs({
  tier: 'red',
  limit: 10,
});

console.log(`${total} red-tier events total`);

// Get a single audit entry
const entry = await armor.getAuditLog(logs[0].id);
console.log(entry.signals);
cURL
# Get red-tier logs from the last week
curl "https://indigiarmor.com/v1/audit?tier=red&from=2026-02-18T00:00:00Z&limit=20" \
  -H "Authorization: Bearer ia_sk_..."