---
title: "Export Audit Log"
method: GET
path: "/api/v2/audit-log/export"
tags: ["Audit Log"]
---

# Export Audit Log

`GET /api/v2/audit-log/export`

## Request

- Base URL: `https://public-api.linearb.io`
- URL: `https://public-api.linearb.io/api/v2/audit-log/export`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linearb/apis/linearb-api/docs/api/v2/audit-log/export/get.ts> (a function with typed inputs; its response is checked against the schema)

Audit Log API endpoint exports the organization audit log as a downloadable CSV or JSON file. Returns a presigned S3 URL, valid for 1 hour, that downloads the file directly.

## Query parameters

- `from` string, date, required: Start of the exported range (YYYY-MM-DD)
- `to` string, date, required: End of the exported range (YYYY-MM-DD)
- `format` 'csv' | 'json': File format of the export
- `team_id` integer: Optional team filter. When omitted, the whole organization is exported

## Response `200`

Successful Response

- AuditLogExportResponse
  - `url` string, required: Presigned S3 URL to download the exported file, valid for 1 hour

## Other responses

- `400`: Bad Request - invalid date range
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Validation Error
- `500`: Internal Server Error
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/linearb/apis/linearb-api.md) - [All operations](https://skmtc.dev/linearb/apis/linearb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linearb/apis/linearb-api/revisions/3aea06710db6?raw)
