Skip to main content
The Quark API lets your own bot or script do what the dashboard does: change where logs go, manage ignore options and tags, read and export logs, and run the troubleshooter.

Base URL

Every endpoint is under /servers/{guild_id}, where guild_id is your server’s ID.

Authentication

Send your token in the Authorization header of every request:

Get a token

Create a token on the dashboard: open your server and go to Settings → API Access Tokens. Tokens are created on the dashboard by people who manage the server in Discord.
  • A token works for one server, the one it was created for.
  • The token is shown once, when you create it. Quark does not store it, so copy it then.
  • Tokens expire after 90 days.
  • A server can have up to 5 tokens.
  • Every endpoint in this reference needs an Admin token, apart from the two Active Ignore endpoints. Those also take a Basic token, which cannot ask for moderation logs or Quark Events logs to be left out.
  • Creating or revoking a token produces a log in the server’s Quark Events category.
Never share a token with anyone, including Quark staff. An Admin token can read your logs and configuration, change every setting, manage tokens and dashboard access, and reset the server.
To revoke a token, use Settings on the dashboard or the Tokens endpoints. A revoked token stops working immediately. Requests with an expired or revoked token fail. Create a new token on the dashboard.

The Quark Pro bot

The main Quark bot and the Quark Pro bot have separate configurations. Requests act on the main bot unless you add ?bot=pro to the address.

Rate limits

Requests are counted in 10-second windows, across every endpoint. The current limit is 500 requests per window.
The limit can change without notice. Read it from the response headers and do not hard-code it.
Limits are counted per token. Every response includes:
X-RateLimit-Limit is how many requests you can make in a window. X-RateLimit-Remaining is how many you have left in the current one. When you go over, the response is 429 with a Retry-After header giving the number of seconds to wait.

Responses

  • Bodies are JSON, apart from the CSV export.
  • The endpoints under /config/... that read one part of the configuration return an array of rows, even when there is only one, and 404 when nothing is stored yet. GET /config returns one object holding all of them, with null for a part that has nothing stored.
  • Endpoints that change settings, log channels and ignore options return 202 with an empty object. The change is applied a moment later. Each endpoint’s page lists its own status codes.
  • IDs are strings. On/off values in stored rows are 0 or 1.
Most error bodies are an empty object. Some include an error field with a short explanation.

Reference values

Log types

Log types are identified by a number from 0 to 101. See the log types table.

Categories

categoryMembers, categoryText, categoryVoice, categoryServer, categoryRoles, categoryChannels, categoryQuark, categoryActions, categoryModlog.

Ignore lists

Languages

locale is written as a key and read back as a number.

Getting moderation from your bot attributed correctly

If your bot bans, kicks or times members out, you do not need the API to make Quark’s modlogs show the right moderator. Start the audit log reason with the moderator’s user ID in square brackets. See bot integrations.

Endpoints

The endpoints are listed in the sidebar, grouped by what they do.