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

# Export Audit Log (CSV)

> Download the audit log as a streamed CSV file.

Streams matching audit entries as a CSV attachment. Without `orgId`, the export is scoped to your own entries.

## Authentication

Requires an API key with `billing` scope. Org-scoped exports additionally require the **View audit log** permission for that organization.

## Query Parameters

<ParamField query="orgId" type="string">
  Export entries for this organization instead of your personal entries.
</ParamField>

<ParamField query="action" type="string">
  Filter to a single action (e.g., `completion.created`).
</ParamField>

<ParamField query="from" type="string">
  ISO timestamp lower bound (inclusive).
</ParamField>

<ParamField query="to" type="string">
  ISO timestamp upper bound (inclusive).
</ParamField>

## Response

`Content-Type: text/csv` attachment. Columns:

```
timestamp,action,entity_type,entity_id,model_id,ip_address,user_agent,route,input_summary,output_summary
```

## Example

```bash curl theme={null}
curl -L "https://www.hitheo.ai/api/v1/audit/export?from=2026-05-01&to=2026-06-01" \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -o theo-audit-log.csv
```
