---
title: "List logs"
method: GET
path: "/servers/{guild_id}/logs"
tags: ["Logs"]
---

# List logs

`GET /servers/{guild_id}/logs`

## Request

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

Returns the server's logs, newest first. This is the same data the log viewer shows.

How far back you can read depends on the server's plan: the last hour on the free plan and Pro Lite, 30 days on Quark Pro. A request that reaches further back is cut to that window and `walled` is true.

## 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
- `limit` integer
- `cursor` string
- `bot` 'pro'

## Response `200`

A page of logs.

- LogPage
  - `entries` LogEntry[]
    - `id` string: The entry's ID.
    - `type` integer: The log type ID.
    - `timestamp` integer: When it happened, in milliseconds since the Unix epoch.
    - `executor` NamedId, nullable
      - `id` string
      - `name` string
    - `via` NamedId, nullable
      - `id` string
      - `name` string
    - `target` NamedId, nullable
      - `id` string
      - `name` string
    - `channel` NamedId, nullable
      - `id` string
      - `name` string
    - `role` string, nullable: The role name involved.
    - `name` string, nullable
    - `reason` string, nullable
    - `count` integer, nullable
    - `content` string, nullable: Message content. For an edit, the content before.
    - `contentAfter` string, nullable: For an edit, the content after.
    - `messages` object[]: The messages the log carries: one for a delete, two for an edit, many for a bulk delete. Attachments are listed by name and size only.
    - `messagesTruncated` integer, nullable
    - `emoji` object, nullable
    - `action` string, nullable
    - `value` string, nullable
    - `delivery` object: Whether the log reached Discord.
      - `status` 'delivered' | 'not_delivered' | 'unknown'
      - `reason` string, nullable
      - `channelId` string, nullable
      - `messageId` string, nullable
    - `heldBy` object, nullable: Set when an automation rule held the log back, so it was not posted to Discord.
      - `ruleId` string
      - `ruleName` string
    - `notices` string[]: The notices automation rules added to the log.
  - `total` integer: How many entries match the filters from this page onwards. On the first page it is the total number of matches.
  - `retentionMs` integer: How far back this server's plan lets you read, in milliseconds.
  - `walled` boolean: True if the request asked for more history than the plan allows.
  - `cursor` string, nullable: Pass this as `cursor` to get the next page. Null when there are no more.
  - `categoryCounts` object: Number of entries in each category that match the other filters. The `category` filter itself is not applied.

## Other responses

- `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 read. Try again later.
- `503`: The log store is unavailable.

## Changes

- **2026-10-05** `9b9591ac8b29`: 2 info
  - added the optional property `entries/items/heldBy` to the response with the `200` status
  - added the optional property `entries/items/notices` to the response with the `200` status
- **2026-10-05** `dac8d050ac15`: 1 info
  - added the optional property `entries/items/via` to the response with the `200` status
- **2026-10-05** `ef32257db0c5`: 3 warning
  - removed the optional property `entries/items/heldBy` from the response with the `200` status
  - removed the optional property `entries/items/notices` from the response with the `200` status
  - removed the optional property `entries/items/via` from the response with the `200` status
- **2026-10-05** `b252c7983e10`: 3 info
  - added the optional property `entries/items/heldBy` to the response with the `200` status
  - added the optional property `entries/items/notices` to the response with the `200` status
  - added the optional property `entries/items/via` to the response with the `200` status
- **2026-10-02** `16860ec3ac6f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quark-bot-discord/apis/quark-api/changes/servers/:guild_id/logs/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)
