> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holydocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit Logs

Track all administrative actions in your HolyDocs organization with detailed audit logs for compliance.

## Overview

HolyDocs audit logs record every administrative action performed in your organization. This provides a complete history for compliance, security reviews, and debugging.

## Requirements

Audit logs are available on **Business** and **Enterprise** plans.

## What is Logged

Every administrative action generates an audit log entry containing:

| Field | Description |
|---|---|
| `timestamp` | When the action occurred (millisecond precision) |
| `actor` | User who performed the action (email, user ID) |
| `action` | The type of action performed |
| `resource` | The resource affected (project, deployment, etc.) |
| `resourceId` | ID of the affected resource |
| `metadata` | Additional details specific to the action |
| `ip` | IP address of the actor |
| `userAgent` | Browser/client user agent string |

## Tracked Actions

### Project Actions

| Action | Description |
|---|---|
| `project.created` | New project created |
| `project.updated` | Project settings modified |
| `project.deleted` | Project deleted |
| `project.config_updated` | docs.json configuration changed |

### Deployment Actions

| Action | Description |
|---|---|
| `deployment.triggered` | Manual deployment triggered |
| `deployment.completed` | Deployment finished successfully |
| `deployment.failed` | Deployment failed |

### Domain Actions

| Action | Description |
|---|---|
| `domain.added` | Custom domain configured |
| `domain.removed` | Custom domain removed |
| `domain.verified` | Domain DNS verified |

### Access Actions

| Action | Description |
|---|---|
| `auth.config_updated` | Authentication settings changed |
| `rbac.group_created` | Content access group created |
| `rbac.group_updated` | Content access group modified |
| `rbac.group_deleted` | Content access group deleted |

### Integration Actions

| Action | Description |
|---|---|
| `git.connected` | Repository connected |
| `git.disconnected` | Repository disconnected |
| `webhook.created` | Outbound webhook created |
| `webhook.deleted` | Outbound webhook deleted |
| `slack.connected` | Slack workspace connected |
| `discord.connected` | Discord server connected |

### Agent Actions

| Action | Description |
|---|---|
| `agent.job_created` | Agent job submitted |
| `agent.suggestion_approved` | Agent suggestion approved |
| `agent.suggestion_rejected` | Agent suggestion rejected |

## Viewing Audit Logs

### Dashboard

Navigate to **Settings > Audit Logs** in the dashboard. You can:

- Filter by action type, actor, or date range
- Search log entries by resource ID
- Export logs as CSV for external analysis

### API

```bash
curl "https://api.holydocs.com/api/v1/audit?limit=50&action=project.updated" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Retention

| Plan | Log Retention |
|---|---|
| Business | 90 days |
| Enterprise | 1 year (configurable) |

For enterprise customers requiring longer retention or external SIEM integration, logs can be streamed to your logging infrastructure via outbound webhooks.

## Compliance

Audit logs support compliance requirements for:

- **SOC 2** — Demonstrates access control and change tracking
- **GDPR** — Records who accessed what data and when
- **HIPAA** — Tracks administrative actions on protected content
- **ISO 27001** — Provides evidence of information security controls