{
  "openapi": "3.0.3",
  "info": {
    "title": "GiselleBot Edge Service - api-gateway",
    "description": "Public API gateway for cycloptux's bots: Discord OAuth2 + JWT authority, bot reverse proxy, service API.",
    "version": "5.0.0"
  },
  "components": {
    "schemas": {
      "def-0": {
        "type": "object",
        "description": "Legacy problem+json error envelope returned by every gateway route on failure.",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "HTTP reason name (e.g. \"NOT_FOUND\")."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable error message."
                }
              },
              "additionalProperties": true
            }
          }
        },
        "required": [
          "errors"
        ],
        "title": "ProblemJsonError"
      }
    }
  },
  "paths": {
    "/api/v1/bots": {
      "get": {
        "operationId": "getBotsForUser",
        "summary": "List bots available to the authenticated user",
        "tags": [
          "Bots"
        ],
        "description": "Returns the linked bots whose servers intersect the user's Discord guilds.",
        "responses": {
          "200": {
            "description": "Bots available to the user",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bots available to the user",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error or Discord API failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services/shorturl/create": {
      "post": {
        "operationId": "createShortUrl",
        "summary": "Create a short URL",
        "tags": [
          "Services"
        ],
        "description": "Shortens a URL (optionally with a vanity ID) via the URL shortener microservice. Requires a valid service API key - this is not self-serve, contact contact@discomm.cc to obtain one.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The URL to shorten"
                  },
                  "vanity": {
                    "type": "string",
                    "description": "Optional vanity short ID"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The shortened URL",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The shortened URL",
                  "type": "object",
                  "properties": {
                    "short_url": {
                      "type": "string",
                      "description": "The short URL"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "URL missing or not a string",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "API key was not supplied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "API key not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "415": {
            "description": "Short URL creation failed or URL scheme unsupported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services/nsfwjs/predict": {
      "post": {
        "operationId": "nsfwjsPredict",
        "summary": "Run NSFW prediction on an image URL",
        "tags": [
          "Services"
        ],
        "description": "Classifies the image at the given URL via the NSFWJS microservice. Requires a valid service API key - this is not self-serve, contact contact@discomm.cc to obtain one.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Image URL to classify"
                  },
                  "nsfw_threshold": {
                    "type": "number",
                    "description": "Optional custom NSFW threshold (0-1]"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Prediction object (passthrough from the NSFWJS microservice)",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Prediction object (passthrough from the NSFWJS microservice)",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "URL missing or not a string",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "API key was not supplied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "API key not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "415": {
            "description": "URL is not an image or scheme unsupported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services/nsfwjs/cache": {
      "post": {
        "operationId": "nsfwjsCache",
        "summary": "Fetch a cached NSFW prediction",
        "tags": [
          "Services"
        ],
        "description": "Fetches a previously cached NSFW prediction by its 24-hex cache ID via the NSFWJS microservice. Only usable for a cache_id your own service was already handed by a prior /nsfwjs/predict or /nsfwjs/cache response - a cache_id you were never given returns the same 404 as one that does not exist. Requires a valid service API key - this is not self-serve, contact contact@discomm.cc to obtain one.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cache_id": {
                    "type": "string",
                    "description": "24-hex MongoDB ObjectId of the cached prediction"
                  },
                  "nsfw_threshold": {
                    "type": "number",
                    "description": "Optional custom NSFW threshold (0-1]"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Prediction object (passthrough from the NSFWJS microservice)",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Prediction object (passthrough from the NSFWJS microservice)",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Cache ID missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "API key was not supplied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "API key not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "No cached image found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/email-verification/confirm": {
      "post": {
        "operationId": "emailVerificationConfirm",
        "summary": "Confirm a notification address with the emailed one-time link",
        "tags": [
          "Profile"
        ],
        "description": "Public (no login): works from any device. Confirms the pending address the token belongs to and returns it masked. Single-use, expires after 30 minutes, replaced by any newer request. Every failure returns the same 400 so the endpoint cannot be used to probe tokens.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 200
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirmed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Confirmed.",
                  "type": "object",
                  "properties": {
                    "verified": {
                      "type": "boolean"
                    },
                    "email": {
                      "type": "string",
                      "description": "The confirmed address, masked (j***@example.com)."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid, used, superseded or expired link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts from this address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stats": {
      "get": {
        "operationId": "getPublicBotStats",
        "summary": "Get aggregate, public bot stats",
        "tags": [
          "Bots"
        ],
        "description": "Aggregate, non-identifying fleet stats (uptime, server count, user count, commands run, 30-day uptime percentage) for public display - e.g. the dashboard homepage, rendered pre-login. Unauthenticated: no JWT required. Served from a periodically refreshed cache (see stats-cache.ts), not fetched live - always responds even while the upstream bot or Uptime Kuma is unreachable. Never returns per-server or per-user data.",
        "responses": {
          "200": {
            "description": "Aggregate fleet stats, from the last successful cache refresh.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Aggregate fleet stats, from the last successful cache refresh.",
                  "type": "object",
                  "properties": {
                    "uptime_seconds": {
                      "type": "number"
                    },
                    "server_count": {
                      "type": "number"
                    },
                    "user_count": {
                      "type": "number"
                    },
                    "commands_run": {
                      "type": "number"
                    },
                    "uptime_percentage": {
                      "type": [
                        "null",
                        "number"
                      ],
                      "description": "30-day uptime percentage from Uptime Kuma; null if not yet available or not configured."
                    }
                  },
                  "required": [
                    "uptime_seconds",
                    "server_count",
                    "user_count",
                    "commands_run",
                    "uptime_percentage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/user": {
      "get": {
        "operationId": "getDiscordUser",
        "summary": "Get the authenticated Discord user",
        "tags": [
          "Discord API"
        ],
        "description": "Returns the JWT-authenticated user's Discord profile, fetched from Discord with the user's stored OAuth token.",
        "responses": {
          "200": {
            "description": "Discord user profile subset",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Discord user profile subset",
                  "type": "object",
                  "properties": {
                    "username": {
                      "type": "string",
                      "description": "Discord username"
                    },
                    "discriminator": {
                      "type": "string",
                      "description": "Discord discriminator"
                    },
                    "id": {
                      "type": "string",
                      "description": "Discord user ID"
                    },
                    "avatar": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "description": "Avatar hash"
                    },
                    "locale": {
                      "type": "string",
                      "description": "User locale"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Invalid or unauthorized token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error or Discord API failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/user/manageable-guilds": {
      "get": {
        "operationId": "getManageableGuilds",
        "summary": "List every Discord guild the caller can manage, independent of bot membership",
        "tags": [
          "Discord API"
        ],
        "description": "Returns the JWT-authenticated user's own Discord OAuth guild list, filtered to guilds where they have Manage Server or Administrator, regardless of whether any bot has joined that guild yet. Lets a dashboard offer an Invite CTA for manageable-but-not-yet-joined servers (todo card 6aa97ecda86cc0a4b5baaf3e). Each guild also carries botPresent - whether the selected bot (botBrand, default GiselleBot) is actually in it - so a picker can grey out guilds the bot has not joined, matching the /subscriptions/link-guild and /subscriptions/gifts/redeem precondition (R7). botPresent is OPTIONAL and is omitted from every guild when the bot's own guild list cannot be obtained (bot down): absent means unknown, never false.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "GiselleBot",
                "Belfast-chan"
              ],
              "default": "GiselleBot"
            },
            "in": "query",
            "name": "botBrand",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Guilds the caller can manage.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Guilds the caller can manage.",
                  "type": "object",
                  "properties": {
                    "guilds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "icon": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "botPresent": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "icon"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "guilds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Invalid or unauthorized token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error or Discord API failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/auth/discord/login": {
      "get": {
        "operationId": "initializeDiscordLogin",
        "summary": "Start the Discord OAuth2 login flow",
        "tags": [
          "Auth"
        ],
        "description": "Stores a state token for the caller (identified by the computed x-uuid) and redirects (307) to the Discord authorize URL. The redirect_uri query parameter must be an authorized callback.",
        "parameters": [
          {
            "schema": "object",
            "in": "query",
            "name": "type"
          },
          {
            "schema": true,
            "in": "query",
            "name": "additionalProperties"
          }
        ],
        "responses": {
          "403": {
            "description": "Invalid UUID, missing or unauthorized callback URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "State storage error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/auth/discord/callback": {
      "get": {
        "operationId": "handleDiscordCallback",
        "summary": "Discord OAuth2 callback",
        "tags": [
          "Auth"
        ],
        "description": "Exchanges the Discord authorization code, mints a gateway JWT, stores it under a temporary code and redirects to the original callback URL with that code.",
        "parameters": [
          {
            "schema": "object",
            "in": "query",
            "name": "type"
          },
          {
            "schema": true,
            "in": "query",
            "name": "additionalProperties"
          }
        ],
        "responses": {
          "403": {
            "description": "Missing code/state or Discord-side error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "408": {
            "description": "State token expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/auth/discord/token/revoke": {
      "post": {
        "operationId": "revokeJwtToken",
        "summary": "Revoke a gateway JWT",
        "tags": [
          "Auth"
        ],
        "description": "Revokes the presented JWT (jti added to the revocation list), deletes its refresh token, and revokes the underlying Discord OAuth tokens.",
        "responses": {
          "200": {
            "description": "Revocation outcome",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Revocation outcome",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Token missing or already revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Token invalid or unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Refresh token data not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Revocation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/auth/discord/token/refresh": {
      "post": {
        "operationId": "refreshJwtToken",
        "summary": "Refresh a gateway JWT",
        "tags": [
          "Auth"
        ],
        "description": "Exchanges a valid refresh token (x-refresh-token header) for a new JWT + refresh token pair, revoking the previous JWT and refreshing the underlying Discord token.",
        "responses": {
          "200": {
            "description": "Newly issued gateway JWT bundle",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Newly issued gateway JWT bundle",
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "description": "Gateway JWT"
                    },
                    "token_type": {
                      "type": "string",
                      "description": "Always \"Bearer\""
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Seconds until the JWT expires"
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "Opaque refresh token"
                    },
                    "scope": {
                      "type": "string",
                      "description": "Space-separated scopes"
                    },
                    "issued_at": {
                      "type": "string",
                      "description": "ISO-8601 issue timestamp"
                    },
                    "expiration_date": {
                      "type": "string",
                      "description": "ISO-8601 expiration timestamp"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable status message"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Refresh token missing or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Refresh token data not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Refresh error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/auth/discord/token/check": {
      "post": {
        "operationId": "checkJwtToken",
        "summary": "Check a gateway JWT",
        "tags": [
          "Auth"
        ],
        "description": "Validates the presented JWT (signature, allowlist, revocation) and returns its validity and expiration metadata.",
        "responses": {
          "200": {
            "description": "Token validity info",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Token validity info",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Token missing or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Token invalid or unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/auth/discord/token": {
      "post": {
        "operationId": "obtainUserToken",
        "summary": "Exchange a temporary code for a JWT",
        "tags": [
          "Auth"
        ],
        "description": "Swaps the temporary code produced by the OAuth callback (plus the matching x-uuid) for the stored JWT bundle.",
        "responses": {
          "200": {
            "description": "Newly issued gateway JWT bundle",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Newly issued gateway JWT bundle",
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "description": "Gateway JWT"
                    },
                    "token_type": {
                      "type": "string",
                      "description": "Always \"Bearer\""
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Seconds until the JWT expires"
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "Opaque refresh token"
                    },
                    "scope": {
                      "type": "string",
                      "description": "Space-separated scopes"
                    },
                    "issued_at": {
                      "type": "string",
                      "description": "ISO-8601 issue timestamp"
                    },
                    "expiration_date": {
                      "type": "string",
                      "description": "ISO-8601 expiration timestamp"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable status message"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing/expired code, UUID or state mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Storage error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/ses": {
      "post": {
        "operationId": "sesWebhook",
        "summary": "Receive an Amazon SES bounce/complaint notification (SNS)",
        "tags": [
          "Webhooks"
        ],
        "description": "Public endpoint for the SNS HTTPS subscription on the SES notification topic. Relays the message unchanged to us-email, which authenticates it (allowlisted topic, RSA signature from an SNS-hosted certificate, freshness) and then marks a permanently bounced or complaining address as rejected, or confirms the subscription. Not part of the dashboard API surface.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "Type"
                ],
                "properties": {
                  "Type": {
                    "type": "string"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Handled (or intentionally ignored).",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Handled (or intentionally ignored).",
                  "type": "object",
                  "properties": {
                    "handled": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not a genuine SNS message from the configured topic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "502": {
            "description": "us-email could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/check": {
      "get": {
        "operationId": "apiCheck",
        "summary": "Authenticated connectivity check",
        "tags": [
          "Health"
        ],
        "description": "Returns a success message for a valid JWT or self token.",
        "responses": {
          "200": {
            "description": "Connectivity confirmation",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Connectivity confirmation",
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Success message"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication token missing or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Authentication token invalid or unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "healthCheck",
        "summary": "Liveness probe",
        "tags": [
          "Health"
        ],
        "description": "Returns Healthy if the gateway is alive. Used by load-balancer health checks. Unauthenticated.",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Service is healthy",
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Always \"Healthy\""
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/health": {
      "get": {
        "operationId": "healthCheck",
        "summary": "Liveness + shard readiness",
        "tags": [
          "Bot: API"
        ],
        "description": "Always 200 while this process is up; the body reports whether all shards are ready. Unauthenticated (deploy health probe) - exempt from the /api auth gate.",
        "responses": {
          "200": {
            "description": "Shard readiness state: ready is true only when every expected shard reports a fresh 10s heartbeat.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Shard readiness state: ready is true only when every expected shard reports a fresh 10s heartbeat.",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "ok (liveness) / ready (all shards up) / starting (still booting)."
                    },
                    "ready": {
                      "type": "boolean",
                      "description": "True only when every expected shard is ready."
                    },
                    "shards": {
                      "type": "object",
                      "description": "Shard readiness counts.",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Number of shards the bot is expected to run."
                        },
                        "ready": {
                          "type": "integer",
                          "description": "Number of shards currently reporting a fresh heartbeat."
                        }
                      },
                      "required": [
                        "total",
                        "ready"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "ready",
                    "shards"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Reserved for schema consistency - this route is exempt from the auth gate and never actually returns 401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/health/ready": {
      "get": {
        "operationId": "healthReady",
        "summary": "Shard readiness gate",
        "tags": [
          "Bot: API"
        ],
        "description": "200 only when every expected shard is ready; 503 while the bot is still booting. Unauthenticated (deploy readiness probe) - exempt from the /api auth gate.",
        "responses": {
          "200": {
            "description": "Shard readiness state: ready is true only when every expected shard reports a fresh 10s heartbeat.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Shard readiness state: ready is true only when every expected shard reports a fresh 10s heartbeat.",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "ok (liveness) / ready (all shards up) / starting (still booting)."
                    },
                    "ready": {
                      "type": "boolean",
                      "description": "True only when every expected shard is ready."
                    },
                    "shards": {
                      "type": "object",
                      "description": "Shard readiness counts.",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Number of shards the bot is expected to run."
                        },
                        "ready": {
                          "type": "integer",
                          "description": "Number of shards currently reporting a fresh heartbeat."
                        }
                      },
                      "required": [
                        "total",
                        "ready"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "ready",
                    "shards"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Reserved for schema consistency - this route is exempt from the auth gate and never actually returns 401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "503": {
            "description": "Shard readiness state: ready is true only when every expected shard reports a fresh 10s heartbeat.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Shard readiness state: ready is true only when every expected shard reports a fresh 10s heartbeat.",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "ok (liveness) / ready (all shards up) / starting (still booting)."
                    },
                    "ready": {
                      "type": "boolean",
                      "description": "True only when every expected shard is ready."
                    },
                    "shards": {
                      "type": "object",
                      "description": "Shard readiness counts.",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Number of shards the bot is expected to run."
                        },
                        "ready": {
                          "type": "integer",
                          "description": "Number of shards currently reporting a fresh heartbeat."
                        }
                      },
                      "required": [
                        "total",
                        "ready"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "ready",
                    "shards"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/servers": {
      "get": {
        "operationId": "listServers",
        "summary": "List the caller's mutual servers",
        "tags": [
          "Bot: General"
        ],
        "description": "Returns a compact summary (id/name/icon) for every server both the bot and the caller share, or - when the dashboard passes an x-guild-ids header - restricted to that explicit id list. Requires the x-discord-id header (the caller's Discord user id).",
        "responses": {
          "200": {
            "description": "Server summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Server summaries.",
                  "properties": {
                    "servers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "servers"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules": {
      "get": {
        "operationId": "listServerModules",
        "summary": "List dashboard modules and their per-caller availability",
        "tags": [
          "Bot: General"
        ],
        "description": "Returns every dashboard module tile (name, title, short description, icon) plus, for the caller, whether they meet that module's authorization tier - `available: false` entries carry a denial reason in `short_description` instead.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Module tiles.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Module tiles.",
                  "properties": {
                    "modules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "modules"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing server identifier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Server not authorized in development mode, or user is not a member of this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Server not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}": {
      "get": {
        "operationId": "getServer",
        "summary": "Get a server summary",
        "tags": [
          "Bot: General"
        ],
        "description": "Returns the server's own summary (id/name/icon/channels/roles/emojis) plus the caller's resolved guild member permissions - channels are the caller's own visible set when x-discord-id is present, otherwise every channel the bot can see.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Server summary, emojis, and the caller member permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Server summary, emojis, and the caller member permissions.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing server identifier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Server not authorized in development mode, or user is not a member of this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Server not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/logs": {
      "get": {
        "operationId": "logsList",
        "summary": "Fetch audit log entries for a server",
        "tags": [
          "Bot: Logs"
        ],
        "description": "Returns paginated audit log entries, optionally filtered by module and time range. Requires the ViewAuditLog permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "module",
            "required": false,
            "description": "Filter to a single module name."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "start",
            "required": false,
            "description": "ISO timestamp lower bound."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "end",
            "required": false,
            "description": "ISO timestamp upper bound."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "page_size",
            "required": false,
            "description": "Entries per page."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated audit log entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Paginated audit log entries.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Failed to fetch audit log entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User lacks the ViewAuditLog permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/settings": {
      "get": {
        "operationId": "adminGetSettings",
        "summary": "Get all admin settings",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns the server admin module settings in one call.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Server admin settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Server admin settings."
                }
              }
            }
          },
          "400": {
            "description": "Failed to retrieve admin settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "adminUpdateLoggerSettings",
        "summary": "Enable logger types for a webhook",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Registers one or more logger types against the given webhook URL for this server. Additive only: existing logger/webhook pairings are left untouched, and this never removes a previously-registered pairing. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "loggers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "webhookUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The loggers that were updated, and the resulting settings document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updatedLoggers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "updatedLoggers",
                    "settings"
                  ],
                  "description": "The loggers that were updated, and the resulting settings document."
                }
              }
            }
          },
          "400": {
            "description": "Failed to update logger settings (missing/invalid loggers or webhookUrl)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Caller lacks the Manage Guild permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general": {
      "get": {
        "operationId": "adminGetGeneralSettings",
        "summary": "Get general server settings",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns join roles, timed roles, gallery channels, emoji sharing, the currency emoji and the giveaway emoji in one call.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "join_roles": {
                      "type": "object",
                      "properties": {
                        "role_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "role_ids"
                      ]
                    },
                    "timed_roles": {
                      "type": "object",
                      "properties": {
                        "entries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "role_id",
                              "interval"
                            ],
                            "properties": {
                              "role_id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "interval": {
                                "type": "array",
                                "items": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "minItems": 5,
                                "maxItems": 5
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "entries"
                      ]
                    },
                    "gallery": {
                      "type": "object",
                      "properties": {
                        "channel_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "channel_ids"
                      ]
                    },
                    "emoji_sharing": {
                      "type": "object",
                      "properties": {
                        "source_servers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "exclude_server": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "source_servers",
                        "exclude_server"
                      ]
                    },
                    "currency_emoji": {
                      "type": "object",
                      "properties": {
                        "emoji": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "emoji"
                      ]
                    },
                    "giveaway_emoji": {
                      "type": "object",
                      "properties": {
                        "emoji": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "emoji"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general/join-roles": {
      "put": {
        "operationId": "adminSetJoinRoles",
        "summary": "Set join roles",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Replaces the list of roles assigned to every member on join.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "role_ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "required": [
                    "role_ids"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general/timed-roles": {
      "put": {
        "operationId": "adminSetTimedRoles",
        "summary": "Set timed roles",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Replaces the per-role expiration map used when a role is granted. Existing grants keep the expiry they were armed with.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "role_id",
                        "interval"
                      ],
                      "properties": {
                        "role_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "interval": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "minItems": 5,
                          "maxItems": 5
                        }
                      }
                    }
                  }
                },
                "required": [
                  "entries"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "role_id",
                          "interval"
                        ],
                        "properties": {
                          "role_id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "interval": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "minItems": 5,
                            "maxItems": 5
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "entries"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general/gallery": {
      "put": {
        "operationId": "adminSetGalleryChannels",
        "summary": "Set image-gallery channels",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Replaces the list of channels where only image attachments are allowed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "channel_ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "required": [
                    "channel_ids"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general/emoji-sharing": {
      "put": {
        "operationId": "adminSetEmojiSharing",
        "summary": "Set emoji sharing",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Sets which other servers this server borrows emojis from, and whether this server shares its own.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_servers": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "exclude_server": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "source_servers",
                  "exclude_server"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source_servers": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "exclude_server": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "source_servers",
                    "exclude_server"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general/currency-emoji": {
      "put": {
        "operationId": "adminSetCurrencyEmoji",
        "summary": "Set the currency emoji",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Sets the emoji shown next to currency amounts, or null to use the default.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": [
                      "null",
                      "string"
                    ]
                  }
                },
                "required": [
                  "emoji"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "emoji": {
                      "type": [
                        "null",
                        "string"
                      ]
                    }
                  },
                  "required": [
                    "emoji"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/general/giveaway-emoji": {
      "put": {
        "operationId": "adminSetGiveawayEmoji",
        "summary": "Set the giveaway reaction emoji",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Sets the emoji members react with to enter a giveaway, or null to use the default.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": [
                      "null",
                      "string"
                    ]
                  }
                },
                "required": [
                  "emoji"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "emoji": {
                      "type": [
                        "null",
                        "string"
                      ]
                    }
                  },
                  "required": [
                    "emoji"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/auto-publish": {
      "get": {
        "operationId": "adminListAutoPublish",
        "summary": "List auto-publish channels",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns the per-channel auto-publish settings for every configured announcement channel.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channel_id": {
                            "type": "string"
                          },
                          "publish_all": {
                            "type": "boolean"
                          },
                          "publish_users": {
                            "type": "boolean"
                          },
                          "publish_bots": {
                            "type": "boolean"
                          },
                          "publish_webhooks": {
                            "type": "boolean"
                          },
                          "publish_roles": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "channels"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/auto-publish/{channelId}": {
      "put": {
        "operationId": "adminSetAutoPublish",
        "summary": "Set auto-publish for a channel",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Creates or replaces the auto-publish settings of one announcement channel.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "publish_all",
                  "publish_users",
                  "publish_bots",
                  "publish_webhooks",
                  "publish_roles"
                ],
                "properties": {
                  "publish_all": {
                    "type": "boolean"
                  },
                  "publish_users": {
                    "type": "boolean"
                  },
                  "publish_bots": {
                    "type": "boolean"
                  },
                  "publish_webhooks": {
                    "type": "boolean"
                  },
                  "publish_roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel_id": {
                      "type": "string"
                    },
                    "publish_all": {
                      "type": "boolean"
                    },
                    "publish_users": {
                      "type": "boolean"
                    },
                    "publish_bots": {
                      "type": "boolean"
                    },
                    "publish_webhooks": {
                      "type": "boolean"
                    },
                    "publish_roles": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "adminDeleteAutoPublish",
        "summary": "Remove auto-publish for a channel",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Deletes the auto-publish settings of one channel.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/auto-react": {
      "get": {
        "operationId": "adminListAutoReact",
        "summary": "List auto-react channels",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns the per-channel auto-react settings for every configured channel.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channel_id": {
                            "type": "string"
                          },
                          "emoji_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "react_all": {
                            "type": "boolean"
                          },
                          "react_users": {
                            "type": "boolean"
                          },
                          "react_bots": {
                            "type": "boolean"
                          },
                          "react_webhooks": {
                            "type": "boolean"
                          },
                          "react_roles": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "channels"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/auto-react/{channelId}": {
      "put": {
        "operationId": "adminSetAutoReact",
        "summary": "Set auto-react for a channel",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Creates or replaces the auto-react settings of one channel (at most 20 emojis).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "emoji_ids",
                  "react_all",
                  "react_users",
                  "react_bots",
                  "react_webhooks",
                  "react_roles"
                ],
                "properties": {
                  "emoji_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "react_all": {
                    "type": "boolean"
                  },
                  "react_users": {
                    "type": "boolean"
                  },
                  "react_bots": {
                    "type": "boolean"
                  },
                  "react_webhooks": {
                    "type": "boolean"
                  },
                  "react_roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel_id": {
                      "type": "string"
                    },
                    "emoji_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "react_all": {
                      "type": "boolean"
                    },
                    "react_users": {
                      "type": "boolean"
                    },
                    "react_bots": {
                      "type": "boolean"
                    },
                    "react_webhooks": {
                      "type": "boolean"
                    },
                    "react_roles": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "adminDeleteAutoReact",
        "summary": "Remove auto-react for a channel",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Deletes the auto-react settings of one channel.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/logger": {
      "get": {
        "operationId": "adminGetLoggerSettings",
        "summary": "Get logger settings",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns every logger category, its current destinations (live-resolved), and its ignore filters.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "category": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "available": {
                        "type": "boolean"
                      },
                      "destinations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel_id": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "thread_id": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "resolved": {
                              "type": "boolean"
                            },
                            "handle": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "channel_id",
                            "thread_id",
                            "resolved",
                            "handle"
                          ]
                        }
                      },
                      "ignore": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "users",
                                "roles",
                                "channels"
                              ]
                            },
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ]
                        }
                      },
                      "allowed_ignore_kinds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "users",
                            "roles",
                            "channels"
                          ]
                        }
                      }
                    },
                    "required": [
                      "category",
                      "enabled",
                      "available",
                      "destinations",
                      "ignore",
                      "allowed_ignore_kinds"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/logger/{category}/channels/{channelId}": {
      "put": {
        "operationId": "adminAddLoggerChannel",
        "summary": "Add a logger destination channel",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Creates or reuses a webhook in the given channel and registers it for the category. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "thread_id": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "category",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "available": {
                      "type": "boolean"
                    },
                    "destinations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channel_id": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "thread_id": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "resolved": {
                            "type": "boolean"
                          },
                          "handle": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "channel_id",
                          "thread_id",
                          "resolved",
                          "handle"
                        ]
                      }
                    },
                    "ignore": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "users",
                              "roles",
                              "channels"
                            ]
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "id"
                        ]
                      }
                    },
                    "allowed_ignore_kinds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "users",
                          "roles",
                          "channels"
                        ]
                      }
                    }
                  },
                  "required": [
                    "category",
                    "enabled",
                    "available",
                    "destinations",
                    "ignore",
                    "allowed_ignore_kinds"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "adminRemoveLoggerChannel",
        "summary": "Remove a logger destination channel",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Deregisters a channel from the category (the underlying webhook is not deleted, matching /log toggle behavior). Requires the Manage Guild permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "thread_id",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "category",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/logger/{category}/destinations/{handle}": {
      "delete": {
        "operationId": "adminRemoveLoggerDestinationByHandle",
        "summary": "Remove a logger destination by handle",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Deregisters a destination by its opaque handle (from GET /logger's destinations list), matching on the stored entry itself rather than a live-resolved channel_id. This is the only way to remove a destination whose webhook no longer exists (a deleted webhook/channel) - such an entry never live-resolves to a channel_id, so DELETE /logger/:category/channels/:channelId can never target it. Requires the Manage Guild permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "category",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "handle",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "available": {
                      "type": "boolean"
                    },
                    "destinations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channel_id": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "thread_id": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "resolved": {
                            "type": "boolean"
                          },
                          "handle": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "channel_id",
                          "thread_id",
                          "resolved",
                          "handle"
                        ]
                      }
                    },
                    "ignore": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "users",
                              "roles",
                              "channels"
                            ]
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "id"
                        ]
                      }
                    },
                    "allowed_ignore_kinds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "users",
                          "roles",
                          "channels"
                        ]
                      }
                    }
                  },
                  "required": [
                    "category",
                    "enabled",
                    "available",
                    "destinations",
                    "ignore",
                    "allowed_ignore_kinds"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/logger/{category}/ignore": {
      "put": {
        "operationId": "adminAddLoggerIgnore",
        "summary": "Add a logger ignore entry",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Adds one entity to a category ignore list. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "id"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "users",
                      "roles",
                      "channels"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "category",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "loggerType": {
                      "type": "string"
                    },
                    "ignore": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "minItems": 2,
                        "maxItems": 2
                      }
                    }
                  },
                  "required": [
                    "loggerType",
                    "ignore"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "adminRemoveLoggerIgnore",
        "summary": "Remove a logger ignore entry",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Removes one entity from a category ignore list. Requires the Manage Guild permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "users",
                "roles",
                "channels"
              ]
            },
            "in": "query",
            "name": "kind",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "category",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/self-roles": {
      "get": {
        "operationId": "adminGetSelfRoles",
        "summary": "Get self-assignable role groups",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns every self-assignable role group configured on this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/self-roles/groups/{groupId}/roles": {
      "post": {
        "operationId": "adminAddRoleToGroup",
        "summary": "Add a self-assignable role",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Adds a role to a self-assignable role group, creating the group if it does not exist yet.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role_id": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "role_id"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "groupId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/self-roles/groups/{groupId}/roles/{roleId}": {
      "delete": {
        "operationId": "adminRemoveRoleFromGroup",
        "summary": "Remove a self-assignable role",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Removes a role from a self-assignable role group, deleting the group entirely once its last role is removed.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "groupId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/self-roles/groups/{groupId}": {
      "patch": {
        "operationId": "adminUpdateGroupSettings",
        "summary": "Update self-assignable role group settings",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Updates a role group's mode, requirements, and other settings.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 90
                  },
                  "mode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "single",
                      "multiple",
                      null
                    ]
                  },
                  "require_one": {
                    "type": "boolean"
                  },
                  "remove_on_change": {
                    "type": "boolean"
                  },
                  "multiple_range": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 2,
                    "items": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "require_roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "ignore_roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "monitor_requirements": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "groupId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/self-roles/auto-delete": {
      "patch": {
        "operationId": "setSelfRolesAutoDelete",
        "summary": "Set self-role auto-delete-message",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Sets whether self-assigned-role confirmation messages are auto-deleted, replacing the legacy toggle prefix command with an explicit checkbox value.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "autoDelete": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "autoDelete"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/voice-roles": {
      "get": {
        "operationId": "adminGetVoiceRoles",
        "summary": "Get voice-channel roles",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns every configured voice-channel-to-role mapping on this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/voice-roles/{channelId}": {
      "put": {
        "operationId": "adminSetVoiceRole",
        "summary": "Set a voice-channel role",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Sets (or, with a null role_id, clears) the role assigned to a voice or stage channel.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "role_id"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/role-menus": {
      "get": {
        "operationId": "adminListRoleMenus",
        "summary": "List posted role menus",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Returns every self-assignable-roles menu currently posted on this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/administration/role-menus/{channelId}/{messageId}": {
      "delete": {
        "operationId": "adminRemoveRoleMenu",
        "summary": "Remove a posted role menu",
        "tags": [
          "Bot: Admin"
        ],
        "description": "Disables a posted role menu's buttons. The Discord message itself is not deleted.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "messageId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/repeaters": {
      "get": {
        "operationId": "alarmListRepeaters",
        "summary": "List repeating messages",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "All repeating messages of the server, decrypted, oldest first.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repeaters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "author_id": {
                            "type": "string"
                          },
                          "content": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "embed": {
                            "type": [
                              "null",
                              "object"
                            ],
                            "additionalProperties": true
                          },
                          "interval": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "minItems": 5,
                            "maxItems": 5
                          },
                          "start_time": {
                            "type": "string"
                          },
                          "next_run": {
                            "type": "string"
                          },
                          "no_redundant": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "type": [
                              "null",
                              "string"
                            ],
                            "enum": [
                              "auto_failure",
                              "manual",
                              "over_limit",
                              null
                            ]
                          },
                          "failure": {
                            "type": "object",
                            "properties": {
                              "consecutive": {
                                "type": "integer"
                              },
                              "first_failed_at": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              },
                              "last_failed_at": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              },
                              "last_error": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              }
                            },
                            "required": [
                              "consecutive",
                              "first_failed_at",
                              "last_failed_at",
                              "last_error"
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "updated_by": {
                            "type": "string"
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "command",
                              "dashboard"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "alarmCreateRepeater",
        "summary": "Create a repeating message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Creates a repeater; enforces the per-server cap and channel permissions. Requires Manage Server, or an authorized role together with Manage Messages.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "channel_id",
                  "interval"
                ],
                "properties": {
                  "channel_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "embed": {
                    "type": [
                      "null",
                      "object"
                    ],
                    "additionalProperties": true
                  },
                  "interval": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "start_time": {
                    "type": "string"
                  },
                  "no_redundant": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "interval": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "start_time": {
                      "type": "string"
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "no_redundant": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/repeaters/{repeaterId}": {
      "get": {
        "operationId": "alarmGetRepeater",
        "summary": "Get a repeating message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "One repeater by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "repeaterId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "interval": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "start_time": {
                      "type": "string"
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "no_redundant": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "alarmUpdateRepeater",
        "summary": "Update a repeating message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Partial update; the merged document is re-validated.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "channel_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "embed": {
                    "type": [
                      "null",
                      "object"
                    ],
                    "additionalProperties": true
                  },
                  "interval": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "start_time": {
                    "type": "string"
                  },
                  "no_redundant": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "repeaterId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "interval": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "start_time": {
                      "type": "string"
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "no_redundant": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "alarmDeleteRepeater",
        "summary": "Delete a repeating message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Deletes the repeater and stops its timer on the owning shard.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "repeaterId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/repeaters/{repeaterId}/enable": {
      "post": {
        "operationId": "alarmEnableRepeater",
        "summary": "Enable a repeating message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Re-enables a paused repeater, resetting its failure state and next run.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "repeaterId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "interval": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "start_time": {
                      "type": "string"
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "no_redundant": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/repeaters/{repeaterId}/disable": {
      "post": {
        "operationId": "alarmDisableRepeater",
        "summary": "Disable a repeating message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Pauses a repeater (disabled_reason: manual).",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "repeaterId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "interval": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "start_time": {
                      "type": "string"
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "no_redundant": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/repeaters/{repeaterId}/invoke": {
      "post": {
        "operationId": "alarmInvokeRepeater",
        "summary": "Send a repeating message now",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Sends immediately on the owning shard and restarts the interval.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "repeaterId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/scheduled": {
      "get": {
        "operationId": "alarmListScheduled",
        "summary": "List scheduled messages",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "One-off and recurring scheduled messages, soonest first.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scheduled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "author_id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "once",
                              "recurring"
                            ]
                          },
                          "entry_type": {
                            "type": "string",
                            "enum": [
                              "message",
                              "action"
                            ]
                          },
                          "content": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "embed": {
                            "type": [
                              "null",
                              "object"
                            ],
                            "additionalProperties": true
                          },
                          "action": {
                            "type": [
                              "null",
                              "object"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "leaderboard"
                                ]
                              },
                              "filters": {
                                "type": "object",
                                "additionalProperties": true
                              }
                            },
                            "additionalProperties": true
                          },
                          "run_at": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "interval": {
                            "type": [
                              "null",
                              "array"
                            ],
                            "items": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "minItems": 5,
                            "maxItems": 5
                          },
                          "next_run": {
                            "type": "string"
                          },
                          "silent": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "type": [
                              "null",
                              "string"
                            ],
                            "enum": [
                              "auto_failure",
                              "manual",
                              "over_limit",
                              null
                            ]
                          },
                          "failure": {
                            "type": "object",
                            "properties": {
                              "consecutive": {
                                "type": "integer"
                              },
                              "first_failed_at": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              },
                              "last_failed_at": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              },
                              "last_error": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              }
                            },
                            "required": [
                              "consecutive",
                              "first_failed_at",
                              "last_failed_at",
                              "last_error"
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "updated_by": {
                            "type": "string"
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "command",
                              "dashboard",
                              "migration"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "alarmCreateScheduled",
        "summary": "Create a scheduled message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Creates a one-off or recurring scheduled message within the server tier horizon and cap.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "channel_id"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "once",
                      "recurring"
                    ]
                  },
                  "channel_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "embed": {
                    "type": [
                      "null",
                      "object"
                    ],
                    "additionalProperties": true
                  },
                  "run_at": {
                    "type": "string"
                  },
                  "interval": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "silent": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "once",
                        "recurring"
                      ]
                    },
                    "entry_type": {
                      "type": "string",
                      "enum": [
                        "message",
                        "action"
                      ]
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "action": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "leaderboard"
                          ]
                        },
                        "filters": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "additionalProperties": true
                    },
                    "run_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "interval": {
                      "type": [
                        "null",
                        "array"
                      ],
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "silent": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard",
                        "migration"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/scheduled/{entryId}": {
      "get": {
        "operationId": "alarmGetScheduled",
        "summary": "Get a scheduled message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "One scheduled entry by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entryId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "once",
                        "recurring"
                      ]
                    },
                    "entry_type": {
                      "type": "string",
                      "enum": [
                        "message",
                        "action"
                      ]
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "action": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "leaderboard"
                          ]
                        },
                        "filters": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "additionalProperties": true
                    },
                    "run_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "interval": {
                      "type": [
                        "null",
                        "array"
                      ],
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "silent": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard",
                        "migration"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "alarmUpdateScheduled",
        "summary": "Update a scheduled message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Partial update; the merged entry is re-validated.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "once",
                      "recurring"
                    ]
                  },
                  "channel_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "embed": {
                    "type": [
                      "null",
                      "object"
                    ],
                    "additionalProperties": true
                  },
                  "run_at": {
                    "type": "string"
                  },
                  "interval": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "silent": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entryId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "once",
                        "recurring"
                      ]
                    },
                    "entry_type": {
                      "type": "string",
                      "enum": [
                        "message",
                        "action"
                      ]
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "action": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "leaderboard"
                          ]
                        },
                        "filters": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "additionalProperties": true
                    },
                    "run_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "interval": {
                      "type": [
                        "null",
                        "array"
                      ],
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "silent": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard",
                        "migration"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "alarmDeleteScheduled",
        "summary": "Delete a scheduled message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Deletes the entry and clears its timer on the owning shard.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entryId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/scheduled/{entryId}/enable": {
      "post": {
        "operationId": "alarmEnableScheduled",
        "summary": "Enable a scheduled message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Re-enables a paused entry, resetting its failure state and next run.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entryId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "once",
                        "recurring"
                      ]
                    },
                    "entry_type": {
                      "type": "string",
                      "enum": [
                        "message",
                        "action"
                      ]
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "action": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "leaderboard"
                          ]
                        },
                        "filters": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "additionalProperties": true
                    },
                    "run_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "interval": {
                      "type": [
                        "null",
                        "array"
                      ],
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "silent": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard",
                        "migration"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/scheduled/{entryId}/disable": {
      "post": {
        "operationId": "alarmDisableScheduled",
        "summary": "Disable a scheduled message",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Pauses an entry (disabled_reason: manual).",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entryId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "author_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "once",
                        "recurring"
                      ]
                    },
                    "entry_type": {
                      "type": "string",
                      "enum": [
                        "message",
                        "action"
                      ]
                    },
                    "content": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "embed": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "additionalProperties": true
                    },
                    "action": {
                      "type": [
                        "null",
                        "object"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "leaderboard"
                          ]
                        },
                        "filters": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "additionalProperties": true
                    },
                    "run_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "interval": {
                      "type": [
                        "null",
                        "array"
                      ],
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 5,
                      "maxItems": 5
                    },
                    "next_run": {
                      "type": "string"
                    },
                    "silent": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "type": [
                        "null",
                        "string"
                      ],
                      "enum": [
                        "auto_failure",
                        "manual",
                        "over_limit",
                        null
                      ]
                    },
                    "failure": {
                      "type": "object",
                      "properties": {
                        "consecutive": {
                          "type": "integer"
                        },
                        "first_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_failed_at": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "last_error": {
                          "type": [
                            "null",
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "consecutive",
                        "first_failed_at",
                        "last_failed_at",
                        "last_error"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard",
                        "migration"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/scheduled/{entryId}/invoke": {
      "post": {
        "operationId": "alarmInvokeScheduled",
        "summary": "Send a scheduled message now",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Sends immediately on the owning shard; one-off entries are consumed.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entryId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/preview": {
      "post": {
        "operationId": "alarmPreviewMessage",
        "summary": "Validate and normalise a message payload",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Runs content and embed through the bot parser and Discord limits; returns the normalised send payload or field errors.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed": {
                    "type": [
                      "null",
                      "object"
                    ],
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/alarm/limits": {
      "get": {
        "operationId": "alarmGetLimits",
        "summary": "Get caps and horizon",
        "tags": [
          "Bot: Alarm"
        ],
        "description": "Repeater and scheduled-message usage versus the server tier limits.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repeaters": {
                      "type": "object",
                      "properties": {
                        "used": {
                          "type": "integer"
                        },
                        "max": {
                          "type": [
                            "null",
                            "integer"
                          ]
                        }
                      }
                    },
                    "scheduled": {
                      "type": "object",
                      "properties": {
                        "used": {
                          "type": "integer"
                        },
                        "max": {
                          "type": "integer"
                        },
                        "horizon_hours": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/automoderator/settings": {
      "get": {
        "operationId": "automoderatorGetSettings",
        "summary": "Get AutoModerator settings",
        "tags": [
          "Bot: AutoModerator"
        ],
        "description": "Returns all 11 rule configurations plus the NSFW image threshold in one call.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "object",
                      "properties": {
                        "server_invites": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "anti_phishing": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "mass_mention": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "banned_words": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "anti_spam": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "anti_emoji_spam": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "anti_attachment_spam": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "nsfw_images": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "qr_codes": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "anti_raid": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        },
                        "anti_young": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "enabledServerReference": {
                              "type": "boolean"
                            },
                            "ignoreThreads": {
                              "type": "boolean"
                            },
                            "autoDelete": {
                              "type": "boolean"
                            },
                            "autoWarn": {
                              "type": "boolean"
                            },
                            "autoMute": {
                              "type": "boolean"
                            },
                            "autoKick": {
                              "type": "boolean"
                            },
                            "autoBan": {
                              "type": "boolean"
                            },
                            "autoAlert": {
                              "type": "boolean"
                            },
                            "autoMuteDuration": {},
                            "triggeringMode": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "autoThreshold": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "autoThTime": {
                              "type": [
                                "null",
                                "number"
                              ]
                            },
                            "ignoredEntities": {
                              "type": "array",
                              "items": {
                                "type": "array"
                              }
                            },
                            "allowedSourceServers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "autoRule": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "words": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "string"
                              }
                            },
                            "customField": {
                              "type": [
                                "null",
                                "array"
                              ],
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "enabledServerReference",
                            "ignoreThreads",
                            "autoDelete",
                            "autoWarn",
                            "autoMute",
                            "autoKick",
                            "autoBan",
                            "autoAlert",
                            "autoMuteDuration",
                            "triggeringMode",
                            "autoThreshold",
                            "autoThTime",
                            "ignoredEntities",
                            "allowedSourceServers",
                            "autoRule",
                            "words",
                            "customField"
                          ]
                        }
                      },
                      "required": [
                        "server_invites",
                        "anti_phishing",
                        "mass_mention",
                        "banned_words",
                        "anti_spam",
                        "anti_emoji_spam",
                        "anti_attachment_spam",
                        "nsfw_images",
                        "qr_codes",
                        "anti_raid",
                        "anti_young"
                      ]
                    },
                    "nsfwThreshold": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "rules",
                    "nsfwThreshold"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/automoderator/rules/{ruleType}": {
      "patch": {
        "operationId": "automoderatorUpdateRule",
        "summary": "Update a rule",
        "tags": [
          "Bot: AutoModerator"
        ],
        "description": "Patches one AutoModerator rule type. Only fields that rule type actually uses are accepted.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "enabledServerReference": {
                    "type": "boolean"
                  },
                  "ignoreThreads": {
                    "type": "boolean"
                  },
                  "autoDelete": {
                    "type": "boolean"
                  },
                  "autoWarn": {
                    "type": "boolean"
                  },
                  "autoMute": {
                    "type": "boolean"
                  },
                  "autoKick": {
                    "type": "boolean"
                  },
                  "autoBan": {
                    "type": "boolean"
                  },
                  "autoAlert": {
                    "type": "boolean"
                  },
                  "autoMuteDuration": {},
                  "triggeringMode": {
                    "type": "string",
                    "enum": [
                      "Anywhere in word",
                      "Beginning of word",
                      "Exact match"
                    ]
                  },
                  "words": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "autoThreshold": {
                    "type": "integer"
                  },
                  "autoThTime": {
                    "type": "integer"
                  },
                  "customField": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "autoRule": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "ruleType",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ruleType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ruleType"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/automoderator/rules/{ruleType}/ignored-entities": {
      "post": {
        "operationId": "automoderatorAddIgnoredEntity",
        "summary": "Add an ignored entity",
        "tags": [
          "Bot: AutoModerator"
        ],
        "description": "Adds a user/role/channel (or, for server_invites, an allowed source server) to a rule's ignore list.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "id"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "users",
                      "roles",
                      "channels",
                      "servers"
                    ]
                  },
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "ruleType",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/automoderator/rules/{ruleType}/ignored-entities/{kind}/{id}": {
      "delete": {
        "operationId": "automoderatorRemoveIgnoredEntity",
        "summary": "Remove an ignored entity",
        "tags": [
          "Bot: AutoModerator"
        ],
        "description": "Removes an entry from a rule's ignore list.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "ruleType",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "kind",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/automoderator/nsfw-threshold": {
      "put": {
        "operationId": "automoderatorSetNsfwThreshold",
        "summary": "Set the NSFW image threshold",
        "tags": [
          "Bot: AutoModerator"
        ],
        "description": "Sets (or, with threshold: null, resets to default) the confidence threshold for flagging NSFW images.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "threshold"
                ],
                "properties": {
                  "threshold": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "threshold": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "threshold"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/azurlane/feeds": {
      "get": {
        "operationId": "azurlaneListFeeds",
        "summary": "List Azur Lane feeds",
        "tags": [
          "Bot: AzurLane"
        ],
        "description": "Lists the Azur Lane server-status feed subscriptions configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Feed list.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Feed list.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "azurlaneCreateFeed",
        "summary": "Create an Azur Lane feed",
        "tags": [
          "Bot: AzurLane"
        ],
        "description": "Creates a new Azur Lane server-status feed subscription for this server. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The created feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The created feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/azurlane/feeds/{feedId}": {
      "get": {
        "operationId": "azurlaneGetFeed",
        "summary": "Get an Azur Lane feed",
        "tags": [
          "Bot: AzurLane"
        ],
        "description": "Fetches a single Azur Lane feed configuration by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "azurlaneUpdateFeed",
        "summary": "Update an Azur Lane feed",
        "tags": [
          "Bot: AzurLane"
        ],
        "description": "Updates an Azur Lane feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The updated feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The updated feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "azurlaneDeleteFeed",
        "summary": "Delete an Azur Lane feed",
        "tags": [
          "Bot: AzurLane"
        ],
        "description": "Deletes an Azur Lane feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Deletion result.",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/custreact/settings": {
      "get": {
        "operationId": "custreactGetSettings",
        "summary": "Get custom-reaction settings",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Returns whether custom reactions are enabled and whether verbose mode is on for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "custreactUpdateSettings",
        "summary": "Update custom-reaction settings",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Updates the enabled/verbose-mode toggles for this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "cr_enabled": {
                    "type": "boolean"
                  },
                  "verbose_mode": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/custreact/reactions": {
      "get": {
        "operationId": "custreactList",
        "summary": "List custom reactions",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Returns every custom reaction owned by this server, decrypted. Global reactions are never included.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "custreactAdd",
        "summary": "Add a custom reaction",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Creates a new custom reaction owned by this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "trigger": {
                    "type": "string",
                    "minLength": 1
                  },
                  "response": {
                    "type": "string",
                    "minLength": 1
                  },
                  "anywhere": {
                    "type": "boolean",
                    "default": false
                  },
                  "to_dm": {
                    "type": "boolean",
                    "default": false
                  },
                  "delete_original": {
                    "type": "boolean",
                    "default": false
                  },
                  "restricted_roles": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "exclude_mode": {
                    "type": "boolean"
                  },
                  "and_mode": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "trigger",
                  "response"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "custreactClear",
        "summary": "Clear all custom reactions",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Danger zone: deletes every custom reaction owned by this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/custreact/reactions/{crId}": {
      "get": {
        "operationId": "custreactGet",
        "summary": "Get a custom reaction",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Returns a single custom reaction owned by this server, or 404 if not found.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "crId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "custreactEdit",
        "summary": "Edit a custom reaction",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Updates any subset of a custom reaction's fields, including restrictions.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "trigger": {
                    "type": "string"
                  },
                  "response": {
                    "type": "string"
                  },
                  "anywhere": {
                    "type": "boolean"
                  },
                  "to_dm": {
                    "type": "boolean"
                  },
                  "delete_original": {
                    "type": "boolean"
                  },
                  "restricted_roles": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "exclude_mode": {
                    "type": "boolean"
                  },
                  "and_mode": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "crId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "custreactDelete",
        "summary": "Delete a custom reaction",
        "tags": [
          "Bot: CustomReactions"
        ],
        "description": "Deletes a single custom reaction owned by this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "crId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/emojisub/settings": {
      "get": {
        "operationId": "emojisubGetSettings",
        "summary": "Get emoji submission settings",
        "tags": [
          "Bot: EmojiSubmissions"
        ],
        "description": "Returns the authorized-roles list, each role's review-channel/quota/monitoring settings, and the server-wide mention settings.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "emojisubUpdateSettings",
        "summary": "Update emoji submission settings",
        "tags": [
          "Bot: EmojiSubmissions"
        ],
        "description": "Updates the server-wide authorized-reviewer role mentions and/or the disable-mentions toggle. Requires the Manage Emojis and Stickers permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "role_mentions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  },
                  "disable_mentions": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/emojisub/roles": {
      "patch": {
        "operationId": "emojisubUpdateRoles",
        "summary": "Update the authorized-roles list",
        "tags": [
          "Bot: EmojiSubmissions"
        ],
        "description": "Replaces the list of roles authorized to submit new emojis. Requires the Manage Emojis and Stickers permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "role_ids"
                ],
                "properties": {
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/emojisub/roles/{roleId}": {
      "get": {
        "operationId": "emojisubGetRoleSettings",
        "summary": "Get a role's emoji-submission settings",
        "tags": [
          "Bot: EmojiSubmissions"
        ],
        "description": "Returns a single authorized role's review-channel/quota/monitoring settings, or 404 if that role is not currently authorized to submit emojis.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "emojisubUpdateRoleSettings",
        "summary": "Update a role's emoji-submission settings",
        "tags": [
          "Bot: EmojiSubmissions"
        ],
        "description": "Updates a single authorized role's review channel, emoji quota, and/or requirements-monitoring toggle. Requires the Manage Emojis and Stickers permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "emoji_limit": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "monitor_requirements": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/emojisub/submissions": {
      "get": {
        "operationId": "emojisubListSubmissions",
        "summary": "List emoji submissions",
        "tags": [
          "Bot: EmojiSubmissions"
        ],
        "description": "Lists pending (awaiting review) or resolved (active) emoji submissions for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "pending",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/trelloTeam": {
      "get": {
        "operationId": "formsGetTrelloTeam",
        "summary": "Get paired Trello team",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the Trello team currently paired to this server, if any.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "formsPairTrelloTeam",
        "summary": "Pair a Trello team",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Requests to pair a Trello team to this server. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "formsUnpairTrelloTeam",
        "summary": "Unpair the Trello team",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Unpairs the currently-paired Trello team. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/trelloOptions": {
      "get": {
        "operationId": "formsGetTrelloOptions",
        "summary": "Get Trello options",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the available Trello configuration options.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "options"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Trello options not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/trelloBoards": {
      "get": {
        "operationId": "formsGetTrelloBoards",
        "summary": "Get Trello boards",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the Trello boards available to the paired team.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trello_boards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "trello_boards"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Trello boards not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/blacklist": {
      "get": {
        "operationId": "formsGetBlacklist",
        "summary": "Get user blacklist",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the users blacklisted from submitting forms. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "formsAddToBlacklist",
        "summary": "Add users to blacklist",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Adds one or more users to the form-submission blacklist. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "formsRemoveFromBlacklist",
        "summary": "Remove users from blacklist",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Removes one or more users from the form-submission blacklist (comma-separated `users` query param). Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/submitReactions": {
      "get": {
        "operationId": "formsGetSubmitReactions",
        "summary": "Get submit reactions",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the configured message-reaction form triggers for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "formsCreateSubmitReaction",
        "summary": "Create a submit reaction",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Creates a new message-reaction form trigger. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "formsDeleteSubmitReaction",
        "summary": "Delete a submit reaction",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Deletes a message-reaction form trigger identified by channelId/messageId query params. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/settings": {
      "get": {
        "operationId": "formsGetSettings",
        "summary": "Get forms module settings",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the current forms module settings.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "formsSetSettings",
        "summary": "Update forms module settings",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Updates the forms module settings. Requires ManageMessages.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage form settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/new": {
      "get": {
        "operationId": "formsGetNewTemplate",
        "summary": "Get the new-form template",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns the blank form template workflow.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Form template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms": {
      "post": {
        "operationId": "formsCreate",
        "summary": "Create a form",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Creates a new form workflow from the request body. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Form creation temporarily unavailable, or form ID not found after creation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "formsList",
        "summary": "List forms",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns all form workflows for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "forms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "forms"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/forms/{formId}": {
      "get": {
        "operationId": "formsGetOne",
        "summary": "Get a form",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Returns a single form workflow by ID.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "formId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Form ID not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "formsUpdate",
        "summary": "Update a form",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Updates a form workflow by ID. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "formId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Form ID not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "formsDelete",
        "summary": "Delete a form",
        "tags": [
          "Bot: Forms"
        ],
        "description": "Deletes a form workflow by ID. Requires ManageGuild.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "formId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Form ID not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "application/problem+json error envelope: { errors: [ { code, message } ] }.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/join": {
      "get": {
        "operationId": "greetsGetJoin",
        "summary": "Get the welcome settings",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Channel and DM welcome message settings for members joining the server. Read-only: returns an in-memory default when unconfigured, without persisting anything.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "delay": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "greetsSetJoin",
        "summary": "Update the welcome settings",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Partial update of the channel and/or DM welcome line. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "channel_id"
                    ],
                    "properties": {
                      "channel_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "delete_after": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  },
                  "dm": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "delay": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/leave": {
      "get": {
        "operationId": "greetsGetLeave",
        "summary": "Get the goodbye settings",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Channel goodbye message settings for members leaving the server. There is no DM line: no goodbyedm command ever existed, so no server has one configured.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "greetsSetLeave",
        "summary": "Update the goodbye settings",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Partial update of the channel goodbye line. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "channel_id"
                    ],
                    "properties": {
                      "channel_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "delete_after": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/role-gained": {
      "get": {
        "operationId": "greetsListRoleGained",
        "summary": "List role-gained messages",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Every role that has a configured message for when a member gains it.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "server_id": {
                            "type": "string"
                          },
                          "channel": {
                            "type": "object",
                            "properties": {
                              "channel_id": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "delete_after": {
                                "type": "integer"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "message": {
                                "type": "string"
                              },
                              "disabled_reason": {
                                "type": [
                                  "null",
                                  "string"
                                ],
                                "enum": [
                                  "auto_failure",
                                  "manual",
                                  null
                                ]
                              },
                              "failure": {
                                "type": "object",
                                "properties": {
                                  "consecutive": {
                                    "type": "integer"
                                  },
                                  "first_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_error": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  }
                                },
                                "required": [
                                  "consecutive",
                                  "first_failed_at",
                                  "last_failed_at",
                                  "last_error"
                                ]
                              }
                            }
                          },
                          "dm": {
                            "type": "object",
                            "properties": {
                              "delay": {
                                "type": "integer"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "message": {
                                "type": "string"
                              },
                              "disabled_reason": {
                                "type": [
                                  "null",
                                  "string"
                                ],
                                "enum": [
                                  "auto_failure",
                                  "manual",
                                  null
                                ]
                              },
                              "failure": {
                                "type": "object",
                                "properties": {
                                  "consecutive": {
                                    "type": "integer"
                                  },
                                  "first_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_error": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  }
                                },
                                "required": [
                                  "consecutive",
                                  "first_failed_at",
                                  "last_failed_at",
                                  "last_error"
                                ]
                              }
                            }
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "updated_by": {
                            "type": "string"
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "command",
                              "dashboard"
                            ]
                          },
                          "role_id": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "entries"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/role-gained/{roleId}": {
      "get": {
        "operationId": "greetsGetRoleGained",
        "summary": "Get one role-gained message",
        "tags": [
          "Bot: Greets"
        ],
        "description": "The configured channel and DM message for one role; 404 when the role has none.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "delay": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    },
                    "role_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "greetsSetRoleGained",
        "summary": "Create or update a role-gained message",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Upsert: creates the entry when the role has none and updates it otherwise, so the dashboard needs no separate create route. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "channel_id"
                    ],
                    "properties": {
                      "channel_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "delete_after": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  },
                  "dm": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "delay": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    },
                    "role_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "greetsDeleteRoleGained",
        "summary": "Delete a role-gained message",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Removes the entry entirely. Returns 200 with a success flag, never a bare 204.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/role-lost": {
      "get": {
        "operationId": "greetsListRoleLost",
        "summary": "List role-lost messages",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Every role that has a configured message for when a member loses it.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "server_id": {
                            "type": "string"
                          },
                          "channel": {
                            "type": "object",
                            "properties": {
                              "channel_id": {
                                "type": [
                                  "null",
                                  "string"
                                ]
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "delete_after": {
                                "type": "integer"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "message": {
                                "type": "string"
                              },
                              "disabled_reason": {
                                "type": [
                                  "null",
                                  "string"
                                ],
                                "enum": [
                                  "auto_failure",
                                  "manual",
                                  null
                                ]
                              },
                              "failure": {
                                "type": "object",
                                "properties": {
                                  "consecutive": {
                                    "type": "integer"
                                  },
                                  "first_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_error": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  }
                                },
                                "required": [
                                  "consecutive",
                                  "first_failed_at",
                                  "last_failed_at",
                                  "last_error"
                                ]
                              }
                            }
                          },
                          "dm": {
                            "type": "object",
                            "properties": {
                              "delay": {
                                "type": "integer"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "message": {
                                "type": "string"
                              },
                              "disabled_reason": {
                                "type": [
                                  "null",
                                  "string"
                                ],
                                "enum": [
                                  "auto_failure",
                                  "manual",
                                  null
                                ]
                              },
                              "failure": {
                                "type": "object",
                                "properties": {
                                  "consecutive": {
                                    "type": "integer"
                                  },
                                  "first_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_failed_at": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  },
                                  "last_error": {
                                    "type": [
                                      "null",
                                      "string"
                                    ]
                                  }
                                },
                                "required": [
                                  "consecutive",
                                  "first_failed_at",
                                  "last_failed_at",
                                  "last_error"
                                ]
                              }
                            }
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "updated_by": {
                            "type": "string"
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "command",
                              "dashboard"
                            ]
                          },
                          "role_id": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "entries"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/role-lost/{roleId}": {
      "get": {
        "operationId": "greetsGetRoleLost",
        "summary": "Get one role-lost message",
        "tags": [
          "Bot: Greets"
        ],
        "description": "The configured channel and DM messages for one role; 404 when the role has none.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "delay": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    },
                    "role_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "greetsSetRoleLost",
        "summary": "Create or update a role-lost message",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Upsert: creates the entry when the role has none and updates it otherwise. Both the channel and the DM line can be set, exactly like role-gained. Requires the Manage Guild permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "channel_id"
                    ],
                    "properties": {
                      "channel_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "delete_after": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  },
                  "dm": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "message": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "delay": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "delay": {
                          "type": "integer"
                        },
                        "delete_after": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "delay": {
                          "type": "integer"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "disabled_reason": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "enum": [
                            "auto_failure",
                            "manual",
                            null
                          ]
                        },
                        "failure": {
                          "type": "object",
                          "properties": {
                            "consecutive": {
                              "type": "integer"
                            },
                            "first_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_failed_at": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "last_error": {
                              "type": [
                                "null",
                                "string"
                              ]
                            }
                          },
                          "required": [
                            "consecutive",
                            "first_failed_at",
                            "last_failed_at",
                            "last_error"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "command",
                        "dashboard"
                      ]
                    },
                    "role_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "greetsDeleteRoleLost",
        "summary": "Delete a role-lost message",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Removes the entry entirely. Returns 200 with a success flag, never a bare 204.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/greets/preview": {
      "post": {
        "operationId": "greetsPreviewMessage",
        "summary": "Preview a greet template",
        "tags": [
          "Bot: Greets"
        ],
        "description": "Substitutes the placeholders using the requesting admin as the sample member and the real server and bot identity, then runs the same Discord-limits check the alarm preview uses. Read-only: it saves nothing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "embed": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": true
                  },
                  "role_id": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/mahjongsoul/feeds": {
      "get": {
        "operationId": "mahjongsoulListFeeds",
        "summary": "List Mahjong Soul feeds",
        "tags": [
          "Bot: MahjongSoul"
        ],
        "description": "Lists the Mahjong Soul server-status feed subscriptions configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Feed list.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Feed list.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "mahjongsoulCreateFeed",
        "summary": "Create a Mahjong Soul feed",
        "tags": [
          "Bot: MahjongSoul"
        ],
        "description": "Creates a new Mahjong Soul server-status feed subscription for this server. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The created feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The created feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/mahjongsoul/feeds/{feedId}": {
      "get": {
        "operationId": "mahjongsoulGetFeed",
        "summary": "Get a Mahjong Soul feed",
        "tags": [
          "Bot: MahjongSoul"
        ],
        "description": "Fetches a single Mahjong Soul feed configuration by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "mahjongsoulUpdateFeed",
        "summary": "Update a Mahjong Soul feed",
        "tags": [
          "Bot: MahjongSoul"
        ],
        "description": "Updates a Mahjong Soul feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The updated feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The updated feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "mahjongsoulDeleteFeed",
        "summary": "Delete a Mahjong Soul feed",
        "tags": [
          "Bot: MahjongSoul"
        ],
        "description": "Deletes a Mahjong Soul feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Deletion result.",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/settings": {
      "get": {
        "operationId": "moderationGetSettings",
        "summary": "Get moderation settings",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Returns the server general moderation settings (toggles, point decay, mute role/chat channels, image-ban role) in one call.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "immunity": {
                      "type": "boolean"
                    },
                    "anonymization": {
                      "type": "boolean"
                    },
                    "notification": {
                      "type": "boolean"
                    },
                    "pointDecay": {
                      "type": "string",
                      "enum": [
                        "none",
                        "first",
                        "first-with-points",
                        "each"
                      ]
                    },
                    "muteStrategy": {
                      "type": "string",
                      "enum": [
                        "role",
                        "timeout"
                      ]
                    },
                    "muteRoleId": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "muteChatChannelIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "imageBanRoleId": {
                      "type": [
                        "null",
                        "string"
                      ]
                    }
                  },
                  "required": [
                    "immunity",
                    "anonymization",
                    "notification",
                    "pointDecay",
                    "muteStrategy",
                    "muteRoleId",
                    "muteChatChannelIds",
                    "imageBanRoleId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/settings/{field}": {
      "put": {
        "operationId": "moderationSetToggle",
        "summary": "Set a moderation toggle",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Sets one of the immunity, anonymization or notification toggles.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "field",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "value": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "field",
                    "value"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/settings/point-decay": {
      "put": {
        "operationId": "moderationSetPointDecay",
        "summary": "Set the point decay mode",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Sets how accumulated moderation points decay over time.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "none",
                      "first",
                      "first-with-points",
                      "each"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/settings/mute-strategy": {
      "put": {
        "operationId": "moderationSetMuteStrategy",
        "summary": "Set the mute strategy",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Sets how /mute enforces a mute: 'role' (add the configured mute role) or 'timeout' (Discord's own native member timeout - no role needed, capped at Discord's 28-day maximum).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "strategy"
                ],
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "role",
                      "timeout"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "strategy": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "strategy"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/roles/{kind}": {
      "put": {
        "operationId": "moderationSetRole",
        "summary": "Set a punishment role",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Sets (or clears, with roleId: null) the role applied by the mute or image-ban punishment. `kind` must be one of `mute`, `imageban`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "roleId"
                ],
                "properties": {
                  "roleId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "kind",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "roleId": {
                      "type": [
                        "null",
                        "string"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "roleId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/mute-chat-channels": {
      "post": {
        "operationId": "moderationAddMuteChatChannel",
        "summary": "Add a mute chat channel",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Adds a channel that muted members are still allowed to type in.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "channelId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channelId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "channelId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/mute-chat-channels/{channelId}": {
      "delete": {
        "operationId": "moderationRemoveMuteChatChannel",
        "summary": "Remove a mute chat channel",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Removes a channel from the mute chat channel list.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/channel-roles/{kind}": {
      "get": {
        "operationId": "moderationListChannelRoles",
        "summary": "List per-channel punishment role assignments",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Returns the channel -> role assignments for a channel-scoped punishment kind (`channelban`, `channelmute`, `channelimageban`). Unlike `mute`/`imageban`, these roles are genuinely per-channel, so this is a list rather than a single roleId.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "kind",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "roleId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "channelId",
                      "roleId"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/channel-roles/{kind}/{channelId}": {
      "put": {
        "operationId": "moderationSetChannelRole",
        "summary": "Assign a per-channel punishment role",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Assigns the role applied by the channelban/channelmute/channelimageban punishment for one specific channel.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "roleId"
                ],
                "properties": {
                  "roleId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "kind",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channelId": {
                      "type": "string"
                    },
                    "roleId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "channelId",
                    "roleId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "moderationRemoveChannelRole",
        "summary": "Remove a per-channel punishment role",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Removes the channelban/channelmute/channelimageban role assignment for one specific channel.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "kind",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/channel-roles/{kind}/{channelId}/sync": {
      "post": {
        "operationId": "moderationSyncChannelRoleOverwrites",
        "summary": "Sync channel overwrites for a per-channel punishment role",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Applies the assigned role's permission overwrite to its one channel, cross-shard. Unlike the auto-create-and-configure behavior of the equivalent prefix command, this only fixes up an already-assigned role's channel overwrite - it never creates a role. Returns `synced: false` (never a 4xx/5xx) when the bot lacks live access/permissions right now.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "kind",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "synced": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "synced"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/roles": {
      "get": {
        "operationId": "moderationListRoles",
        "summary": "List the guild's roles",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Returns the real roles in this guild, for the dashboard role pickers.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/channels": {
      "get": {
        "operationId": "moderationListChannels",
        "summary": "List the guild's channels",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Returns the real channels in this guild, for the dashboard channel pickers.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/rules": {
      "get": {
        "operationId": "moderationListRules",
        "summary": "List moderation rules",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Returns every global and custom rule for this server. Hidden rules are only included for callers with Manage Guild, matching the /rules command.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "alias": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "channel_specific": {
                        "type": "boolean"
                      },
                      "channel_restriction": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "points": {
                        "type": "number"
                      },
                      "threshold_action": {
                        "type": [
                          "null",
                          "string"
                        ]
                      },
                      "threshold_action_duration": {
                        "type": "number"
                      },
                      "halving_period": {
                        "type": "number"
                      },
                      "isGlobal": {
                        "type": "boolean"
                      },
                      "hidden": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "alias",
                      "description",
                      "channel_specific",
                      "channel_restriction",
                      "points",
                      "isGlobal",
                      "hidden"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "moderationAddRule",
        "summary": "Add a custom rule",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Creates a new custom moderation rule.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "alias",
                  "description",
                  "points"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "alias": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1
                  },
                  "points": {
                    "type": "integer"
                  },
                  "channel_specific": {
                    "type": "boolean"
                  },
                  "channel_restriction": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "alias": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "channel_specific": {
                      "type": "boolean"
                    },
                    "channel_restriction": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "points": {
                      "type": "number"
                    },
                    "threshold_action": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "threshold_action_duration": {
                      "type": "number"
                    },
                    "halving_period": {
                      "type": "number"
                    },
                    "isGlobal": {
                      "type": "boolean"
                    },
                    "hidden": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "alias",
                    "description",
                    "channel_specific",
                    "channel_restriction",
                    "points",
                    "isGlobal",
                    "hidden"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/rules/{ruleId}": {
      "put": {
        "operationId": "moderationEditRule",
        "summary": "Edit a custom rule",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Updates one or more fields of an existing custom moderation rule.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "alias": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1
                  },
                  "points": {
                    "type": "integer"
                  },
                  "channel_specific": {
                    "type": "boolean"
                  },
                  "channel_restriction": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "ruleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "alias": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "channel_specific": {
                      "type": "boolean"
                    },
                    "channel_restriction": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "points": {
                      "type": "number"
                    },
                    "threshold_action": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "threshold_action_duration": {
                      "type": "number"
                    },
                    "halving_period": {
                      "type": "number"
                    },
                    "isGlobal": {
                      "type": "boolean"
                    },
                    "hidden": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "alias",
                    "description",
                    "channel_specific",
                    "channel_restriction",
                    "points",
                    "isGlobal",
                    "hidden"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/moderation/rules/{ruleId}/hidden": {
      "put": {
        "operationId": "moderationToggleRuleHidden",
        "summary": "Hide or unhide a rule",
        "tags": [
          "Bot: Moderation"
        ],
        "description": "Sets whether a rule (global or custom) is hidden from members. Copy calling this must say \"Hide\"/\"Unhide\", never \"Delete\" - global rules and custom rules alike are never deleted through this route.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "hidden",
                  "isGlobal"
                ],
                "properties": {
                  "hidden": {
                    "type": "boolean"
                  },
                  "isGlobal": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "ruleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ruleId": {
                      "type": "string"
                    },
                    "hidden": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ruleId",
                    "hidden"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/permissions/modules": {
      "get": {
        "operationId": "permissionsListModules",
        "summary": "List module permissions",
        "tags": [
          "Bot: Permissions"
        ],
        "description": "Returns every module available in this server with its current permission state.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "modules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "everyone": {
                            "type": "boolean"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "channel_override_mode": {
                            "type": "string",
                            "enum": [
                              "blacklist",
                              "whitelist"
                            ]
                          },
                          "channel_overrides": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "default_everyone": {
                            "type": "boolean"
                          },
                          "can_disable": {
                            "type": "boolean"
                          },
                          "configured": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "modules"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/permissions/modules/{moduleName}": {
      "get": {
        "operationId": "permissionsGetModule",
        "summary": "Get one module permission entry",
        "tags": [
          "Bot: Permissions"
        ],
        "description": "Returns the permission state of a single module.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "moduleName",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "everyone": {
                      "type": "boolean"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "channel_override_mode": {
                      "type": "string",
                      "enum": [
                        "blacklist",
                        "whitelist"
                      ]
                    },
                    "channel_overrides": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "default_everyone": {
                      "type": "boolean"
                    },
                    "can_disable": {
                      "type": "boolean"
                    },
                    "configured": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "permissionsSetModule",
        "summary": "Set one module permission entry",
        "tags": [
          "Bot: Permissions"
        ],
        "description": "Updates the permission state of a single module. Omitted properties keep their current value. The permissions module itself cannot be disabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "disabled": {
                    "type": "boolean"
                  },
                  "everyone": {
                    "type": "boolean"
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "users": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "channel_override_mode": {
                    "type": "string",
                    "enum": [
                      "blacklist",
                      "whitelist"
                    ]
                  },
                  "channel_overrides": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "moduleName",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "everyone": {
                      "type": "boolean"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "channel_override_mode": {
                      "type": "string",
                      "enum": [
                        "blacklist",
                        "whitelist"
                      ]
                    },
                    "channel_overrides": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "default_everyone": {
                      "type": "boolean"
                    },
                    "can_disable": {
                      "type": "boolean"
                    },
                    "configured": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/permissions/modules/{moduleName}/reset": {
      "post": {
        "operationId": "permissionsResetModule",
        "summary": "Reset a module to its defaults",
        "tags": [
          "Bot: Permissions"
        ],
        "description": "Restores the permission state a freshly-joined server gets for this module and re-enables it.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "moduleName",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "everyone": {
                      "type": "boolean"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "channel_override_mode": {
                      "type": "string",
                      "enum": [
                        "blacklist",
                        "whitelist"
                      ]
                    },
                    "channel_overrides": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "default_everyone": {
                      "type": "boolean"
                    },
                    "can_disable": {
                      "type": "boolean"
                    },
                    "configured": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/raidroom/settings": {
      "get": {
        "operationId": "raidroomGetSettings",
        "summary": "Get raid room settings",
        "tags": [
          "Bot: RaidRoom"
        ],
        "description": "Returns the current raid room settings for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "raidroomUpdateSettings",
        "summary": "Update raid room settings",
        "tags": [
          "Bot: RaidRoom"
        ],
        "description": "Partially updates raid room settings for this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "supervisor_roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "default_type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "voice"
                    ]
                  },
                  "max_members": {
                    "type": "integer"
                  },
                  "default_members": {
                    "type": "integer"
                  },
                  "max_duration": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "default_duration": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "disable_extension": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/reddit/feeds": {
      "get": {
        "operationId": "redditListFeeds",
        "summary": "List Reddit feeds",
        "tags": [
          "Bot: Reddit"
        ],
        "description": "Lists the Reddit feed subscriptions configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Feed list.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Feed list.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "redditCreateFeed",
        "summary": "Create a Reddit feed",
        "tags": [
          "Bot: Reddit"
        ],
        "description": "Creates a new Reddit feed subscription for this server. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The created feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The created feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/reddit/feeds/{feedId}": {
      "get": {
        "operationId": "redditGetFeed",
        "summary": "Get a Reddit feed",
        "tags": [
          "Bot: Reddit"
        ],
        "description": "Fetches a single Reddit feed configuration by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "redditUpdateFeed",
        "summary": "Update a Reddit feed",
        "tags": [
          "Bot: Reddit"
        ],
        "description": "Updates a Reddit feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The updated feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The updated feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "redditDeleteFeed",
        "summary": "Delete a Reddit feed",
        "tags": [
          "Bot: Reddit"
        ],
        "description": "Deletes a Reddit feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Deletion result.",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/rss/feeds": {
      "get": {
        "operationId": "rssListFeeds",
        "summary": "List RSS feeds",
        "tags": [
          "Bot: RSS"
        ],
        "description": "Lists the RSS feed subscriptions configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Feed list.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Feed list.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "rssCreateFeed",
        "summary": "Create an RSS feed",
        "tags": [
          "Bot: RSS"
        ],
        "description": "Creates a new RSS feed subscription for this server. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The created feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The created feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/rss/feeds/{feedId}": {
      "get": {
        "operationId": "rssGetFeed",
        "summary": "Get an RSS feed",
        "tags": [
          "Bot: RSS"
        ],
        "description": "Fetches a single RSS feed configuration by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "rssUpdateFeed",
        "summary": "Update an RSS feed",
        "tags": [
          "Bot: RSS"
        ],
        "description": "Updates an RSS feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The updated feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The updated feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "rssDeleteFeed",
        "summary": "Delete an RSS feed",
        "tags": [
          "Bot: RSS"
        ],
        "description": "Deletes an RSS feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Deletion result.",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/send/messages": {
      "post": {
        "operationId": "sendMessage",
        "summary": "Send a message",
        "tags": [
          "Bot: Send"
        ],
        "description": "Sends a new message (content and/or embed) to a channel of this server via the bot.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel_id": {
                    "type": "string"
                  },
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": true
                  }
                },
                "required": [
                  "channel_id",
                  "content",
                  "embed"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "message_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message_id",
                    "channel_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "editMessage",
        "summary": "Edit a message",
        "tags": [
          "Bot: Send"
        ],
        "description": "Edits a message the bot previously sent in a channel of this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel_id": {
                    "type": "string"
                  },
                  "message_id": {
                    "type": "string"
                  },
                  "content": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": true
                  }
                },
                "required": [
                  "channel_id",
                  "message_id",
                  "content",
                  "embed"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "message_id": {
                      "type": "string"
                    },
                    "channel_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message_id",
                    "channel_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/social/multiplier": {
      "get": {
        "operationId": "socialGetMultiplier",
        "summary": "Get the EXP boost multiplier",
        "tags": [
          "Bot: Social"
        ],
        "description": "Returns the current experience-boost percentage for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "socialSetMultiplier",
        "summary": "Set the EXP boost multiplier",
        "tags": [
          "Bot: Social"
        ],
        "description": "Sets the experience-boost percentage for this server (-50 to 100, rounded down to the nearest ten).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "boost_percentage": {
                    "type": "number"
                  }
                },
                "required": [
                  "boost_percentage"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/social/exclusions": {
      "get": {
        "operationId": "socialGetExclusions",
        "summary": "Get EXP exclusions",
        "tags": [
          "Bot: Social"
        ],
        "description": "Returns the no-EXP role and no-EXP channels configured on this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "socialUpdateExclusions",
        "summary": "Update EXP exclusions",
        "tags": [
          "Bot: Social"
        ],
        "description": "Sets the no-EXP role and/or replaces the no-EXP channels list.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "noexp_role": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "noexp_channels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/social/notifications": {
      "get": {
        "operationId": "socialGetNotifications",
        "summary": "Get level-up notification settings",
        "tags": [
          "Bot: Social"
        ],
        "description": "Returns level-up notification configuration, with message templates decrypted.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "socialUpdateNotifications",
        "summary": "Update level-up notification settings",
        "tags": [
          "Bot: Social"
        ],
        "description": "Updates any subset of the level-up notification fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "lvup_notification": {
                    "type": "boolean"
                  },
                  "lvup_notification_channel": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lvup_dm": {
                    "type": "boolean"
                  },
                  "lvup_channels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "lvup_mode": {
                    "type": "string",
                    "enum": [
                      "blacklist",
                      "whitelist"
                    ]
                  },
                  "lvup_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lvup_dm_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/social/level-roles": {
      "get": {
        "operationId": "socialGetLevelRoles",
        "summary": "Get the level-role ladder",
        "tags": [
          "Bot: Social"
        ],
        "description": "Returns every configured level -> role reward, sorted ascending by level.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/social/level-roles/{level}/roles": {
      "post": {
        "operationId": "socialAddLevelRole",
        "summary": "Add a level-role reward",
        "tags": [
          "Bot: Social"
        ],
        "description": "Adds (or overwrites, if already present) a role reward for a level.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "role_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "persistent": {
                    "type": "boolean"
                  },
                  "volatile": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "role_id"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "level",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/social/level-roles/{level}/roles/{roleId}": {
      "delete": {
        "operationId": "socialRemoveLevelRole",
        "summary": "Remove a level-role reward",
        "tags": [
          "Bot: Social"
        ],
        "description": "Removes a role reward from a level, if present.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "level",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "roleId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/tools/clocks": {
      "post": {
        "operationId": "toolsCreateClockChannel",
        "summary": "Create a clock channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Creates a new clock channel with the given time zone, name template, 12-hour toggle, and/or custom UTC offset. Requires the Manage Channels and Manage Server permissions.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "time_zone"
                ],
                "properties": {
                  "time_zone": {
                    "type": "string"
                  },
                  "name_template": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "twelve_hours_time": {
                    "type": "boolean"
                  },
                  "utc_offset": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "toolsListClockChannels",
        "summary": "List clock channels",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Lists every clock channel configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/tools/clocks/{channelId}": {
      "delete": {
        "operationId": "toolsDeleteClockChannel",
        "summary": "Delete a clock channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Deletes a clock channel and its Discord voice channel. Requires the Manage Channels and Manage Server permissions. 404s if no clock channel with that id exists in this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "toolsGetClockChannel",
        "summary": "Get a clock channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Fetches a single clock channel configuration by channel id, or 404 if no clock channel with that id exists in this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "toolsUpdateClockChannel",
        "summary": "Update a clock channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Updates a clock channel time zone, name template, 12-hour toggle, and/or custom UTC offset. Requires the Manage Channels and Manage Server permissions.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "time_zone": {
                    "type": "string"
                  },
                  "name_template": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "twelve_hours_time": {
                    "type": "boolean"
                  },
                  "utc_offset": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "channelId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/tools/membercount": {
      "get": {
        "operationId": "toolsGetMemberCountChannel",
        "summary": "Get the member-count channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Fetches this server's member-count channel configuration, or null if none has been created yet.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "null",
                    "object"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "toolsUpdateMemberCountChannel",
        "summary": "Update the member-count channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Updates the member-count channel name template. Requires the Manage Channels and Manage Server permissions. 404s if no member-count channel exists yet.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name_template": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "toolsCreateMemberCountChannel",
        "summary": "Create the member-count channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Creates the member-count channel with the given name template. Requires the Manage Channels and Manage Server permissions. 403s if a member-count channel already exists (hard-capped at 1 per server).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name_template": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "toolsDeleteMemberCountChannel",
        "summary": "Delete the member-count channel",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Deletes the member-count channel and its Discord voice channel. Requires the Manage Channels and Manage Server permissions. 404s if no member-count channel exists yet.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/tools/shorten": {
      "post": {
        "operationId": "shortenUrl",
        "summary": "Shorten a URL",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Shortens the given URL via the URL-shortener service. Stateless - not tied to any server-specific settings, so no permission gate beyond the standard identity check.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "longUrl"
                ],
                "properties": {
                  "longUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "shortUrl"
                  ],
                  "properties": {
                    "shortUrl": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/trivia/games": {
      "get": {
        "operationId": "triviaListGames",
        "summary": "List trivia games",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Returns every trivia game for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/trivia/games/{triviaId}": {
      "get": {
        "operationId": "triviaGetGame",
        "summary": "Get a trivia game",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Returns a single trivia game owned by this server, or 404 if not found.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "triviaId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "triviaUpdateGame",
        "summary": "Update a trivia game",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Partially updates an Initialized trivia game for this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "channel_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "trivia_categories": {
                    "type": "array",
                    "items": {
                      "type": [
                        "string",
                        "integer"
                      ]
                    }
                  },
                  "q_interval": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "minItems": 5,
                    "maxItems": 5
                  },
                  "q_number": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "random_toggle": {
                    "type": "boolean"
                  },
                  "auto_delete": {
                    "type": "boolean"
                  },
                  "auto_delete_confirm": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "triviaId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/trivia/categories": {
      "get": {
        "operationId": "triviaListCategoryOptions",
        "summary": "List trivia category options",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Returns every trivia category (built-in and custom) available to this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/trivia/templates": {
      "get": {
        "operationId": "triviaListTemplates",
        "summary": "List trivia templates",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Returns every trivia template saved for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "triviaSaveTemplate",
        "summary": "Save a trivia template",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Saves the current configuration of a trivia game as a new template.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "trivia_id": {
                    "type": "integer"
                  }
                },
                "required": [
                  "trivia_id"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/trivia/templates/{templateId}": {
      "get": {
        "operationId": "triviaGetTemplate",
        "summary": "Get a trivia template",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Returns a single trivia template owned by this server, or 404 if not found.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "templateId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "triviaDeleteTemplate",
        "summary": "Delete a trivia template",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Deletes (soft-delete) a single trivia template owned by this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "templateId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/trivia/templates/{templateId}/load": {
      "post": {
        "operationId": "triviaLoadTemplate",
        "summary": "Load a trivia template",
        "tags": [
          "Bot: Trivia"
        ],
        "description": "Initializes a new trivia game from a saved template.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "templateId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/twitch/getUserId/{userName}": {
      "get": {
        "operationId": "twitchGetUserId",
        "summary": "Resolve a Twitch username to a user id",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Cached lookup of a Twitch user id by username.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "userName",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved user id.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Resolved user id.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/twitch/getGameId/{gameName}": {
      "get": {
        "operationId": "twitchGetGameId",
        "summary": "Resolve a Twitch game name to a game id",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Cached lookup of a Twitch game id by name.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "gameName",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved game id.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Resolved game id.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/twitch/feeds": {
      "get": {
        "operationId": "twitchListFeeds",
        "summary": "List Twitch feeds",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Lists the Twitch notification feed subscriptions configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Feed list.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Feed list.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "twitchCreateFeed",
        "summary": "Create a Twitch feed",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Creates a new Twitch notification feed subscription for this server. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The created feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The created feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/twitch/feeds/{feedId}": {
      "get": {
        "operationId": "twitchGetFeed",
        "summary": "Get a Twitch feed",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Fetches a single Twitch feed configuration by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "twitchUpdateFeed",
        "summary": "Update a Twitch feed",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Updates a Twitch feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The updated feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The updated feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "twitchDeleteFeed",
        "summary": "Delete a Twitch feed",
        "tags": [
          "Bot: Twitch"
        ],
        "description": "Deletes a Twitch feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Deletion result.",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/verification/settings": {
      "get": {
        "operationId": "verificationGetSettings",
        "summary": "Get verification settings",
        "tags": [
          "Bot: Verification"
        ],
        "description": "Returns the current verification settings for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "verificationUpdateSettings",
        "summary": "Update verification settings",
        "tags": [
          "Bot: Verification"
        ],
        "description": "Partially updates verification settings for this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "enabled_command": {
                    "type": "boolean"
                  },
                  "channel_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fallback_channel_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "remove_roles": {
                    "type": "boolean"
                  },
                  "logs_channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "stats_channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "auto_action": {
                    "type": "boolean"
                  },
                  "bypass_server": {
                    "type": "boolean"
                  },
                  "bypass_global": {
                    "type": "boolean"
                  },
                  "custom_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/verification/stats": {
      "get": {
        "operationId": "verificationGetStats",
        "summary": "Get daily verification stats",
        "tags": [
          "Bot: Verification"
        ],
        "description": "Returns verification stats for a single UTC day, defaulting to today.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/youtube/getUserId/{userName}": {
      "get": {
        "operationId": "youtubeGetUserId",
        "summary": "Resolve a YouTube channel name to a user id",
        "tags": [
          "Bot: YouTube"
        ],
        "description": "Cached lookup of a YouTube channel/user id by name.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "userName",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved user id.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Resolved user id.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/youtube/feeds": {
      "get": {
        "operationId": "youtubeListFeeds",
        "summary": "List YouTube feeds",
        "tags": [
          "Bot: YouTube"
        ],
        "description": "Lists the YouTube notification feed subscriptions configured for this server.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Feed list.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Feed list.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "youtubeCreateFeed",
        "summary": "Create a YouTube feed",
        "tags": [
          "Bot: YouTube"
        ],
        "description": "Creates a new YouTube notification feed subscription for this server. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The created feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The created feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/servers/{serverId}/modules/youtube/feeds/{feedId}": {
      "get": {
        "operationId": "youtubeGetFeed",
        "summary": "Get a YouTube feed",
        "tags": [
          "Bot: YouTube"
        ],
        "description": "Fetches a single YouTube feed configuration by id.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "youtubeUpdateFeed",
        "summary": "Update a YouTube feed",
        "tags": [
          "Bot: YouTube"
        ],
        "description": "Updates a YouTube feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The updated feed.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The updated feed.",
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "youtubeDeleteFeed",
        "summary": "Delete a YouTube feed",
        "tags": [
          "Bot: YouTube"
        ],
        "description": "Deletes a YouTube feed configuration. Requires ManageWebhooks permission.",
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "serverId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "feedId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Deletion result.",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "403": {
            "description": "User is not authorized to manage feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected internal error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bots/{botId}/invite": {
      "get": {
        "operationId": "getInviteUrl",
        "summary": "Get the bot invite URL",
        "tags": [
          "Bot: General"
        ],
        "description": "Returns a ready-to-use OAuth2 invite URL (with the bot's current permission set) plus the raw permissions bitfield, for a dashboard \"Add to Server\" button. Unauthenticated at the route level - no server or user context needed - but still subject to the gateway's standard authentication requirement like every other /api route (that gate has its own exemption list, and /invite is not on it).",
        "responses": {
          "200": {
            "description": "Invite URL and permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Invite URL and permissions.",
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "url",
                    "permissions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Internal authorization token is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/stats": {
      "get": {
        "operationId": "getBotStats",
        "summary": "Get aggregate fleet stats",
        "tags": [
          "Bot: General"
        ],
        "description": "Aggregate, non-identifying fleet stats (uptime, server count, user count, commands run) for public display - e.g. the dashboard homepage, rendered pre-login. Unauthenticated at the route level - no server or user context needed - but still subject to the gateway's standard authentication requirement like every other /api route (that gate has its own exemption list, and /stats is not on it). Never returns per-server or per-user data, only fleet-wide totals.",
        "responses": {
          "200": {
            "description": "Aggregate fleet stats.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Aggregate fleet stats.",
                  "type": "object",
                  "properties": {
                    "uptime_seconds": {
                      "type": "number",
                      "description": "Seconds since the internal API server (shard 0) last came up."
                    },
                    "server_count": {
                      "type": "number"
                    },
                    "user_count": {
                      "type": "number"
                    },
                    "commands_run": {
                      "type": "number",
                      "description": "Total slash/prefix commands ever logged fleet-wide."
                    }
                  },
                  "required": [
                    "uptime_seconds",
                    "server_count",
                    "user_count",
                    "commands_run"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Internal authorization token is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/users/me/tools/topggnotify": {
      "get": {
        "operationId": "toolsGetTopGgNotifications",
        "summary": "Get the caller's Top.gg vote-notification preference",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Returns whether the authenticated user has vote-reminder DMs enabled for this bot. `notifications` is `false` for a user who has never interacted with voting.",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      },
      "patch": {
        "operationId": "toolsUpdateTopGgNotifications",
        "summary": "Set the caller's Top.gg vote-notification preference",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Sets the exact requested value (never a toggle of the existing stored value).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "notifications"
                ],
                "properties": {
                  "notifications": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/users/me/tools/bodvalidate": {
      "get": {
        "operationId": "toolsGetBotsOnDiscordReviewStatus",
        "summary": "Get the caller's Bots on Discord review-reward claim status",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Read-only. See POST on this same path for the claim action.",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "claimed": {
                      "type": "boolean"
                    },
                    "claimed_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      },
      "post": {
        "operationId": "toolsClaimBotsOnDiscordReview",
        "summary": "Claim the caller's Bots on Discord review reward",
        "tags": [
          "Bot: Tools"
        ],
        "description": "Verifies the caller left a review for this bot on Bots on Discord (a live external API check) and, on a first-time confirmed review, awards the currency reward and records the claim. Idempotent: a caller who already claimed gets `outcome: 'already_claimed'` back instead of a second award. Replaces the retired /validatereview slash command, reusing its same anti-cheat concurrency limiter.",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "claimed": {
                      "type": "boolean"
                    },
                    "claimed_at": {
                      "type": [
                        "null",
                        "string"
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "already_claimed",
                        "not_found",
                        "claimed"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    },
    "/api/v1/bots/{botId}/ping": {
      "get": {
        "operationId": "ping",
        "summary": "Liveness check",
        "tags": [
          "Bot: General"
        ],
        "description": "Always 200 while this process is up. Distinct from /health (server.ts): this one is behind the same auth gate as every other /api route.",
        "responses": {
          "200": {
            "description": "Pong.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Pong.",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "message",
                    "timestamp"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "User is unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/def-0"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The linked bot's Discord application client ID."
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://gateway.cycloptux.com",
      "description": "Production"
    },
    {
      "url": "http://localhost:3001",
      "description": "Local development"
    }
  ],
  "tags": [
    {
      "name": "Health",
      "description": "Service health and liveness"
    },
    {
      "name": "Auth",
      "description": "Discord OAuth2 login and JWT lifecycle"
    },
    {
      "name": "Bots",
      "description": "Reverse proxy to linked bots"
    },
    {
      "name": "Discord API",
      "description": "Authenticated Discord user data, fetched with the caller's own OAuth session"
    },
    {
      "name": "Services",
      "description": "API-key-authenticated endpoints for approved machine clients (short URL creation, image classification). A service API key is not self-serve - contact contact@discomm.cc to obtain one."
    },
    {
      "name": "Bot: API",
      "description": "Bot process liveness and shard-readiness probes"
    },
    {
      "name": "Bot: Admin",
      "description": "Per-server admin module settings"
    },
    {
      "name": "Bot: Alarm",
      "description": "Per-server repeating and scheduled messages"
    },
    {
      "name": "Bot: AutoModerator",
      "description": "Per-server automated moderation rules"
    },
    {
      "name": "Bot: AzurLane",
      "description": "Per-server Azur Lane game feed module"
    },
    {
      "name": "Bot: CustomReactions",
      "description": "Per-server custom emoji-reaction triggers"
    },
    {
      "name": "Bot: EmojiSubmissions",
      "description": "Per-server emoji role submissions"
    },
    {
      "name": "Bot: Forms",
      "description": "Per-server forms module"
    },
    {
      "name": "Bot: General",
      "description": "Discord profile lookups and misc dashboard-facing utilities"
    },
    {
      "name": "Bot: Greets",
      "description": "Per-server join/leave/role-change greet messages"
    },
    {
      "name": "Bot: Logs",
      "description": "Audit log retrieval"
    },
    {
      "name": "Bot: MahjongSoul",
      "description": "Per-server Mahjong Soul game feed module"
    },
    {
      "name": "Bot: Moderation",
      "description": "Per-server moderation settings and rules"
    },
    {
      "name": "Bot: Permissions",
      "description": "Per-server dashboard module authorization"
    },
    {
      "name": "Bot: RaidRoom",
      "description": "Per-server raid room settings"
    },
    {
      "name": "Bot: Reddit",
      "description": "Per-server Reddit feed module"
    },
    {
      "name": "Bot: RSS",
      "description": "Per-server RSS feed module"
    },
    {
      "name": "Bot: Send",
      "description": "Dashboard message composer"
    },
    {
      "name": "Bot: Social",
      "description": "Per-server leveling/EXP settings"
    },
    {
      "name": "Bot: Tools",
      "description": "Per-server clock channels, member-count channels, URL shortener"
    },
    {
      "name": "Bot: Trivia",
      "description": "Per-server trivia games and templates"
    },
    {
      "name": "Bot: Twitch",
      "description": "Per-server Twitch notification module"
    },
    {
      "name": "Bot: Verification",
      "description": "Per-server member verification settings"
    },
    {
      "name": "Bot: Webhooks",
      "description": "Inbound webhook ingestion endpoints"
    },
    {
      "name": "Bot: YouTube",
      "description": "Per-server YouTube notification module"
    }
  ]
}
