---
title: "Apply a fix"
method: POST
path: "/servers/{guild_id}/troubleshoot/fix"
tags: ["Troubleshooting"]
---

# Apply a fix

`POST /servers/{guild_id}/troubleshoot/fix`

## Request

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

Applies one of the automatic fixes from a troubleshooting report. Send the finding's `fix` object as the request body.

## Path parameters

- `guild_id` string, required

## Query parameters

- `bot` 'pro'

## Request body

- Fix: An automatic fix. Take it from the `fix` field of a finding in the troubleshooting report.
  - `kind` 'initialise_guild' | 'register_webhook' | 'clear_log_channel' | 'enable_log_type' | 'remove_ignore' | 'disable_bot_ignore', required
  - `automatic` boolean: True if this endpoint can apply the fix. A fix with `automatic: false` has to be done by hand and is rejected.
  - `category` 'mainChannel' | 'modlogCategory' | 'membersCategory' | 'actionsCategory' | 'textCategory' | 'voiceCategory' | 'filesCategory' | 'serverCategory' | 'rolesCategory' | 'channelsCategory' | 'quarkCategory': For `register_webhook` and `clear_log_channel`.
  - `channelId` string: For `register_webhook`.
  - `logType` integer: For `enable_log_type`.
  - `ignoreType` integer: For `remove_ignore`.
  - `value` string: For `remove_ignore`.
  - `scope` 'executors' | 'targets': For `disable_bot_ignore`.

## Response `200`

The fix was applied.

- object
  - `applied` boolean

## Other responses

- `202`: The fix was started and will finish shortly. Returned for `initialise_guild`.
- `400`: The fix cannot be applied automatically. For webhook fixes, another 4xx or 5xx code with an `error` field is returned if the channel could not be set.
- `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.
- `404`: Nothing to fix.
- `429`: Too many requests. Wait for the number of seconds in `Retry-After`.

## Changes

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

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