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

# (Discord webhook) Approve, reject, or vote on a content update

> Service-to-service webhook for the WG Discord moderation bot. Authenticates via the shared CONTENT_UPDATE_KEY secret in the Authorization: Bearer <secret> header (NOT a user JWT or API key). When state=APPROVE, applies the underlying content change.



## OpenAPI

````yaml POST /update-content-update
openapi: 3.1.0
info:
  title: Wanderer's Guide API
  description: >-
    Public HTTP API for Wanderer's Guide, the Pathfinder 2e character builder.
    Every endpoint is a Supabase Edge Function reached via `POST
    /functions/v1/<name>`. All responses follow the
    [JSend](https://github.com/omniti-labs/jsend) convention: `{ status:
    'success' | 'fail' | 'error', data?, message? }`.
  version: 1.0.0
  contact:
    name: Wanderer's Guide Discord
    url: https://discord.com/invite/FxsFZVvedr
  license:
    name: MIT
    url: https://github.com/wanderers-guide/wanderers-guide/blob/main/LICENSE
servers:
  - url: https://api.wanderersguide.app/functions/v1
    description: Production
  - url: '{supabaseUrl}/functions/v1'
    description: Self-hosted Supabase
    variables:
      supabaseUrl:
        default: http://127.0.0.1:54321
        description: Base URL of your Supabase instance, including scheme and port.
security:
  - apiKeyAuth: []
tags:
  - name: Content
    description: 'Pathfinder 2e content: spells, items, feats, ancestries, classes, etc.'
  - name: Characters
    description: Player characters.
  - name: Campaigns
    description: Campaigns and encounters.
  - name: GM
    description: 'Game-master tools: group management, access codes.'
  - name: Users
    description: Public user profiles, account management, Patreon integration.
  - name: Search
    description: Full-text and advanced search across content.
  - name: Files
    description: User-uploaded portrait and background images.
  - name: Integrations
    description: Vector DB and Discord webhooks.
paths:
  /update-content-update:
    post:
      tags:
        - Integrations
      summary: (Discord webhook) Approve, reject, or vote on a content update
      description: >-
        Service-to-service webhook for the WG Discord moderation bot.
        Authenticates via the shared `CONTENT_UPDATE_KEY` secret in the
        `Authorization: Bearer <secret>` header (NOT a user JWT or API key).
        When state=APPROVE, applies the underlying content change.
      operationId: updateContentUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - discord_msg_id
                - discord_user_id
                - discord_user_name
                - state
              properties:
                discord_msg_id:
                  type: string
                discord_user_id:
                  type: string
                discord_user_name:
                  type: string
                state:
                  type: string
                  enum:
                    - APPROVE
                    - REJECT
                    - UPVOTE
                    - DOWNVOTE
      responses:
        '200':
          description: JSend envelope.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/JSendBoolean'
                  - $ref: '#/components/schemas/JSendFail'
                  - $ref: '#/components/schemas/JSendError'
      security: []
components:
  schemas:
    JSendBoolean:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum:
            - success
        data:
          type: boolean
    JSendFail:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum:
            - fail
        data:
          type: object
          properties:
            message:
              type: string
    JSendError:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
        data: {}
        code:
          type: integer
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key (UUID, 36 chars)
      description: >-
        API key created in your Wanderer's Guide account settings. Send as
        `Authorization: Bearer <key>`. Used for direct API access from external
        tools and scripts.

````