> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quark.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Update log channels

> Sets the main log channel or the channel for one or more categories. Include only the fields you want to change.

Set a field to a channel ID to send that category there, or to null to make it follow the main channel again. Quark registers its webhook in each channel you set, so it needs Manage Webhooks there.



## OpenAPI

````yaml /api-reference/openapi.json patch /servers/{guild_id}/config/logging/channels
openapi: 3.1.0
info:
  title: Quark API
  version: 2.0.0
  description: Configure Quark and read your server's logs from your own code.
servers:
  - url: https://quark.bot/api
security:
  - bearerAuth: []
tags:
  - name: Configuration
    description: Read the configuration and change server settings.
  - name: Log channels
    description: Where each category of log is sent.
  - name: Logging settings
    description: Server-wide options and settings for individual log types.
  - name: Ignore options
    description: Channels, members, roles and message content left out of the logs.
  - name: Tags
    description: Saved messages posted with /tags send.
  - name: Logs
    description: Read and export the server's logs.
  - name: Notifications
    description: Recent changes to Quark's configuration.
  - name: Troubleshooting
    description: Find out why logs are missing, and fix it.
  - name: Search
    description: Look up members and channels.
  - name: Tokens
    description: List and revoke API tokens.
  - name: Server
    description: Reset the server.
paths:
  /servers/{guild_id}/config/logging/channels:
    patch:
      tags:
        - Log channels
      summary: Update log channels
      description: >-
        Sets the main log channel or the channel for one or more categories.
        Include only the fields you want to change.


        Set a field to a channel ID to send that category there, or to null to
        make it follow the main channel again. Quark registers its webhook in
        each channel you set, so it needs Manage Webhooks there.
      operationId: updateLogChannels
      parameters:
        - $ref: '#/components/parameters/GuildId'
        - $ref: '#/components/parameters/Bot'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                main_channel:
                  type:
                    - string
                    - 'null'
                  description: The main log channel.
                category_modlog:
                  type:
                    - string
                    - 'null'
                  description: Modlogs.
                category_members:
                  type:
                    - string
                    - 'null'
                  description: Members.
                category_actions:
                  type:
                    - string
                    - 'null'
                  description: Actions.
                category_text:
                  type:
                    - string
                    - 'null'
                  description: Messages.
                category_voice:
                  type:
                    - string
                    - 'null'
                  description: Voice.
                category_files:
                  type:
                    - string
                    - 'null'
                  description: Files (deleted attachments).
                category_server:
                  type:
                    - string
                    - 'null'
                  description: Server.
                category_roles:
                  type:
                    - string
                    - 'null'
                  description: Roles.
                category_channels:
                  type:
                    - string
                    - 'null'
                  description: Channels.
                category_quark:
                  type:
                    - string
                    - 'null'
                  description: Quark Events.
      responses:
        '202':
          description: Accepted.
          content:
            application/json:
              schema:
                type: object
                description: An empty object.
                example: {}
        '400':
          description: >-
            A channel could not be set. `error` says why. The status code can be
            another 4xx or 5xx code, depending on what went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: No log channels are stored for this server.
          content:
            application/json:
              schema:
                type: object
                description: An empty object.
                example: {}
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    GuildId:
      name: guild_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^\d{17,20}$
        example: '301655085954367490'
      description: The server's ID. Must be the server the token was created for.
    Bot:
      name: bot
      in: query
      required: false
      schema:
        type: string
        enum:
          - pro
      description: >-
        Set to `pro` to act on the Quark Pro bot's configuration. Leave out for
        the main Quark bot.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: No token was sent.
      content:
        application/json:
          schema:
            type: object
            description: An empty object.
            example: {}
    Forbidden:
      description: The token belongs to a different server, or is not an Admin token.
      content:
        application/json:
          schema:
            type: object
            description: An empty object.
            example: {}
    RateLimited:
      description: Too many requests. Wait for the number of seconds in `Retry-After`.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait.
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            description: An empty object.
            example: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.