---
title: "Export logs as CSV"
method: GET
path: "/servers/{guild_id}/logs/export"
tags: ["Logs"]
---

# Export logs as CSV

`GET /servers/{guild_id}/logs/export`

## Request

- Base URL: `https://quark.bot/api`
- URL: `https://quark.bot/api/servers/{guild_id}/logs/export`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/quark-bot-discord/apis/quark-api/docs/servers/:guild_id/logs/export/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the logs matching the filters as a CSV file, newest first, up to 50,000 rows, within the history window the server's plan allows.

Columns: `timestamp`, `log_id`, `log_type`, `log_name`, `summary`, `executor_id`, `executor_name`, `target_id`, `target_name`, `channel_id`, `channel_name`, `role`, `name`, `reason`, `count`, `content`, `content_after`, `delivered`, `delivery_reason`.

## Path parameters

- `guild_id` string, required

## Query parameters

- `search` string
- `after` integer
- `before` integer
- `category` string[]
- `type` integer[]
- `channel` string
- `member` string
- `memberRole` 'executor' | 'target' | 'either'
- `role` string
- `locale` 'en' | 'de' | 'ja'
- `bot` 'pro'

## Response `200`

The CSV file.

## Other responses

- `204`: Nothing matched the filters.
- `401`: No token was sent, or the token is not valid: malformed, expired or revoked. A token sent with a scheme other than `Bearer` is refused too.
- `403`: The token belongs to a different server, or is not an Admin token.
- `429`: Too many requests. Wait for the number of seconds in `Retry-After`.
- `500`: The logs could not be exported. Try again later.
- `503`: The log store is unavailable.

## Changes

- **2026-10-02** `16860ec3ac6f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quark-bot-discord/apis/quark-api/changes/servers/:guild_id/logs/export/get.md)

---

[API](https://skmtc.dev/quark-bot-discord/apis/quark-api.md) - [All operations](https://skmtc.dev/quark-bot-discord/apis/quark-api/llms.txt) - [OpenAPI document](https://skmtc.dev/quark-bot-discord/apis/quark-api/revisions/53696c705ecb?raw)
