---
title: "Export filtered activity logs as CSV (opens in Excel)"
method: GET
path: "/api/admin/activity-logs/export.csv"
tags: ["Admin - Activity Log"]
---

# Export filtered activity logs as CSV (opens in Excel)

`GET /api/admin/activity-logs/export.csv`

## Request

- Base URL: `https://api.rewritelifestyle.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rewritelifestyle.ai/api/admin/activity-logs/export.csv`
- Auth: HTTP bearer

Same filter surface as GET /. Streams matching rows to the client as CSV; capped at 50000 rows by default — narrow filters if you hit that. Common details.* keys (error, device) are broken out into columns; any other details keys land in a catch-all JSON column.

## Query parameters

- `userId` number
- `activityType` string
- `targetType` string
- `targetId` string
- `actorRole` string
- `success` string
- `from` string
- `to` string
- `cap` number

## Response `200`

text/csv; UTF-8, RFC 4180

---

[API](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api.md) - [All operations](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/revisions/28695827f27a?raw)
