openapi: 3.0.0
info:
  title: eBooru OpenAPI Documentation
  description: |
    OpenAPI definition for eBooru. You can find the source [here](https://git.groovyexpress.com/edshot99/eBooruOpenAPI)<br>
  license:
    name: MIT
    url: 'https://git.groovyexpress.com/edshot99/eBooruOpenAPI/src/branch/master/LICENSE'
  termsOfService: 'https://groovyexpress.tv/static/terms_of_service'
  version: 1acda4e
servers:
  - url: 'https://groovyexpress.tv'
    description: GroovyExpressTV (Production)
  - url: 'https://ebooru.my.domain'
    description: eBooru (Development)
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  parameters:
    id:
      name: 'search[id]'
      in: query
      description: Search for a specific id.
      schema:
        type: integer
    idOrName:
      name: idOrName
      in: path
      required: true
      schema:
        type: string
      description: An ID that can be either an integer or a name.
    limit:
      name: limit
      in: query
      description: The maximum number of results to return. Between 0 and 320.
      schema:
        type: integer
        minimum: 0
        maximum: 500
    page:
      name: page
      in: query
      description: The page number of results to get. Between 1 and 750.
      schema:
        type: integer
        minimum: 1
        maximum: 750
    ip_addr:
      name: 'search[ip_addr]'
      in: query
      description: 'Must be Admin+ to use. See [postgres'' documentation](https://www.postgresql.org/docs/9.3/functions-net.html) for information on how this is parsed. Specifically, "is contained within or equals" (`<<=`).'
      schema:
        type: string
  schemas:
    AccessDeniedResponse:
      type: object
      required:
        - success
        - reason
      properties:
        success:
          type: boolean
        reason:
          type: string
          enum:
            - Access Denied
    NotFoundResponse:
      type: object
      required:
        - success
        - reason
      properties:
        success:
          type: boolean
        reason:
          type: string
          enum:
            - not found
    WarningRecordType:
      type: object
      required:
        - record_type
      properties:
        record_type:
          type: string
          enum:
            - unmark
            - ban
            - record
            - warning
    ModActionActions:
      type: string
      enum:
        - artist_page_rename
        - artist_page_lock
        - artist_page_unlock
        - artist_user_linked
        - artist_user_unlinked
        - avoid_posting_create
        - avoid_posting_update
        - avoid_posting_delete
        - avoid_posting_undelete
        - avoid_posting_destroy
        - blip_delete
        - blip_hide
        - blip_unhide
        - blip_update
        - comment_delete
        - comment_hide
        - comment_unhide
        - comment_update
        - forum_category_create
        - forum_category_delete
        - forum_category_update
        - forum_post_delete
        - forum_post_hide
        - forum_post_unhide
        - forum_post_update
        - forum_topic_delete
        - forum_topic_hide
        - forum_topic_unhide
        - forum_topic_lock
        - forum_topic_unlock
        - forum_topic_stick
        - forum_topic_unstick
        - forum_topic_update
        - help_create
        - help_delete
        - help_update
        - ip_ban_create
        - ip_ban_delete
        - mascot_create
        - mascot_update
        - mascot_delete
        - pool_delete
        - report_reason_create
        - report_reason_delete
        - report_reason_update
        - set_update
        - set_delete
        - set_change_visibility
        - tag_alias_create
        - tag_alias_update
        - tag_implication_create
        - tag_implication_update
        - ticket_claim
        - ticket_unclaim
        - ticket_update
        - upload_whitelist_create
        - upload_whitelist_update
        - upload_whitelist_delete
        - user_blacklist_changed
        - user_text_change
        - user_upload_limit_change
        - user_flags_change
        - user_level_change
        - user_name_change
        - user_delete
        - user_ban
        - user_ban_update
        - user_unban
        - user_feedback_create
        - user_feedback_update
        - user_feedback_delete
        - user_feedback_undelete
        - user_feedback_destroy
        - wiki_page_rename
        - wiki_page_delete
        - wiki_page_lock
        - wiki_page_unlock
        - mass_update
        - nuke_tag
        - takedown_delete
        - takedown_process
        - user_flush_favorites
        - post_version_hide
        - post_version_unhide
        - user_uploads_toggle
        - staff_note_create
        - staff_note_update
        - staff_note_delete
        - staff_note_undelete
        - created_positive_record
        - created_neutral_record
        - created_negative_record
        - created_flag_reason
        - edited_flag_reason
        - deleted_flag_reason
        - post_move_favorites
        - post_delete
        - post_undelete
        - post_destroy
        - post_rating_lock
        - post_unapprove
        - post_replacement_accept
        - post_replacement_reject
        - post_replacement_delete
    PostEventActions:
      type: string
      enum:
        - deleted
        - undeleted
        - approved
        - unapproved
        - flag_created
        - flag_removed
        - favorites_moved
        - favorites_received
        - rating_locked
        - rating_unlocked
        - status_locked
        - status_unlocked
        - note_locked
        - note_unlocked
        - comment_locked
        - comment_unlocked
        - replacement_accepted
        - replacement_rejected
        - replacement_promoted
        - replacement_deleted
        - expunged
        - changed_bg_color
        - replacement_penalty_changed
    Ratings:
      type: string
      enum:
        - s
        - q
        - e
    TagCategories:
      type: integer
      enum:
        - 0
        - 1
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
    FeedbackCategories:
      type: string
      enum:
        - negative
        - neutral
        - positive
    TagRequestStatuses:
      type: string
      enum:
        - active
        - deleted
        - processing
        - queued
        - retired
        - error
        - pending
    WarningTypes:
      type: string
      enum:
        - warning
        - record
        - ban
    PoolCategories:
      type: string
      enum:
        - collection
        - series
    TicketTypes:
      type: string
      enum:
        - blip
        - comment
        - dmail
        - forum
        - pool
        - post
        - set
        - user
        - wiki
    TicketStatuses:
      type: string
      enum:
        - pending
        - partial
        - approved
    Artist:
      type: object
      required:
        - id
        - name
        - updated_at
        - is_active
        - other_names
        - group_name
        - banner_id
        - avatar_id
        - linked_user_id
        - created_at
        - creator_id
        - is_locked
        - notes
        - urls
      properties:
        id:
          type: integer
        name:
          type: string
        updated_at:
          type: string
          format: date-time
        is_active:
          type: boolean
        other_names:
          type: array
          items:
            type: string
        group_name:
          type: string
        banner_id:
          type: string
        avatar_id:
          type: string
        linked_user_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        creator_id:
          type: integer
        is_locked:
          type: boolean
        notes:
          type: string
          nullable: true
    ArtistURL:
      type: object
      required:
        - id
        - artist_id
        - url
        - normalized_url
        - created_at
        - updated_at
        - is_active
      properties:
        id:
          type: integer
        artist_id:
          type: integer
        url:
          type: string
          format: uri
        normalized_url:
          type: string
          format: uri
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_active:
          type: boolean
    ArtistVersion:
      type: object
      required:
        - id
        - artist_id
        - name
        - updater_id
        - created_at
        - updated_at
        - is_active
        - other_names
        - notes_changed
        - banner_id
        - avatar_id
        - urls
      properties:
        id:
          type: integer
        artist_id:
          type: integer
        name:
          type: string
        updater_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_active:
          type: boolean
        other_names:
          type: array
          items:
            type: string
        notes_changed:
          type: boolean
        banner_id:
          type: string
        avatar_id:
          type: string
        urls:
          type: array
          items:
            type: string
            format: uri
    AvoidPosting:
      type: object
      required:
        - id
        - creator_id
        - updater_id
        - artist_id
        - details
        - is_active
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        updater_id:
          type: integer
        artist_id:
          type: integer
        staff_notes:
          type: string
          description: Only visible to Janitor+
        details:
          type: string
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AvoidPostingVersion:
      type: object
      required:
        - id
        - updater_id
        - avoid_posting_id
        - details
        - is_active
        - updated_at
      properties:
        id:
          type: integer
        updater_id:
          type: integer
        avoid_posting_id:
          type: integer
        details:
          type: string
        staff_notes:
          type: string
          description: Only visible to Janitor+
        is_active:
          type: boolean
        updated_at:
          type: string
          format: date-time
    Ban:
      type: object
      required:
        - id
        - user_id
        - reason
        - expires_at
        - banner_id
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        user_id:
          type: integer
        reason:
          type: string
        expires_at:
          type: string
          format: date-time
          nullable: true
        banner_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Blip:
      type: object
      required:
        - id
        - creator_id
        - body
        - response_to
        - created_at
        - updated_at
        - is_hidden
        - warning_type
        - warning_user_id
        - updater_id
        - creator_name
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        body:
          type: string
        response_to:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_hidden:
          type: boolean
        warning_type:
          $ref: '#/components/schemas/WarningTypes'
        warning_user_id:
          type: integer
        updater_id:
          type: integer
        creator_name:
          type: string
    BulkRelatedTag:
      allOf:
        - $ref: '#/components/schemas/RelatedTag'
        - type: object
          required:
            - count
          properties:
            count:
              type: integer
    BulkUpdateRequest:
      type: object
      required:
        - id
        - creator_id
        - forum_topic_id
        - script
        - status
        - created_at
        - updated_at
        - approver_id
        - forum_post_id
        - title
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        forum_topic_id:
          type: integer
          nullable: true
        script:
          type: string
          example:
            - alias a -> b
        status:
          type: string
          enum:
            - approved
            - rejected
            - pending
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        approver_id:
          type: integer
          nullable: true
        forum_post_id:
          type: integer
          nullable: true
        title:
          type: string
    Comment:
      type: object
      required:
        - id
        - created_at
        - post_id
        - creator_id
        - body
        - score
        - updated_at
        - updater_id
        - do_not_bump_post
        - is_hidden
        - is_sticky
        - warning_type
        - warning_user_id
        - creator_name
        - updater_name
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        post_id:
          type: integer
        creator_id:
          type: integer
        body:
          type: string
        score:
          type: integer
        updated_at:
          type: string
          format: date-time
        updater_id:
          type: integer
        do_not_bump_post:
          type: boolean
          deprecated: true
        is_hidden:
          type: boolean
        is_sticky:
          type: boolean
        warning_type:
          $ref: '#/components/schemas/WarningTypes'
        warning_user_id:
          type: integer
          nullable: true
        creator_name:
          type: string
        updater_name:
          type: string
    CurrentUser:
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          required:
            - blacklist_users
            - description_collapsed_initially
            - hide_comments
            - show_hidden_comments
            - show_post_statistics
            - receive_email_notifications
            - enable_keyboard_navigation
            - enable_privacy_mode
            - style_usernames
            - enable_auto_complete
            - disable_cropped_thumbnails
            - enable_safe_mode
            - disable_responsive_mode
            - no_flagging
            - disable_user_dmails
            - enable_compact_uploader
            - replacements_beta
            - updated_at
            - email
            - last_logged_in_at
            - last_forum_read_at
            - recent_tags
            - comment_threshold
            - default_image_size
            - favorite_tags
            - blacklisted_tags
            - time_zone
            - per_page
            - custom_style
            - favorite_count
            - api_regen_multiplier
            - api_burst_limit
            - remaining_api_limit
            - statement_timeout
            - favorite_limit
            - tag_query_limit
            - has_mail
            - forum_notification_dot
          properties:
            blacklist_users:
              type: boolean
            description_collapsed_initially:
              type: boolean
            hide_comments:
              type: boolean
            show_hidden_comments:
              type: boolean
            show_post_statistics:
              type: boolean
            receive_email_notifications:
              type: boolean
            enable_keyboard_navigation:
              type: boolean
            enable_privacy_mode:
              type: boolean
            style_usernames:
              type: boolean
            enable_auto_complete:
              type: boolean
            can_approve_posts:
              type: boolean
            disable_cropped_thumbnails:
              type: boolean
            enable_safe_mode:
              type: boolean
            disable_responsive_mode:
              type: boolean
            no_flagging:
              type: boolean
            disable_user_dmails:
              type: boolean
            enable_compact_uploader:
              type: boolean
            replacements_beta:
              type: boolean
            updated_at:
              type: string
              format: date-time
            email:
              type: string
            last_logged_in_at:
              type: string
            last_forum_read_at:
              type: string
            recent_tags:
              type: string
            comment_threshold:
              type: integer
            default_image_size:
              type: string
              enum:
                - large
                - fit
                - fitv
                - original
            favorite_tags:
              type: string
            blacklisted_tags:
              type: string
            time_zone:
              type: string
            per_page:
              type: integer
            custom_style:
              type: string
            favorite_count:
              type: integer
            api_regen_multiplier:
              type: integer
            api_burst_limit:
              type: integer
            remaining_api_limit:
              type: integer
            statement_timeout:
              type: integer
            favorite_limit:
              type: integer
            tag_query_limit:
              type: integer
            has_mail:
              type: boolean
            forum_notification_dot:
              type: boolean
    DMail:
      type: object
      required:
        - id
        - owner_id
        - from_id
        - to_id
        - title
        - body
        - is_read
        - is_deleted
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        owner_id:
          type: integer
        from_id:
          type: integer
        to_id:
          type: integer
        title:
          type: string
        body:
          type: string
        is_read:
          type: boolean
        is_deleted:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DeferredPost:
      type: object
      required:
        - id
        - flags
        - tags
        - rating
        - file_ext
        - width
        - height
        - size
        - created_at
        - uploader
        - uploader_id
        - score
        - fav_count
        - is_favorited
        - pools
        - md5
        - preview_url
        - large_url
        - file_url
        - preview_width
        - preview_height
      properties:
        id:
          type: integer
        flags:
          type: string
        tags:
          type: string
        rating:
          $ref: '#/components/schemas/Ratings'
        file_ext:
          type: string
        width:
          type: integer
        height:
          type: integer
        size:
          type: integer
          format: int64
        created_at:
          type: string
          format: date-time
        uploader:
          type: string
        uploader_id:
          type: integer
        score:
          type: integer
        fav_count:
          type: integer
        is_favorited:
          type: boolean
        pools:
          type: array
          items:
            type: integer
        md5:
          type: string
        preview_url:
          type: string
          nullable: true
        large_url:
          type: string
          nullable: true
        file_url:
          type: string
          nullable: true
        preview_width:
          type: integer
        preview_height:
          type: integer
    DTextResponse:
      type: object
      required:
        - html
        - posts
      properties:
        html:
          type: string
        posts:
          $ref: '#/components/schemas/DeferredPost'
    EmailBlacklist:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - domain
        - creator_id
        - reason
      properties:
        id:
          type: integer
        created_at:
          type: string
        updated_at:
          type: string
        domain:
          type: string
        creator_id:
          type: string
        reason:
          type: string
    ForumPost:
      type: object
      required:
        - id
        - topic_id
        - creator_id
        - updater_id
        - body
        - is_hidden
        - created_at
        - updated_at
        - warning_type
        - warning_user_id
      properties:
        id:
          type: integer
        topic_id:
          type: integer
        creator_id:
          type: integer
        updater_id:
          type: integer
        body:
          type: string
        is_hidden:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        warning_type:
          $ref: '#/components/schemas/WarningTypes'
        warning_user_id:
          type: integer
          nullable: true
    ForumPostVote:
      type: object
      required:
        - id
        - forum_post_id
        - creator_id
        - score
        - created_at
        - updated_at
        - creator_name
      properties:
        id:
          type: integer
        forum_post_id:
          type: integer
        creator_id:
          type: integer
        score:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        creator_name:
          type: string
    ForumTopic:
      type: object
      required:
        - id
        - creator_id
        - updater_id
        - title
        - response_count
        - is_sticky
        - is_locked
        - is_hidden
        - created_at
        - updated_at
        - category_id
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        updater_id:
          type: integer
        title:
          type: string
        response_count:
          type: integer
        is_sticky:
          type: boolean
        is_locked:
          type: boolean
        is_hidden:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        category_id:
          type: integer
    FullCurrentUser:
      allOf:
        - $ref: '#/components/schemas/CurrentUser'
        - $ref: '#/components/schemas/FullUser'
    FullUser:
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          required:
            - wiki_page_version_count
            - artist_version_count
            - pool_version_count
            - forum_post_count
            - comment_count
            - flag_count
            - favorite_count
            - positive_feedback_count
            - neutral_feedback_count
            - negative_feedback_count
            - upload_limit
            - profile_about
            - profile_artinfo
          properties:
            wiki_page_version_count:
              type: integer
            artist_version_count:
              type: integer
            pool_version_count:
              type: integer
            forum_post_count:
              type: integer
            comment_count:
              type: integer
            flag_count:
              type: integer
            favorite_count:
              type: integer
            positive_feedback_count:
              type: integer
            neutral_feedback_count:
              type: integer
            negative_feedback_count:
              type: integer
            upload_limit:
              type: integer
            profile_about:
              type: string
            profile_artinfo:
              type: string
    Help:
      type: object
      required:
        - id
        - name
        - title
        - wiki_page
        - related
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        name:
          type: string
        title:
          type: string
        wiki_page:
          type: string
        related:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    IPBan:
      type: object
      description: 'Due to a global filter, the ip_addr is not present no matter your user level.'
      required:
        - id
        - creator_id
        - reason
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        reason:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    IQDBPost:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - up_score
        - down_score
        - score
        - source
        - md5
        - rating
        - is_note_locked
        - is_rating_locked
        - is_status_locked
        - is_pending
        - is_flagged
        - is_deleted
        - uploader_id
        - approver_id
        - last_noted_at
        - last_comment_bumped_at
        - fav_count
        - tag_string
        - tag_count
        - tag_count_general
        - tag_count_artist
        - tag_count_character
        - tag_count_copyright
        - file_ext
        - file_size
        - image_width
        - image_height
        - parent_id
        - has_children
        - last_commented_at
        - has_active_children
        - bit_flags
        - tag_count_meta
        - locked_tags
        - tag_count_species
        - tag_count_invalid
        - description
        - comment_count
        - change_seq
        - tag_count_lore
        - bg_color
        - generated_samples
        - duration
        - is_comment_disabled
        - is_comment_locked
        - has_large
        - has_visible_children
        - children_ids
        - pool_ids
        - is_favorited
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        up_score:
          type: integer
        down_score:
          type: integer
        score:
          type: integer
        source:
          type: string
        md5:
          type: string
        rating:
          $ref: '#/components/schemas/Ratings'
        is_note_locked:
          type: boolean
        is_rating_locked:
          type: boolean
        is_status_locked:
          type: boolean
        is_pending:
          type: boolean
        is_flagged:
          type: boolean
        is_deleted:
          type: boolean
        uploader_id:
          type: integer
        approver_id:
          type: integer
        last_noted_at:
          type: string
          format: date-time
          nullable: true
        last_comment_bumped_at:
          type: string
          format: date-time
          nullable: true
        fav_count:
          type: integer
        tag_string:
          type: string
        tag_count:
          type: integer
        tag_count_general:
          type: integer
        tag_count_artist:
          type: integer
        tag_count_character:
          type: integer
        tag_count_copyright:
          type: integer
        file_ext:
          type: string
        file_size:
          type: integer
          format: int64
        image_width:
          type: integer
        image_height:
          type: integer
        parent_id:
          type: integer
          nullable: true
        has_children:
          type: boolean
        last_commented_at:
          type: string
          format: date-time
          nullable: true
        has_active_children:
          type: boolean
        bit_flags:
          type: number
        tag_count_meta:
          type: integer
        locked_tags:
          type: string
          nullable: true
        tag_count_species:
          type: integer
        tag_count_invalid:
          type: integer
        description:
          type: string
        comment_count:
          type: integer
        change_seq:
          type: integer
        tag_count_lore:
          type: integer
        bg_color:
          type: string
          nullable: true
        generated_samples:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - 720p
              - 480p
              - original
        duration:
          type: string
          nullable: true
        is_comment_disabled:
          type: boolean
        is_comment_locked:
          type: boolean
        has_large:
          type: boolean
        has_visible_children:
          type: boolean
        children_ids:
          type: string
          nullable: true
        pool_ids:
          type: array
          items:
            type: integer
        is_favorited:
          type: boolean
        file_url:
          type: string
        large_file_url:
          type: string
        preview_file_url:
          type: string
    IQDBResponse:
      type: object
      required:
        - hash
        - post_id
        - score
        - post
      properties:
        hash:
          type: string
        post_id:
          type: integer
        score:
          type: integer
        post:
          type: object
          required:
            - posts
          properties:
            posts:
              $ref: '#/components/schemas/IQDBPost'
    Mascot:
      type: object
      required:
        - id
        - creator_id
        - display_name
        - md5
        - file_ext
        - background_color
        - artist_url
        - artist_name
        - active
        - created_at
        - updated_at
        - available_on
        - url_path
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        display_name:
          type: string
        md5:
          type: string
        file_ext:
          type: string
        background_color:
          type: string
        artist_url:
          type: string
          format: uri
        artist_name:
          type: string
        active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        available_on:
          type: array
          items:
            type: string
        url_path:
          type: string
          format: uri
    ModAction:
      type: object
      required:
        - id
        - creator_id
        - created_at
        - updated_at
        - action
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        action:
          $ref: '#/components/schemas/ModActionActions'
    NewsUpdate:
      type: object
      required:
        - id
        - message
        - creator_id
        - updater_id
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        message:
          type: string
        creator_id:
          type: integer
        updater_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Note:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - creator_id
        - x
        - 'y'
        - width
        - height
        - version
        - is_active
        - post_id
        - body
        - creator_name
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        creator_id:
          type: integer
        x:
          type: integer
        'y':
          type: integer
        width:
          type: integer
        height:
          type: integer
        version:
          type: number
        is_active:
          type: boolean
        post_id:
          type: integer
        body:
          type: string
        creator_name:
          type: string
    NoteVersion:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - x
        - 'y'
        - width
        - height
        - body
        - version
        - is_active
        - note_id
        - post_id
        - updater_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        x:
          type: integer
        'y':
          type: integer
        width:
          type: integer
        height:
          type: integer
        body:
          type: string
        version:
          type: number
        is_active:
          type: boolean
        note_id:
          type: integer
        post_id:
          type: integer
        updater_id:
          type: integer
    Pool:
      type: object
      required:
        - id
        - name
        - created_at
        - updated_at
        - creator_id
        - description
        - is_active
        - category
        - post_ids
        - creator_name
        - post_count
      properties:
        id:
          type: integer
        name:
          type: string
        updated_at:
          type: string
          format: date-time
        creator_id:
          type: integer
        description:
          type: string
        is_active:
          type: boolean
        category:
          $ref: '#/components/schemas/PoolCategories'
        post_ids:
          type: array
          items:
            type: integer
        created_at:
          type: string
          format: date-time
        creator_name:
          type: string
        post_count:
          type: integer
    PoolVersion:
      type: object
      required:
        - id
        - pool_id
        - post_ids
        - updater_id
        - created_at
        - updated_at
        - name
        - name_changed
        - description
        - description_changed
        - is_active
        - is_locked
        - category
        - version
        - added_post_ids
        - removed_post_ids
      properties:
        id:
          type: integer
        pool_id:
          type: integer
        post_ids:
          type: array
          items:
            type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        updater_id:
          type: integer
        name:
          type: string
        name_changed:
          type: boolean
        description:
          type: string
        description_changed:
          type: boolean
        is_active:
          type: boolean
        is_locked:
          type: boolean
        category:
          $ref: '#/components/schemas/PoolCategories'
        version:
          type: number
        added_post_ids:
          type: array
          items:
            type: integer
        removed_post_ids:
          type: array
          items:
            type: integer
    Post:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - file
        - preview
        - sample
        - score
        - tags
        - locked_tags
        - change_seq
        - flags
        - rating
        - fav_count
        - sources
        - pools
        - relationships
        - approver_id
        - uploader_id
        - title
        - description
        - transcript
        - comment_count
        - is_favorited
        - has_notes
        - duration
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        file:
          type: object
          required:
            - width
            - height
            - ext
            - size
            - md5
            - url
          properties:
            width:
              type: integer
            height:
              type: integer
            ext:
              type: string
            size:
              type: integer
              format: int64
            md5:
              type: string
            url:
              type: string
              nullable: true
        preview:
          type: object
          required:
            - width
            - height
            - url
          properties:
            width:
              type: integer
            height:
              type: integer
            url:
              type: string
              nullable: true
        sample:
          type: object
          required:
            - has
            - height
            - width
            - url
            - alternates
          properties:
            has:
              type: boolean
            height:
              type: integer
              nullable: true
            width:
              type: integer
              nullable: true
            url:
              type: string
              nullable: true
            alternates:
              type: object
              properties:
                has:
                  type: boolean
                original:
                  $ref: '#/components/schemas/PostSampleAlternate'
                variants:
                  type: object
                  properties:
                    webm:
                      $ref: '#/components/schemas/PostSampleAlternate'
                    mp4:
                      $ref: '#/components/schemas/PostSampleAlternate'
                samples:
                  type: object
                  properties:
                    480p:
                      $ref: '#/components/schemas/PostSampleAlternate'
                    720p:
                      $ref: '#/components/schemas/PostSampleAlternate'
        score:
          type: object
          required:
            - up
            - down
            - total
          properties:
            up:
              type: integer
            down:
              type: integer
            total:
              type: integer
        tags:
          type: object
          required:
            - general
            - artist
            - copyright
            - character
            - species
            - invalid
            - meta
            - lore
            - contributor
          properties:
            general:
              type: array
              items:
                type: string
            artist:
              type: array
              items:
                type: string
            copyright:
              type: array
              items:
                type: string
            character:
              type: array
              items:
                type: string
            species:
              type: array
              items:
                type: string
            invalid:
              type: array
              items:
                type: string
            meta:
              type: array
              items:
                type: string
            lore:
              type: array
              items:
                type: string
            contributor:
              type: array
              items:
                type: string
        locked_tags:
          type: array
          nullable: true
          items:
            type: string
        change_seq:
          type: number
        flags:
          type: object
          required:
            - pending
            - flagged
            - note_locked
            - status_locked
            - rating_locked
            - deleted
          properties:
            pending:
              type: boolean
            flagged:
              type: boolean
            note_locked:
              type: boolean
            status_locked:
              type: boolean
            rating_locked:
              type: boolean
            deleted:
              type: boolean
        rating:
          $ref: '#/components/schemas/Ratings'
        fav_count:
          type: integer
        sources:
          type: array
          items:
            type: string
        pools:
          type: array
          items:
            type: integer
        relationships:
          type: object
          required:
            - parent_id
            - has_children
            - has_active_children
            - children
          properties:
            parent_id:
              type: integer
              nullable: true
            has_children:
              type: boolean
            has_active_children:
              type: boolean
            children:
              type: array
              items:
                type: integer
        approver_id:
          type: integer
          nullable: true
        uploader_id:
          type: integer
        title:
          type: string
        description:
          type: string
        transcript:
          type: string
        comment_count:
          type: integer
        is_favorited:
          type: boolean
        has_notes:
          type: boolean
        duration:
          type: number
          nullable: true
    PostApproval:
      type: object
      required:
        - id
        - user_id
        - post_id
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        user_id:
          type: integer
        post_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PostDisapproval:
      type: object
      required:
        - id
        - user_id
        - post_id
        - reason
        - message
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        user_id:
          type: integer
        post_id:
          type: integer
        reason:
          type: string
          enum:
            - borderline_quality
            - borderline_relevancy
            - other
        message:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PostEvent:
      type: object
      required:
        - id
        - creator_id
        - post_id
        - action
        - created_at
      properties:
        id:
          type: integer
        creator_id:
          type: integer
          nullable: true
        post_id:
          type: integer
        action:
          $ref: '#/components/schemas/PostEventActions'
        created_at:
          type: string
          format: date-time
    PostFlag:
      type: object
      required:
        - id
        - created_at
        - post_id
        - reason
        - creator_id
        - is_resolved
        - updated_at
        - is_deletion
        - type
        - note
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        post_id:
          type: integer
        reason:
          type: string
        creator_id:
          type: integer
          nullable: true
        is_resolved:
          type: boolean
        updated_at:
          type: string
          format: date-time
        is_deletion:
          type: boolean
        type:
          type: string
          enum:
            - flag
            - deletion
        note:
          type: string
          nullable: true
    PostReplacement:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - post_id
        - creator_id
        - approver_id
        - file_ext
        - file_size
        - image_height
        - image_width
        - md5
        - source
        - file_name
        - status
        - reason
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        post_id:
          type: integer
        creator_id:
          type: integer
        approver_id:
          type: integer
          nullable: true
        file_ext:
          type: string
        file_size:
          type: integer
          format: int64
        image_height:
          type: integer
        image_width:
          type: integer
        md5:
          type: string
        source:
          type: string
        file_name:
          type: string
        status:
          type: string
          enum:
            - prompted
            - approved
            - rejected
            - pending
            - original
        reason:
          type: string
    PostSampleAlternate:
      type: object
      required:
        - fps
        - codec
        - size
        - width
        - height
        - url
      properties:
        fps:
          type: number
          format: float
        codec:
          type: string
        size:
          type: integer
          format: int64
        width:
          type: integer
        height:
          type: integer
        url:
          type: string
          format: uri
    PostSet:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - creator_id
        - is_public
        - name
        - shortname
        - description
        - transfer_on_delete
        - post_ids
        - post_count
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        creator_id:
          type: integer
        is_public:
          type: boolean
        name:
          type: string
        shortname:
          type: string
        description:
          type: string
        post_count:
          type: integer
        transfer_on_delete:
          type: boolean
        post_ids:
          type: array
          items:
            type: integer
    PostVersion:
      type: object
      required:
        - id
        - post_id
        - tags
        - updater_id
        - updated_at
        - rating
        - parent_id
        - source
        - title
        - description
        - transcript
        - reason
        - locked_tags
        - added_tags
        - removed_tags
        - added_locked_tags
        - removed_locked_tags
        - rating_changed
        - parent_changed
        - source_changed
        - title_changed
        - description_changed
        - transcript_changed
        - version
        - obsolete_added_tags
        - obsolete_removed_tags
        - unchanged_tags
        - updater_name
        - is_hidden
      properties:
        id:
          type: integer
        post_id:
          type: integer
        tags:
          type: string
        updater_id:
          type: integer
        updated_at:
          type: string
          format: date-time
        rating:
          $ref: '#/components/schemas/Ratings'
        parent_id:
          type: integer
          nullable: true
        source:
          type: string
        title:
          type: string
        description:
          type: string
        transcript:
          type: string
        reason:
          type: string
          nullable: true
        locked_tags:
          type: string
          nullable: true
        added_tags:
          type: array
          items:
            type: string
        removed_tags:
          type: array
          items:
            type: string
        added_locked_tags:
          type: array
          items:
            type: string
        removed_locked_tags:
          type: array
          items:
            type: string
        rating_changed:
          type: boolean
        parent_changed:
          type: boolean
        source_changed:
          type: boolean
        title_changed:
          type: boolean
        description_changed:
          type: boolean
        transcript_changed:
          type: boolean
        version:
          type: number
        obsolete_added_tags:
          type: string
        obsolete_removed_tags:
          type: string
        unchanged_tags:
          type: string
        updater_name:
          type: string
        is_hidden:
          type: boolean
    RelatedTag:
      type: object
      required:
        - name
        - category_id
      properties:
        name:
          type: string
        category_id:
          $ref: '#/components/schemas/TagCategories'
    StaffNote:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - user_id
        - creator_id
        - body
        - is_deleted
        - updater_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        user_id:
          type: integer
        creator_id:
          type: integer
        body:
          type: string
        is_deleted:
          type: boolean
        updater_id:
          type: integer
    Tag:
      type: object
      required:
        - id
        - name
        - post_count
        - related_tags
        - related_tags_updated_at
        - category
        - is_locked
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        name:
          type: string
        post_count:
          type: integer
        related_tags:
          type: array
          items:
            type: string
        related_tags_updated_at:
          type: string
          nullable: true
          format: date-time
        category:
          $ref: '#/components/schemas/TagCategories'
        is_locked:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TagAlias:
      type: object
      required:
        - id
        - antecedent_name
        - reason
        - creator_id
        - created_at
        - forum_post_id
        - updated_at
        - forum_topic_id
        - consequent_name
        - status
        - post_count
        - approver_id
      properties:
        id:
          type: integer
        antecedent_name:
          type: string
        reason:
          type: string
        creator_id:
          type: integer
        created_at:
          type: string
          nullable: true
          format: date-time
        forum_post_id:
          type: integer
          nullable: true
        updated_at:
          type: string
          nullable: true
          format: date-time
        forum_topic_id:
          type: integer
          nullable: true
        consequent_name:
          type: string
        status:
          $ref: '#/components/schemas/TagRequestStatuses'
        post_count:
          type: integer
        approver_id:
          type: integer
          nullable: true
    TagImplication:
      type: object
      required:
        - id
        - reason
        - creator_id
        - created_at
        - forum_post_id
        - antecedent_name
        - consequent_name
        - status
        - forum_topic_id
        - updated_at
        - descendant_names
        - approver_id
      properties:
        id:
          type: integer
        reason:
          type: string
        creator_id:
          type: integer
        created_at:
          type: string
          format: date-time
        forum_post_id:
          type: integer
          nullable: true
        antecedent_name:
          type: string
        consequent_name:
          type: string
        status:
          $ref: '#/components/schemas/TagRequestStatuses'
        forum_topic_id:
          type: integer
          nullable: true
        updated_at:
          type: string
          format: date-time
        descendant_names:
          type: array
          items:
            type: string
        approver_id:
          type: integer
          nullable: true
    TagPreview:
      type: object
      required:
        - name
      properties:
        id:
          type: integer
        name:
          type: string
        resolved:
          type: string
        category:
          $ref: '#/components/schemas/TagCategories'
        post_count:
          type: integer
        alias:
          type: string
        implies:
          type: array
          items:
            type: string
    TagTypeVersion:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - old_type
        - new_type
        - is_locked
        - tag_id
        - creator_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        old_type:
          $ref: '#/components/schemas/TagCategories'
        new_type:
          $ref: '#/components/schemas/TagCategories'
        is_locked:
          type: boolean
        tag_id:
          type: integer
        creator_id:
          type: integer
    Takedown:
      type: object
      required:
        - id
        - status
        - approver_id
        - reason_hidden
        - created_at
        - updated_at
        - post_count
      properties:
        id:
          type: integer
        status:
          type: string
          enum:
            - approved
            - denied
            - partial
            - pending
        approver_id:
          type: integer
          nullable: true
        reason_hidden:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        post_count:
          type: integer
    Ticket:
      type: object
      required:
        - id
        - creator_id
        - reason
        - disp_id
        - qtype
        - status
        - created_at
        - updated_at
        - response
        - handler_id
        - report_reason
        - accused_id
      properties:
        id:
          type: integer
        creator_id:
          type: integer
        reason:
          type: string
        disp_id:
          type: number
        qtype:
          $ref: '#/components/schemas/TicketTypes'
        status:
          $ref: '#/components/schemas/TicketStatuses'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        response:
          type: string
        handler_id:
          type: integer
          nullable: true
        claimant_id:
          type: integer
          nullable: true
          description: Only visible to Moderator+.
        report_reason:
          type: string
          nullable: true
        accused_id:
          type: integer
          nullable: true
    UploadWhitelist:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - pattern
        - note
        - hidden
        - allowed
        - reason
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        pattern:
          type: string
        note:
          type: string
        hidden:
          type: boolean
        allowed:
          type: boolean
        reason:
          type: string
    Upload:
      type: object
      required:
        - id
        - source
        - rating
        - uploader_id
        - tag_string
        - status
        - backtrace
        - post_id
        - md5_confirmation
        - created_at
        - updated_at
        - parent_id
        - md5
        - file_ext
        - file_size
        - image_width
        - image_height
        - title
        - description
        - transcript
        - uploader_name
      properties:
        id:
          type: integer
        source:
          type: string
        rating:
          $ref: '#/components/schemas/Ratings'
        uploader_id:
          type: integer
        tag_string:
          type: string
        status:
          type: string
          description: |
            Note: The "error" status will be proceeded by an error, ex: "error: RuntimeError - No file or source URL provided"
          enum:
            - completed
            - duplicate
            - error
            - processing
            - pending
        backtrace:
          type: string
          nullable: true
        post_id:
          type: integer
          nullable: true
        md5_confirmation:
          type: string
          nullable: true
          deprecated: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        parent_id:
          type: integer
          nullable: true
        md5:
          type: string
          nullable: true
        file_ext:
          type: string
          nullable: true
        file_size:
          type: integer
          nullable: true
        image_width:
          type: integer
          nullable: true
        image_height:
          type: integer
          nullable: true
        title:
          type: string
        description:
          type: string
        transcript:
          type: string
        uploader_name:
          type: string
    User:
      type: object
      required:
        - id
        - created_at
        - name
        - level
        - base_upload_limit
        - post_upload_count
        - post_update_count
        - note_update_count
        - is_banned
        - can_approve_posts
        - can_upload_free
        - level_string
        - avatar_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        level:
          type: integer
        base_upload_limit:
          type: integer
        post_upload_count:
          type: integer
        post_update_count:
          type: integer
        note_update_count:
          type: integer
        is_banned:
          type: boolean
        can_approve_posts:
          type: boolean
        can_upload_free:
          type: boolean
        level_string:
          type: string
        avatar_id:
          type: integer
          nullable: true
        is_verified:
          type: boolean
    UserFeedback:
      type: object
      required:
        - id
        - user_id
        - creator_id
        - category
        - body
        - created_at
        - updated_at
        - updater_id
        - is_deleted
      properties:
        id:
          type: integer
        user_id:
          type: integer
        creator_id:
          type: integer
        category:
          $ref: '#/components/schemas/FeedbackCategories'
        body:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        updater_id:
          type: integer
        is_deleted:
          type: boolean
    UserNameChangeRequest:
      type: object
      required:
        - id
        - approver_id
        - user_id
        - original_name
        - desired_name
        - created_at
        - updated_at
        - status
      properties:
        id:
          type: integer
        approver_id:
          type: integer
        user_id:
          type: integer
        original_name:
          type: string
        desired_name:
          type: string
        change_reason:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - approved
    WikiPage:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - title
        - body
        - creator_id
        - is_locked
        - updater_id
        - is_deleted
        - other_names
        - parent
        - creator_name
        - category_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        title:
          type: string
        body:
          type: string
        creator_id:
          type: integer
        is_locked:
          type: boolean
        updater_id:
          type: integer
        is_deleted:
          type: boolean
        other_names:
          type: array
          items:
            type: string
        parent:
          type: string
          nullable: true
        creator_name:
          type: string
        category_id:
          $ref: '#/components/schemas/TagCategories'
    WikiPageVersion:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - title
        - body
        - updater_id
        - wiki_page_id
        - is_locked
        - other_names
        - is_deleted
        - reason
        - parent
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        title:
          type: string
        body:
          type: string
        updater_id:
          type: integer
        wiki_page_id:
          type: integer
        is_locked:
          type: boolean
        other_names:
          type: array
          items:
            type: string
        is_deleted:
          type: boolean
        reason:
          type: string
          nullable: true
        parent:
          type: string
          nullable: true
  responses:
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundResponse'
    AccessDenied:
      description: Access Denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccessDeniedResponse'
    ExpectedError:
      description: Invalid Input Data
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            example:
              - errors:
                  key:
                    - the error
            properties:
              errors:
                type: array
                items:
                  type: string
    MessageError:
      description: Error
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - message
            properties:
              success:
                type: boolean
              message:
                type: string
              code:
                type: string
                nullable: true
    UserResponse:
      description: Success
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/FullUser'
              - $ref: '#/components/schemas/FullCurrentUser'
  requestBodies:
    warning:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WarningRecordType'
paths:
  /artists.json:
    get:
      summary: Search Artists
      operationId: searchArtists
      tags:
        - Artists
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - updated_at
              - name
              - post_count
        - name: 'search[name]'
          in: query
          schema:
            type: string
        - name: 'search[group_name]'
          in: query
          schema:
            type: string
        - name: 'search[any_other_name_like]'
          in: query
          schema:
            type: string
        - name: 'search[any_name_matches]'
          in: query
          schema:
            type: string
        - name: 'search[any_name_or_url_matches]'
          in: query
          schema:
            type: string
        - name: 'search[url_matches]'
          in: query
          schema:
            type: string
        - name: 'search[creator_name]'
          in: query
          schema:
            type: string
        - name: 'search[creator_id]'
          in: query
          schema:
            type: string
        - name: 'search[has_tag]'
          in: query
          schema:
            type: string
        - name: 'search[is_linked]'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Artist'
                    - type: object
                      required:
                        - domains
                        - urls
                      properties:
                        domains:
                          type: array
                          example:
                            - - ebooru.my.domain
                              - 1
                          items:
                            type: array
                            items:
                              anyOf:
                                - type: string
                                - type: number
                        urls:
                          type: array
                          items:
                            $ref: '#/components/schemas/ArtistURL'
    post:
      summary: Create Artist
      operationId: createArtist
      tags:
        - Artists
      security:
        - basicAuth: []
      description: |
        `other_names` & `urls` are silently truncated to 25 entries.
        `notes` is silently truncated to the wiki page limit (250,000).
        Individual `other_names` are silently truncated to 100 characters.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'artist[name]'
              properties:
                'artist[name]':
                  type: string
                'artist[other_names]':
                  type: array
                  items:
                    type: string
                'artist[other_names_string]':
                  type: string
                'artist[url_string]':
                  type: string
                'artist[notes]':
                  type: string
                'artist[group_name]':
                  type: string
                'artist[banner_id]':
                  type: string
                'artist[avatar_id]':
                  type: string
                'artist[linked_user_id]':
                  type: integer
                  nullable: true
                  description: Only usable for Janitor+
                'artist[is_locked]':
                  type: boolean
                  description: Only usable for Janitor+
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Artist'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/artists/{idOrName}.json':
    get:
      summary: Get Artist
      operationId: getArtist
      tags:
        - Artists
      parameters:
        - $ref: '#/components/parameters/idOrName'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Artist'
                  - type: object
                    required:
                      - domains
                      - urls
                    properties:
                      domains:
                        type: array
                        items:
                          type: array
                          example:
                            - - ebooru.my.domain
                              - 1
                          items:
                            anyOf:
                              - type: string
                              - type: number
                      urls:
                        type: array
                        items:
                          $ref: '#/components/schemas/ArtistURL'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Artist
      operationId: editArtist
      tags:
        - Artists
      security:
        - basicAuth: []
      description: |
        If an artist is locked, you must be Janitor+ to edit them.
        `other_names` & `urls` are silently truncated to 25 entries.
        `notes` is silently truncated to the wiki page limit (250,000).
        Individual `other_names` are silently truncated to 100 characters.
        If an artist is on the avoid posting list, you must have the bd staff user flag to edit name, other_names, or group_name.
      parameters:
        - $ref: '#/components/parameters/idOrName'
      requestBody:
        content:
          application/c-www-form-urlencoded:
            schema:
              type: object
              properties:
                'artist[name]':
                  type: string
                  description: Only usable for Janitor+
                'artist[other_names]':
                  type: array
                  items:
                    type: string
                'artist[other_names_string]':
                  type: string
                'artist[url_string]':
                  type: string
                'artist[notes]':
                  type: string
                'artist[group_name]':
                  type: string
                'artist[banner_id]':
                  type: string
                'artist[avatar_id]':
                  type: string
                'artist[linked_user_id]':
                  type: integer
                  nullable: true
                  description: Only usable for Janitor+
                'artist[is_locked]':
                  type: boolean
                  description: Only usable for Janitor+
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Artist
      operationId: deleteArtist
      tags:
        - Artists
      security:
        - basicAuth: []
      description: |
        You must be an Admin+ to delete an artist.
      parameters:
        - $ref: '#/components/parameters/idOrName'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/artists/{idOrName}/revert.json':
    put:
      summary: Revert Artist
      operationId: revertArtist
      tags:
        - Artists
      security:
        - basicAuth: []
      description: |
        If an artist is locked, you must be Janitor+ to revert them.
      parameters:
        - $ref: '#/components/parameters/idOrName'
        - name: version_id
          in: query
          required: true
          description: The version ID to revert to.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/AccessDenied'
  /artist_versions.json:
    get:
      summary: Search Artist Versions
      operationId: searchArtistVersions
      tags:
        - Artist Versions
      description: 'When no results are found, an object with an `artist_versions` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          description: The order of the results.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - name
        - name: 'search[name]'
          in: query
          description: The name of the artist.
          schema:
            type: string
        - name: 'search[artist_id]'
          in: query
          description: The id of the artist.
          schema:
            type: string
        - name: 'search[updater_name]'
          in: query
          description: The name of the user that updated the artist.
          schema:
            type: string
        - name: 'search[updater_id]'
          in: query
          description: The id of the user that updated the artist.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/ArtistVersion'
                  - type: object
                    description: No Results
                    required:
                      - artist_versions
                    properties:
                      artist_versions:
                        type: array
                        maxItems: 0
  /artist_urls.json:
    get:
      summary: Search Artist URLs
      operationId: searchArtistUrls
      tags:
        - Artist URLs
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          description: The order of the results.
          schema:
            type: string
            enum:
              - id
              - id_asc
              - id_desc
              - artist_id
              - artist_id_asc
              - artist_id_desc
              - url
              - url_asc
              - url_desc
              - normalized_url
              - normalized_url_asc
              - normalized_url_desc
              - created_at
              - created_at_asc
              - created_at_desc
              - updated_at
              - updated_at_asc
              - updated_at_desc
        - name: 'search[artist_name]'
          in: query
          description: The name of the artist.
          schema:
            type: string
        - name: 'search[artist_id]'
          in: query
          description: The id of the artist.
          schema:
            type: string
        - name: 'search[is_active]'
          in: query
          description: If the artist url is active.
          schema:
            type: boolean
        - name: 'search[url]'
          in: query
          description: The url.
          schema:
            type: string
        - name: 'search[normalized_url]'
          in: query
          description: 'The normalized url. (http:, trailing `/`)'
          schema:
            type: string
        - name: 'search[artist]'
          in: query
          description: Legacy nested search for artist. Supports the same parameters as /artists.json.
          deprecated: true
          schema:
            type: object
        - name: 'search[url_matches]'
          in: query
          description: 'Legacy name for `search[url]`.'
          deprecated: true
          schema:
            type: string
        - name: 'search[normalized_url_matches]'
          in: query
          description: 'Legacy name for `search[normalized_url]`.'
          deprecated: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/ArtistURL'
                    - type: object
                      required:
                        - artist
                      properties:
                        artist:
                          $ref: '#/components/schemas/Artist'
  /avoid_postings.json:
    get:
      summary: Search Avoid Posting Entries
      operationId: searchAvoidPostings
      tags:
        - Avoid Posting Entries
      description: 'When no results are found, an object with an `avoid_postings` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - name: 'search[creator_name]'
          in: query
          schema:
            type: string
        - name: 'search[creator_id]'
          in: query
          schema:
            type: string
        - name: 'search[any_name_matches]'
          in: query
          description: Any name matching.
          schema:
            type: string
        - name: 'search[artist_name]'
          in: query
          description: The artist name of the avoid posting entry.
          schema:
            type: string
        - name: 'search[artist_id]'
          in: query
          description: The artist id for the avoid posting entry.
          schema:
            type: string
        - name: 'search[any_other_name_matches]'
          in: query
          description: Any other name matching.
          schema:
            type: string
        - name: 'search[details]'
          in: query
          description: The details of the avoid posting entry.
          schema:
            type: string
        - name: 'search[staff_notes]'
          in: query
          description: The staff notes on the avoid posting entry. Must be Janitor+ to use.
          schema:
            type: string
        - name: 'search[is_active]'
          in: query
          description: If the avoid posting entry is active.
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/AvoidPosting'
                  - type: object
                    description: No Results
                    required:
                      - avoid_postings
                    properties:
                      avoid_postings:
                        type: array
                        maxItems: 0
    post:
      summary: Create Avoid Posting Entry
      operationId: createAvoidPosting
      tags:
        - Avoid Posting Entries
      security:
        - basicAuth: []
      description: 'Must have the bd staff user flag. When no results are found, an object with an `avoid_posting_versions` key is returned.'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'avoid_posting[details]':
                  type: string
                'avoid_posting[staff_notes]':
                  type: string
                'avoid_posting[is_active]':
                  type: boolean
                'avoid_posting[artist_attributes][id]':
                  type: integer
                'avoid_posting[artist_attributes][name]':
                  type: string
                  description: 'If provided and the artist does not exist, an artist will be created.'
                'avoid_posting[artist_attributes][other_names_string]':
                  type: string
                'avoid_posting[artist_attributes][other_names]':
                  type: array
                  items:
                    type: string
                'avoid_posting[artist_attributes][group_name]':
                  type: string
                'avoid_posting[artist_attributes][linked_user_id]':
                  type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvoidPosting'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/avoid_postings/{idOrName}.json':
    get:
      summary: Get Avoid Posting Entry
      operationId: getAvoidPosting
      tags:
        - Avoid Posting Entries
      parameters:
        - $ref: '#/components/parameters/idOrName'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvoidPosting'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Avoid Posting Entry
      operationId: editAvoidPosting
      tags:
        - Avoid Posting Entries
      security:
        - basicAuth: []
      description: Must have the bd staff user flag.
      parameters:
        - $ref: '#/components/parameters/idOrName'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'avoid_posting[details]':
                  type: string
                'avoid_posting[staff_notes]':
                  type: string
                'avoid_posting[is_active]':
                  type: boolean
                'avoid_posting[artist_attributes][name]':
                  type: string
                'avoid_posting[artist_attributes][other_names_string]':
                  type: string
                'avoid_posting[artist_attributes][other_names]':
                  type: array
                  items:
                    type: string
                'avoid_posting[artist_attributes][group_name]':
                  type: string
                'avoid_posting[artist_attributes][linked_user_id]':
                  type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvoidPosting'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Destroy Avoid Posting Entry
      operationId: destroyAvoidPosting
      tags:
        - Avoid Posting Entries
      security:
        - basicAuth: []
      description: Must have the bd staff user flag.
      parameters:
        - $ref: '#/components/parameters/idOrName'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/avoid_postings/{idOrName}/delete.json':
    put:
      summary: Delete Avoid Posting Entry
      operationId: deleteAvoidPosting
      tags:
        - Avoid Posting Entries
      security:
        - basicAuth: []
      description: Must have the bd staff user flag.
      parameters:
        - $ref: '#/components/parameters/idOrName'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/avoid_postings/{idOrName}/undelete.json':
    put:
      summary: Undelete Avoid Posting Entry
      operationId: undeleteAvoidPosting
      tags:
        - Avoid Posting Entries
      security:
        - basicAuth: []
      description: Must have the bd staff user flag.
      parameters:
        - $ref: '#/components/parameters/idOrName'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /avoid_posting_versions.json:
    get:
      summary: Search Avoid Posting Versions
      operationId: searchAvoidPostingVersions
      tags:
        - Avoid Posting Versions
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          description: The order of the results.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - name: 'search[updater_name]'
          in: query
          description: The name of the updater of the avoid posting entry.
          schema:
            type: string
        - name: 'search[updater_id]'
          in: query
          description: The ID of the updater of the avoid posting entry.
          schema:
            type: string
        - name: 'search[any_name_matches]'
          in: query
          description: Any name matching.
          schema:
            type: string
        - name: 'search[artist_name]'
          in: query
          description: The artist name of the avoid posting entry.
          schema:
            type: string
        - name: 'search[artist_id]'
          in: query
          description: The artist id for the avoid posting entry.
          schema:
            type: string
        - name: 'search[any_other_name_matches]'
          in: query
          description: Any other name matching.
          schema:
            type: string
        - name: 'search[group_name]'
          in: query
          description: Any other name matching.
          schema:
            type: string
        - name: 'search[is_active]'
          in: query
          description: If the avoid posting entry is active.
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/AvoidPostingVersion'
                  - type: object
                    description: No Results
                    required:
                      - avoid_posting_versions
                    properties:
                      avoid_posting_versions:
                        type: array
                        maxItems: 0
  /bans.json:
    get:
      summary: Search Bans
      operationId: searchBans
      tags:
        - Bans
      description: 'When no results are found, an object with an `bans` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          description: The order of the results.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - expires_at_desc
        - name: 'search[banner_id]'
          in: query
          description: The ID of the banner.
          schema:
            type: string
        - name: 'search[banner_name]'
          in: query
          description: The name of banner.
          schema:
            type: string
        - name: 'search[user_id]'
          in: query
          description: The ID of the banned user.
          schema:
            type: string
        - name: 'search[user_name]'
          in: query
          description: The name of the banned user.
          schema:
            type: string
        - name: 'search[reason_matches]'
          in: query
          description: The reason of the ban.
          schema:
            type: string
        - name: 'search[expired]'
          in: query
          description: If the ban is expired.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Ban'
                  - type: object
                    description: No Results
                    required:
                      - bans
                    properties:
                      bans:
                        type: array
                        maxItems: 0
  '/bans/{id}.json':
    get:
      summary: Get Ban
      operationId: getBan
      tags:
        - Bans
      parameters:
        - name: id
          in: path
          description: The ID of the ban to get.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ban'
        '404':
          $ref: '#/components/responses/NotFound'
  /blips.json:
    get:
      summary: Search Blips
      operationId: searchBlips
      tags:
        - Blips
      description: 'When no results are found, an object with an `blips` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - updated_at
              - updated_at_desc
        - name: 'search[creator_id]'
          in: query
          schema:
            type: integer
        - name: 'search[creator_name]'
          in: query
          schema:
            type: string
        - name: 'search[body_matches]'
          in: query
          schema:
            type: string
        - name: 'search[response_to]'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Blip'
                  - type: object
                    description: No Results
                    required:
                      - blips
                    properties:
                      blips:
                        type: array
                        maxItems: 0
    post:
      summary: Create Blip
      operationId: createBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'blip[body]'
              properties:
                'blip[body]':
                  type: string
                'blip[response_to]':
                  type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blip'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/blips/{id}.json':
    get:
      summary: Get Blip
      operationId: getBlip
      tags:
        - Blips
      parameters:
        - name: id
          in: path
          description: The ID of the blip to get.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Blip'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Blip
      operationId: editBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: 'Unless Admin+, blips cannot be edited after 5 minutes. Marked blips cannot be edited.'
      parameters:
        - name: id
          in: path
          description: The ID of the blip.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'blip[body]':
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blip'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Blip
      operationId: deleteBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: |
        You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the blip.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/blips/{id}/hide.json':
    post:
      summary: Hide Blip
      operationId: hideBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: |
        You must be the creator or Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the blip.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blip'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/blips/{id}/unhide.json':
    post:
      summary: Unhide Blip
      operationId: unhideBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: |
        You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the blip.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blip'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/blips/{id}/warning.json':
    post:
      summary: Mark Blip
      operationId: markBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the blip.
          schema:
            type: integer
      requestBody:
        $ref: '#/components/requestBodies/warning'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DTextResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /bulk_update_requests.json:
    get:
      summary: Search Bulk Update Requests
      operationId: searchBulkUpdateRequests
      tags:
        - Bulk Update Requests
      description: 'When no results are found, an object with an `bulk_update_requests` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - status_desc
              - updated_at_desc
              - updated_at_asc
        - name: 'search[user_id]'
          in: query
          schema:
            type: integer
        - name: 'search[user_name]'
          in: query
          schema:
            type: string
        - name: 'search[approver_id]'
          in: query
          schema:
            type: integer
        - name: 'search[approver_name]'
          in: query
          schema:
            type: string
        - name: 'search[forum_topic_id]'
          in: query
          schema:
            type: integer
        - name: 'search[forum_post_id]'
          in: query
          schema:
            type: integer
        - name: 'search[status]'
          in: query
          schema:
            type: string
            description: Multiple can be specified via comma separating.
            enum:
              - approved
              - rejected
              - pending
        - name: 'search[title_matches]'
          in: query
          schema:
            type: string
        - name: 'search[script_matches]'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/BulkUpdateRequest'
                  - type: object
                    description: No Results
                    required:
                      - bulk_update_requests
                    properties:
                      bulk_update_requests:
                        type: array
                        maxItems: 0
    post:
      summary: Create Bulk Update Request
      operationId: createBulkUpdateRequest
      tags:
        - Bulk Update Requests
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'bulk_update_request[script]'
                - 'bulk_update_request[title]'
                - 'bulk_update_request[reason]'
              properties:
                'bulk_update_request[script]':
                  type: string
                'bulk_update_request[title]':
                  type: string
                'bulk_update_request[reason]':
                  type: string
                'bulk_update_request[forum_topic_id]':
                  type: integer
                'bulk_update_request[skip_forum]':
                  type: boolean
                  description: Only usable for Admin+
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateRequest'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/bulk_update_request/{id}.json':
    get:
      summary: Get Bulk Update Request
      operationId: getBulkUpdateRequest
      tags:
        - Bulk Update Requests
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the bulk update request.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Bulk Update Request
      operationId: editBulkUpdateRequest
      tags:
        - Bulk Update Requests
      security:
        - basicAuth: []
      description: 'You must be the creator of the BUR, or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the bulk update request.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'bulk_update_request[script]':
                  type: string
                'bulk_update_request[forum_topic_id]':
                  description: You must be Admin+.
                  type: string
                'bulk_update_request[forum_post_id]':
                  description: You must be Admin+.
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Reject Bulk Update Request
      operationId: rejectBulkUpdateRequest
      tags:
        - Bulk Update Requests
      security:
        - basicAuth: []
      description: 'You must be the creator of the BUR, or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the bulk update request.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/bulk_update_request/{id}/approve.json':
    post:
      summary: Approve Bulk Update Request
      operationId: approveBulkUpdateRequest
      tags:
        - Bulk Update Requests
      description: Must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the bulk update request.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /comments.json:
    get:
      summary: Search Comments
      operationId: searchComments
      tags:
        - Comments
      description: 'For searching comments, group_by=comment must be set. When no results are found, an object with an `comments` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - status
              - status_desc
              - updated_at_desc
        - in: query
          name: group_by
          schema:
            type: string
            enum:
              - comment
              - post
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
        - in: query
          name: 'search[post_id]'
          description: Accepts a comma separated list.
          schema:
            type: string
        - in: query
          name: 'search[post_tags_match]'
          schema:
            type: string
        - in: query
          name: 'search[post_note_updater_name]'
          schema:
            type: string
        - in: query
          name: 'search[post_note_updater_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[is_sticky]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_hidden]'
          description: Only usable by Moderator+
          schema:
            type: boolean
        - in: query
          name: 'search[do_not_bump_post]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Comment'
                  - type: object
                    description: No Results
                    required:
                      - comments
                    properties:
                      comments:
                        type: array
                        maxItems: 0
    post:
      summary: Create Comment
      operationId: createComment
      tags:
        - Comments
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'comment[body]'
                - 'comment[post_id]'
              properties:
                'comment[body]':
                  type: string
                'comment[post_id]':
                  type: integer
                'comment[do_not_bump_post]':
                  type: boolean
                'comment[is_sticky]':
                  type: boolean
                  description: Only usable for Janitor+
                'comment[is_hidden]':
                  type: boolean
                  description: Only usable for Moderator+
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/comments/{id}.json':
    get:
      summary: Get Comment
      operationId: getComment
      tags:
        - Comments
      description: 'If the comment is hidden, you must be the creator or Janitor+ to see it.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Comment
      operationId: editComment
      tags:
        - Comments
      security:
        - basicAuth: []
      description: |
        You must be the creator of the comment, or Admin+ to edit. Marked comments cannot be edited.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'comment[body]':
                  type: string
                'comment[is_sticky]':
                  type: boolean
                  description: Only usable for Janitor+
                'comment[is_hidden]':
                  type: boolean
                  description: Only usable for Moderator+
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Comment
      operationId: deleteComment
      tags:
        - Comments
      security:
        - basicAuth: []
      description: |
        You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/comments/{id}/hide.json':
    post:
      summary: Hide Comment
      operationId: hideComment
      tags:
        - Comments
      security:
        - basicAuth: []
      description: |
        You must be the creator or Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/comments/{id}/unhide.json':
    post:
      summary: Unhide Comment
      operationId: unhideComment
      tags:
        - Comments
      security:
        - basicAuth: []
      description: |
        You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/comments/{id}/warning.json':
    post:
      summary: Mark Comment
      operationId: markComment
      tags:
        - Comments
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: integer
      requestBody:
        $ref: '#/components/requestBodies/warning'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DTextResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/comments/{id}/votes.json':
    post:
      summary: Create Comment Vote
      operationId: createCommentVote
      tags:
        - Comment Votes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: string
        - name: score
          in: query
          required: true
          schema:
            type: integer
            enum:
              - -1
              - 1
        - name: no_unvote
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - score
                  - our_score
                properties:
                  score:
                    type: integer
                  our_score:
                    type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Comment Vote
      operationId: deleteCommentVote
      tags:
        - Comment Votes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the comment.
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /comment_votes/lock.json:
    post:
      summary: Lock Comment Votes
      operationId: lockCommentVotes
      tags:
        - Comment Votes
      security:
        - basicAuth: []
      description: |
        You must be Moderator+. Errors if ids is not provided.
      parameters:
        - name: ids
          in: query
          required: true
          description: 'The IDs of the comment votes, comma separated.'
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /comment_votes/delete.json:
    post:
      summary: Delete Comment Vote
      operationId: deleteCommentVotes
      tags:
        - Comment Votes
      security:
        - basicAuth: []
      description: |
        You must be Admin+. Errors if ids is not provided.
      parameters:
        - name: ids
          in: query
          required: true
          description: 'The IDs of the comment votes, comma separated.'
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
  /dmails.json:
    get:
      summary: Search DMails
      operationId: searchDMails
      tags:
        - DMails
      description: 'When no results are found, an object with a `dmails` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - in: query
          name: 'search[title_matches]'
          schema:
            type: string
        - in: query
          name: 'search[message_matches]'
          schema:
            type: string
        - in: query
          name: 'search[to_name]'
          schema:
            type: string
        - in: query
          name: 'search[to_id]'
          schema:
            type: integer
        - in: query
          name: 'search[from_name]'
          schema:
            type: string
        - in: query
          name: 'search[from_id]'
          schema:
            type: integer
        - in: query
          name: 'search[is_read]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_deleted]'
          schema:
            type: boolean
        - in: query
          name: 'search[read]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DMail'
  '/dmails/{id}.json':
    get:
      summary: Get DMail
      operationId: getDMail
      tags:
        - DMails
      description: Fetching a dmail will not mark it as read.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the dmail.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DMail'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Delete DMail
      operationId: deleteDMail
      tags:
        - DMails
      security:
        - basicAuth: []
      description: Deleting simply hides your copy of the dmail.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the dmail.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/dmails/{id}/mark_as_read.json':
    put:
      summary: Mark DMail As Read
      operationId: markDMailAsRead
      tags:
        - DMails
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the dmail.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/dmails/{id}/mark_as_unread.json':
    put:
      summary: Mark DMail As Unread
      operationId: markDMailAsUnread
      tags:
        - DMails
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the dmail.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /dmails/mark_all_as_read.json:
    put:
      summary: Mark All DMails As Read
      operationId: markAllDMailsAsRead
      tags:
        - DMails
      security:
        - basicAuth: []
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /dtext_preview.json:
    post:
      summary: Preview DText
      operationId: previewDText
      tags:
        - DText
      description: 'Note while this route does not require auth, without auth it requires a CSRF token. For that reason it has been marked as requiring auth.'
      security:
        - basicAuth: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - body
              properties:
                body:
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DTextResponse'
  /email_blacklists.json:
    get:
      summary: Search Email Blacklists
      operationId: searchEmailBlacklists
      tags:
        - Email Blacklists
      description: 'You must be Admin+. When no results are found, an object with an `email_blacklists` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - reason
              - domain
        - in: query
          name: 'search[domain]'
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/EmailBlacklist'
                  - type: object
                    description: No Results
                    required:
                      - email_blacklists
                    properties:
                      email_blacklists:
                        type: array
                        maxItems: 0
    post:
      summary: Create Email Blacklist
      operationId: createEmailBlacklist
      tags:
        - Email Blacklists
      description: You must be Admin+.
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'email_blacklist[domain]'
                - 'email_blacklist[reason]'
              properties:
                'email_blacklist[domain]':
                  type: string
                'email_blacklist[reason]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailBlacklist'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/email_blacklists/{id}.json':
    delete:
      summary: Delete Email Blacklist
      operationId: deleteEmailBlacklist
      tags:
        - Email Blacklists
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the email blacklist.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /favorites.json:
    get:
      summary: List Favorites
      operationId: listFavorites
      tags:
        - Favorites
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - in: query
          name: user_id
          description: You must be the user or Moderator+ if the user has their favorites hidden.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - posts
                properties:
                  posts:
                    type: array
                    items:
                      $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      summary: Add Favorite
      operationId: addFavorite
      tags:
        - Favorites
      security:
        - basicAuth: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - post_id
              properties:
                post_id:
                  type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/favorites/{id}.json':
    delete:
      summary: Remove Favorite
      operationId: removeFavorite
      tags:
        - Favorites
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /forum_posts.json:
    get:
      summary: Search Forum Posts
      operationId: searchForumPosts
      tags:
        - Forum Posts
      description: 'When no results are found, an object with an `forum_posts` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[topic_id]'
          schema:
            type: integer
        - in: query
          name: 'search[topic_title_matches]'
          schema:
            type: string
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
        - in: query
          name: 'search[topic_category_id]'
          schema:
            type: integer
        - in: query
          name: 'search[is_hidden]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/ForumPost'
                  - type: object
                    description: No Results
                    required:
                      - forum_posts
                    properties:
                      forum_posts:
                        type: array
                        maxItems: 0
    post:
      summary: Create Forum Post
      operationId: createForumPost
      tags:
        - Forum Posts
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'forum_post[body]'
                - 'forum_post[topic_id]'
              properties:
                'forum_post[body]':
                  type: string
                'forum_post[topic_id]':
                  type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumPost'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/forum_posts/{id}.json':
    get:
      summary: Get Forum Post
      operationId: getForumPost
      tags:
        - Forum Posts
      description: 'If the forum post is hidden, you must be the creator or Moderator+ to see it.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumPost'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Forum Post
      operationId: editForumPost
      tags:
        - Forum Posts
      security:
        - basicAuth: []
      description: 'You must be the creator of the forum post, or Admin+ to edit. Marked forum posts cannot be edited.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'forum_post[body]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Forum Post
      operationId: deleteForumPost
      tags:
        - Forum Posts
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_posts/{id}/hide.json':
    post:
      summary: Hide Forum Post
      operationId: hideForumPost
      tags:
        - Forum Posts
      security:
        - basicAuth: []
      description: You must be the creator or Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumPost'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_posts/{id}/unhide.json':
    post:
      summary: Unhide Forum Post
      operationId: unhideForumPost
      tags:
        - Forum Posts
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumPost'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_posts/{id}/warning.json':
    post:
      summary: Mark Forum Post
      operationId: markForumPost
      tags:
        - Forum Posts
      security:
        - basicAuth: []
      description: |
        You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: integer
      requestBody:
        $ref: '#/components/requestBodies/warning'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DTextResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_posts/{id}/votes.json':
    post:
      summary: Create Forum Post Vote
      operationId: createForumPostVote
      tags:
        - Forum Post Votes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'forum_post_vote[score]'
              properties:
                'forum_post_vote[score]':
                  type: integer
                  enum:
                    - -1
                    - 0
                    - 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumPostVote'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Forum Post Vote
      operationId: deleteForumPostVote
      tags:
        - Forum Post Votes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum post.
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /forum_topics.json:
    get:
      summary: Search Forum Topics
      operationId: searchForumTopics
      tags:
        - Forum Topics
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - sticky
        - in: query
          name: 'search[title]'
          schema:
            type: string
        - in: query
          name: 'search[title_matches]'
          schema:
            type: string
        - in: query
          name: 'search[category_id]'
          schema:
            type: integer
        - in: query
          name: 'search[is_sticky]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_locked]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_hidden]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ForumTopic'
    post:
      summary: Create Forum Topic
      operationId: createForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'forum_topic[title]'
                - 'forum_topic[category_id]'
              properties:
                'forum_topic[title]':
                  type: string
                'forum_topic[category_id]':
                  type: integer
                'forum_topic[original_post_attributes][id]':
                  type: integer
                  description: 'Forum post ID. Mutually exclusive with body, one must be provided.'
                'forum_topic[original_post_attributes][body]':
                  type: string
                  description: 'First forum post body. Mutually exclusive with id, one must be provided.'
                'forum_topic[is_sticky]':
                  type: boolean
                  description: You must be Moderator+.
                'forum_topic[is_locked]':
                  type: boolean
                  description: You must be Moderator+.
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumTopic'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/forum_topics/{id}.json':
    get:
      summary: Get Forum Forum Topic
      operationId: getForumTopic
      tags:
        - Forum Topics
      description: 'If the forum topic is hidden, you must be the creator or Moderator+ to see it.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumTopic'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Forum Topic
      operationId: editForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'forum_topic[title]':
                  type: string
                'forum_topic[category_id]':
                  type: integer
                'forum_topic[original_post_attributes][id]':
                  type: integer
                  description: Forum post ID. Silently ignored
                'forum_topic[original_post_attributes][body]':
                  type: string
                  description: First forum post body.
                'forum_topic[is_sticky]':
                  type: boolean
                  description: You must be Moderator+.
                'forum_topic[is_locked]':
                  type: boolean
                  description: You must be Moderator+.
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Forum Topic
      operationId: deleteForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_topics/{id}/hide.json':
    post:
      summary: Hide Forum Topic
      operationId: hideForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      description: You must be the creator or Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumTopic'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_topics/{id}/unhide.json':
    post:
      summary: Unhide Forum Topic
      operationId: unhideForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumTopic'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_topics/{id}/subscribe.json':
    post:
      summary: Subscribe To Forum Topic
      operationId: subscribeForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumTopic'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/forum_topics/{id}/unsubscribe.json':
    post:
      summary: Unsubscribe From Forum Topic
      operationId: unsubscribeForumTopic
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the forum topic.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForumTopic'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /forum_topics/mark_all_as_read.json:
    post:
      summary: Mark All Forum Topics As Read
      operationId: markAllForumTopicsAsRead
      tags:
        - Forum Topics
      security:
        - basicAuth: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - category_id
              properties:
                category_id:
                  type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
  /help.json:
    get:
      summary: List Help Pages
      operationId: listHelpPages
      description: Will error if no help pages exist.
      tags:
        - Help Pages
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Help'
    post:
      summary: Create Help Page
      operationId: createHelpPage
      tags:
        - Help Pages
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'help_page[name]'
                - 'help_page[wiki_page]'
              properties:
                'help_page[name]':
                  type: string
                'help_page[wiki_page]':
                  type: string
                'help_page[related]':
                  type: string
                  description: Separate with a comma followed by a space.
                'help_page[title]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Help'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/help/{id}.json':
    get:
      summary: Get Help Page
      operationId: getHelpPage
      tags:
        - Help Pages
      parameters:
        - name: id
          in: path
          required: true
          description: The ID or name of the help page.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Help'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Help Page
      operationId: editHelpPage
      tags:
        - Help Pages
      security:
        - basicAuth: []
      description: You must be Admin+
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the help page.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'help_page[name]':
                  type: string
                'help_page[wiki_page]':
                  type: string
                'help_page[related]':
                  type: string
                  description: Separate with a comma followed by a space.
                'help_page[title]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Help Page
      operationId: deleteHelpPage
      tags:
        - Help Pages
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the help page.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /ip_bans.json:
    get:
      summary: List IP Bans
      operationId: listIPBans
      tags:
        - IP Bans
      security:
        - basicAuth: []
      description: 'You must be Admin+. When no results are found, an object with an `ip_bans` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[banner_id]'
          schema:
            type: integer
        - in: query
          name: 'search[banner_name]'
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/IPBan'
                  - type: object
                    description: No Results
                    required:
                      - ip_bans
                    properties:
                      ip_bans:
                        type: array
                        maxItems: 0
    post:
      summary: Create IP Ban
      operationId: createIPBan
      tags:
        - IP Bans
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'ip_ban[ip_addr]'
                - 'ip_ban[reason]'
              properties:
                'ip_ban[ip_addr]':
                  type: string
                'ip_ban[reason]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPBan'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/ip_bans/{id}.json':
    delete:
      summary: Delete IP Ban
      operationId: deleteIPBan
      tags:
        - IP Bans
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the ip ban.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /iqdb_queries.json:
    get:
      summary: Query IQDB
      operationId: queryIQDBGet
      tags:
        - IQDB
      parameters:
        - name: 'search[score_cutoff]'
          in: query
          schema:
            type: number
        - name: 'search[url]'
          in: query
          schema:
            type: string
        - name: 'search[post_id]'
          in: query
          schema:
            type: integer
        - name: 'search[hash]'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - posts
                properties:
                  posts:
                    type: array
                    items:
                      $ref: '#/components/schemas/IQDBResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
    post:
      summary: Query IQDB
      operationId: queryIQDPost
      tags:
        - IQDB
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                'search[file]':
                  type: string
                  format: binary
                'search[score_cutoff]':
                  type: number
                'search[url]':
                  type: string
                'search[post_id]':
                  type: string
                'search[hash]':
                  type: string
          application/json:
            schema:
              type: object
              properties:
                score_cutoff:
                  type: number
                url:
                  type: string
                post_id:
                  type: string
                hash:
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - posts
                properties:
                  posts:
                    type: array
                    items:
                      $ref: '#/components/schemas/IQDBResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
  /mascots.json:
    get:
      summary: Search Mascots
      operationId: searchMascots
      tags:
        - Mascots
      description: 'When no results are found, an object with an `mascots` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Mascot'
                  - type: object
                    description: No Results
                    required:
                      - mascots
                    properties:
                      mascots:
                        type: array
                        maxItems: 0
    post:
      summary: Create Mascot
      operationId: createMascot
      tags:
        - Mascots
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - 'mascot[mascot_file]'
                - 'mascot[display_name]'
                - 'mascot[background_color]'
                - 'mascot[artist_url]'
                - 'mascot[artist_name]'
              properties:
                'mascot[mascot_file]':
                  type: string
                  format: binary
                'mascot[display_name]':
                  type: string
                'mascot[background_color]':
                  type: string
                'mascot[artist_url]':
                  type: string
                'mascot[artist_name]':
                  type: string
                'mascot[available_on_string]':
                  type: string
                  description: Comma separated site names.
                'mascot[active]':
                  type: boolean
                'mascot[hide_anonymous]':
                  type: boolean
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mascot'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/mascots/{id}.json':
    patch:
      summary: Edit Mascot
      operationId: editMascot
      tags:
        - Mascots
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the mascot.
          schema:
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                'mascot[mascot_file]':
                  type: string
                  format: binary
                'mascot[display_name]':
                  type: string
                'mascot[background_color]':
                  type: string
                'mascot[artist_url]':
                  type: string
                'mascot[artist_name]':
                  type: string
                'mascot[available_on_string]':
                  type: string
                  description: Comma separated site names.
                'mascot[active]':
                  type: boolean
                'mascot[hide_anonymous]':
                  type: boolean
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Mascot
      operationId: deleteMascot
      tags:
        - Mascots
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the mascot.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /mod_actions.json:
    get:
      summary: Search Mod Actions
      operationId: searchModActions
      tags:
        - Mod Actions
      description: |
        Note that some mod actions are not in use anymore. Their entries exist for historical purposes only.<br>
        The current legacy actions are as follows:<br>
        * `created_positive_record`, `created_neutral_record`, `created_negative_record`
        * `created_flag_reason`, `edited_flag_reason`, `deleted_flag_reason`
        * `post_move_favorites`, `post_delete`, `post_undelete`, `post_destroy`, `post_rating_lock`, `post_unapprove`
        * `post_replacement_accept`, `post_replacement_reject`, `post_replacement_delete`
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[action]'
          schema:
            $ref: '#/components/schemas/ModActionActions'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModAction'
  '/mod_actions/{id}.json':
    get:
      summary: Get Mod Action
      operationId: getModAction
      tags:
        - Mod Actions
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the mod action.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModAction'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /news_updates.json:
    get:
      summary: List News Updates
      operationId: listNewsUpdates
      tags:
        - News Updates
      description: 'When no results are found, an object with an `news_updates` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/NewsUpdate'
                  - type: object
                    description: No Results
                    required:
                      - news_updates
                    properties:
                      news_updates:
                        type: array
                        maxItems: 0
    post:
      summary: Create News Update
      operationId: createNewsUpdate
      tags:
        - News Updates
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'news_update[message]'
              properties:
                'news_update[message]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewsUpdate'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/news_updates/{id}.json':
    patch:
      summary: Edit News Update
      operationId: editNewsUpdate
      tags:
        - News Updates
      security:
        - basicAuth: []
      description: You must be Admin+
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the news update.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'news_update[message]'
              properties:
                'news_update[message]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete News Update
      operationId: deleteNewsUpdate
      tags:
        - News Updates
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the news update.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /notes.json:
    get:
      summary: Search Notes
      operationId: searchNotes
      tags:
        - Notes
      description: 'When no results are found, an object with an `notes` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
        - in: query
          name: 'search[is_active]'
          schema:
            type: boolean
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[post_tags_match]'
          schema:
            type: string
        - in: query
          name: 'search[post_note_updater_id]'
          schema:
            type: integer
        - in: query
          name: 'search[post_note_updater_name]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Note'
                  - type: object
                    description: No Results
                    required:
                      - notes
                    properties:
                      notes:
                        type: array
                        maxItems: 0
    post:
      summary: Create Note
      operationId: createNote
      tags:
        - Notes
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'note[post_id]'
                - 'note[x]'
                - 'note[y]'
                - 'note[width]'
                - 'note[height]'
                - 'note[body]'
              properties:
                'note[post_id]':
                  type: integer
                'note[x]':
                  type: integer
                'note[y]':
                  type: integer
                'note[width]':
                  type: integer
                'note[height]':
                  type: integer
                'note[body]':
                  type: string
                'note[html_id]':
                  type: string
                  description: 'Passthrough, used in frontend.'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Note'
                  - type: object
                    required:
                      - html_id
                    properties:
                      html_id:
                        type: string
                        description: 'Passthrough, used in frontend.'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/notes/{id}.json':
    get:
      summary: Get Note
      operationId: getNote
      tags:
        - Notes
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the note.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Note'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Note
      operationId: editNote
      tags:
        - Notes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the note.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'note[x]':
                  type: integer
                'note[y]':
                  type: integer
                'note[width]':
                  type: integer
                'note[height]':
                  type: integer
                'note[body]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Note
      operationId: deleteNote
      tags:
        - Notes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the note.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/notes/{id}/revert.json':
    post:
      summary: Revert Note
      operationId: revertNote
      tags:
        - Notes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the note.
          schema:
            type: integer
        - name: version_id
          in: query
          required: true
          description: The version ID to revert to.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /note_versions.json:
    get:
      summary: Search Note Versions
      operationId: searchNoteVersions
      tags:
        - Note Versions
      description: 'When no results are found, an object with an `note_versions` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          description: The order of the results.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[updater_id]'
          schema:
            type: integer
        - in: query
          name: 'search[updater_name]'
          schema:
            type: string
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[note_id]'
          schema:
            type: integer
        - in: query
          name: 'search[is_active]'
          schema:
            type: boolean
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/NoteVersion'
                  - type: object
                    description: No Results
                    required:
                      - note_versions
                    properties:
                      note_versions:
                        type: array
                        maxItems: 0
  /pools.json:
    get:
      summary: Search Pools
      operationId: searchPools
      tags:
        - Pools
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - name
              - created_at
              - post_count
        - in: query
          name: 'search[name_matches]'
          schema:
            type: string
        - in: query
          name: 'search[description_matches]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[category]'
          schema:
            $ref: '#/components/schemas/PoolCategories'
        - in: query
          name: 'search[is_active]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pool'
    post:
      summary: Create Pool
      operationId: createPool
      tags:
        - Pools
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'pool[name]'
              properties:
                'pool[name]':
                  type: string
                'pool[description]':
                  type: string
                'pool[category]':
                  $ref: '#/components/schemas/PoolCategories'
                'ipool[s_active]':
                  type: boolean
                'pool[post_ids_string]':
                  type: string
                  description: Space separated list of post IDs. Mutually exclusive with post_ids.
                'pool[post_ids]':
                  type: array
                  description: Array of post IDs. Mutually exclusive with post_ids_string.
                  items:
                    type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pool'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/pools/{id}.json':
    get:
      summary: Get Pool
      operationId: getPool
      tags:
        - Pools
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the pool.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pool'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Pool
      operationId: editPool
      tags:
        - Pools
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the pool.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'pool[name]':
                  type: string
                'pool[description]':
                  type: string
                'pool[is_active]':
                  type: boolean
                'pool[category]':
                  $ref: '#/components/schemas/PoolCategories'
                'pool[post_ids_string]':
                  type: string
                  description: Space separated list of post IDs. Mutually exclusive with post_ids.
                'pool[post_ids]':
                  type: array
                  description: Array of post IDs. Mutually exclusive with post_ids_string.
                  items:
                    type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Pool
      operationId: deletePool
      tags:
        - Pools
      description: You must be Janitor+.
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the pool.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/pools/{id}/revert.json':
    put:
      summary: Revert Pool
      operationId: revertPool
      tags:
        - Pools
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the pool.
          schema:
            type: integer
        - name: version_id
          in: query
          required: true
          description: The version ID to revert to.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /pool_element.js:
    post:
      summary: Add Post To Pool
      operationId: addPostToPool
      tags:
        - Pools
      security:
        - basicAuth: []
      description: 'Note that the extension is JS, this route will not return JSON.'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_id
              properties:
                pool_id:
                  type: integer
                  description: Mutually exclusive with pool_name.
                pool_name:
                  type: string
                  description: Mutually exclusive with pool_id.
                post_id:
                  type: integer
      responses:
        '200':
          description: Success
  /pool_element.json:
    delete:
      summary: Remove Post From Pool
      operationId: removePostFromPool
      tags:
        - Pools
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - pool_id
                - post_id
              properties:
                pool_id:
                  type: integer
                post_id:
                  type: integer
      responses:
        '204':
          description: Success
  /pool_versions.json:
    get:
      summary: Search Pool Versions
      operationId: searchPoolVersions
      tags:
        - Pool Versions
      description: 'When no results are found, an object with an `pool_versions` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          description: The order of the results.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[updater_id]'
          schema:
            type: integer
        - in: query
          name: 'search[updater_name]'
          schema:
            type: string
        - in: query
          name: 'search[pool_id]'
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/PoolVersion'
                  - type: object
                    description: No Results
                    required:
                      - pool_versions
                    properties:
                      pool_versions:
                        type: array
                        maxItems: 0
  /popular.json:
    get:
      summary: List Most Upvoted Posts
      operationId: listPopular
      tags:
        - Popular
      parameters:
        - $ref: '#/components/parameters/limit'
        - name: date
          in: query
          description: 'The date to list popular uploads for. Only The day, month, and year are considered.'
          schema:
            type: string
            format: date
        - name: scale
          in: query
          description: 'The scale of the results, in relation to `date`.'
          schema:
            type: string
            enum:
              - month
              - week
              - day
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - posts
                properties:
                  posts:
                    type: array
                    items:
                      $ref: '#/components/schemas/Post'
  /posts.json:
    get:
      summary: Search Posts
      operationId: searchPosts
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - in: query
          name: tags
          schema:
            type: string
        - in: query
          name: md5
          schema:
            type: string
        - in: query
          name: random
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - posts
                properties:
                  posts:
                    type: array
                    items:
                      $ref: '#/components/schemas/Post'
  '/posts/{id}.json':
    get:
      summary: Get Post
      operationId: getPost
      tags:
        - Posts
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Post
      operationId: editPost
      tags:
        - Posts
      security:
        - basicAuth: []
      description: Most errors are silently swallowed.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'post[tag_string]':
                  type: string
                  description: Replaces all tags on the post.
                'post[old_tag_string]':
                  type: string
                  description: 'The tag string before your edits, used to reconcile conflicts.'
                'post[tag_string_diff]':
                  type: string
                  description: 'Tags with a minus are removed, else they are added. Mutually exclusive with tag_string.'
                'post[source_diff]':
                  type: string
                  description: 'Sources with a minus are removed, else they are added. It is not possible to add inactive sources through this. Mutually exclusive with source.'
                'post[source]':
                  type: string
                  description: Replaces all sources on the post.
                'post[old_source]':
                  type: string
                  description: 'The sources before your edits, used to reconcile conflicts.'
                'post[parent_id]':
                  type: integer
                'post[old_parent_id]':
                  type: integer
                'post[title]':
                  type: string
                'post[old_title]':
                  type: string
                'post[description]':
                  type: string
                'post[old_description]':
                  type: string
                'post[transcript]':
                  type: string
                'post[old_transcript]':
                  type: string
                'post[rating]':
                  $ref: '#/components/schemas/Ratings'
                'post[old_rating]':
                  $ref: '#/components/schemas/Ratings'
                'post[edit_reason]':
                  type: string
                'post[is_rating_locked]':
                  type: boolean
                  description: You must be Privileged+.
                'post[is_note_locked]':
                  type: boolean
                  description: You must be Janitor+.
                'post[bg_colo]r':
                  type: string
                  description: You must be Janitor+.
                'post[is_comment_locked]':
                  type: boolean
                  description: You must be Moderator+.
                'post[is_comment_disabled]':
                  type: boolean
                  description: You must be Admin+.
                'post[is_status_locked]':
                  type: boolean
                  description: You must be Admin+.
                'post[locked_tags]':
                  type: string
                  description: You must be Admin+.
                'post[hide_from_anonymous]':
                  type: boolean
                  description: You must be Admin+.
                'post[hide_from_search_engines]':
                  type: boolean
                  description: You must be Admin+.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/posts/{id}/update_iqdb.json':
    get:
      summary: Update Post IQDB
      operationId: updatePostIqdb
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/posts/{id}/mark_as_translated.json':
    post:
      summary: Mark Post As Translated
      operationId: markPostAsTranslated
      tags:
        - Posts
      security:
        - basicAuth: []
      description: Will error if no body is provided.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                translation_check:
                  type: boolean
                partially_translated:
                  type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/posts/{id}/copy_notes.json':
    put:
      summary: Copy Notes To Post
      operationId: copyNotesToPost
      tags:
        - Posts
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - other_post_id
              properties:
                other_post_id:
                  type: integer
      responses:
        '204':
          description: Success
        '400':
          $ref: '#/components/responses/MessageError'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/posts/{id}/revert.json':
    post:
      summary: Revert Post
      operationId: revertPost
      tags:
        - Posts
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
        - name: version_id
          in: query
          required: true
          description: The version ID to revert to.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/posts/{id}/show_seq.json':
    get:
      summary: Get Post In Sequence
      operationId: getPostInSequence
      tags:
        - Posts
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
        - name: seq
          in: query
          description: The direction to move in the sequence.
          schema:
            type: string
            enum:
              - next
              - prev
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/posts/{id}/flag.json':
    delete:
      summary: Unflag Post
      operationId: unflagPost
      tags:
        - Posts
      description: You must have the "Approve Posts" permission.
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                approval:
                  type: string
                  description: Approves the post if set to "approve".
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /posts/random.json:
    get:
      summary: Get Random Post
      operationId: getRandomPost
      tags:
        - Posts
      parameters:
        - name: tags
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '404':
          $ref: '#/components/responses/NotFound'
  '/posts/{id}/votes.json':
    post:
      summary: Create Post Vote
      operationId: createPostVote
      tags:
        - Post Votes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: string
        - name: score
          in: query
          required: true
          schema:
            type: integer
            enum:
              - -1
              - 1
        - name: no_unvote
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - score
                  - up
                  - down
                  - our_score
                properties:
                  score:
                    type: integer
                  up:
                    type: integer
                  down:
                    type: integer
                  our_score:
                    type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Post Vote
      operationId: deletePostVote
      tags:
        - Post Votes
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /post_sets.json:
    get:
      summary: Search Post Sets
      operationId: searchPostSets
      tags:
        - Post Sets
      description: 'When no results are found, an object with a `post_sets` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - name
              - shortname
              - post_count
              - postcount
              - created_at
              - updated_at
              - update
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[name]'
          schema:
            type: string
        - in: query
          name: 'search[shortname]'
          schema:
            type: string
        - in: query
          name: 'search[is_public]'
          description: You must be Moderator+.
          schema:
            type: boolean
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[maintainer_id]'
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/PostSet'
                  - type: object
                    description: No Results
                    required:
                      - post_sets
                    properties:
                      post_sets:
                        type: array
                        maxItems: 0
    post:
      summary: Create Post Set
      operationId: createPostSet
      tags:
        - Post Sets
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'post_set[name]'
                - 'post_set[shortname]'
              properties:
                'post_set[name]':
                  type: string
                'post_set[shortname]':
                  type: string
                'post_set[description]':
                  type: string
                'post_set[is_public]':
                  type: boolean
                'post_set[ransfer_on_delete]':
                  type: boolean
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostSet'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_sets/{id}.json':
    get:
      summary: Get Post Set
      operationId: getPostSet
      tags:
        - Post Sets
      description: You must be Moderator+ if the set is not public.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post set.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostSet'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Post Set
      operationId: editPostSet
      tags:
        - Post Sets
      security:
        - basicAuth: []
      description: 'You must be the owner of the set, or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post sets.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'post_set[name]':
                  type: string
                'post_set[shortname]':
                  type: string
                'post_set[description]':
                  type: string
                'post_set[is_public]':
                  type: boolean
                'post_set[transfer_on_delete]':
                  type: boolean
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Post Set
      operationId: deletePostSet
      tags:
        - Post Sets
      security:
        - basicAuth: []
      description: 'You must be the owner of the set, or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post set.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/post_sets/{id}/update_posts.json':
    post:
      summary: Update Post Set Posts
      operationId: updatePostSetPosts
      tags:
        - Post Sets
      security:
        - basicAuth: []
      description: 'You must be the owner of the set, a maintainer (if public), or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post set.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'post_set[post_ids_string]'
              properties:
                'post_set[post_ids_string]':
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostSet'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_sets/{id}/add_posts.json':
    post:
      summary: Add Posts To Post Set
      operationId: addPostsToPostSet
      tags:
        - Post Sets
      security:
        - basicAuth: []
      description: 'You must be the owner of the set, a maintainer (if public), or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post set.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_ids
              properties:
                post_ids:
                  type: array
                  description: 'post_ids[]=1&post_ids[]=2'
                  items:
                    type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostSet'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_sets/{id}/remove_posts.json':
    post:
      summary: Remove Posts From Post Set
      operationId: removePostsFromPostSet
      tags:
        - Post Sets
      security:
        - basicAuth: []
      description: 'You must be the owner of the set, a maintainer (if public), or Admin+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post set.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_ids
              properties:
                post_ids:
                  type: array
                  description: 'post_ids[]=1&post_ids[]=2'
                  items:
                    type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostSet'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /post_sets/for_select.json:
    get:
      summary: List Post Sets For Select
      operationId: listPostSetsForSelect
      tags:
        - Post Sets
      security:
        - basicAuth: []
      description: 'You must be the owner of the set, a maintainer (if public), or Admin+.'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Owned:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                  Maintained:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /post_approvals.json:
    get:
      summary: Search Post Approvals
      operationId: searchPostApprovals
      tags:
        - Post Approvals
      description: 'When no results are found, an object with an `post_approvals` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - name: 'search[post_tags_match]'
          in: query
          schema:
            type: string
        - name: 'search[user_id]'
          in: query
          schema:
            type: integer
        - name: 'search[user_name]'
          in: query
          schema:
            type: string
        - name: 'search[post_id]'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/PostApproval'
                  - type: object
                    description: No Results
                    required:
                      - post_aprovals
                    properties:
                      post_approvals:
                        type: array
                        maxItems: 0
  /post_events.json:
    get:
      summary: Search Post Events
      operationId: searchPostEvents
      tags:
        - Post Events
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[action]'
          schema:
            $ref: '#/components/schemas/PostEventActions'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post_events
                properties:
                  post_events:
                    type: array
                    items:
                      $ref: '#/components/schemas/PostEvent'
  /post_flags.json:
    get:
      summary: Search Post Flags
      operationId: searchPostFlags
      tags:
        - Post Flags
      description: 'When no results are found, an object with an `post_flags` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[reason_matches]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[post_tags_match]'
          schema:
            type: string
        - in: query
          name: 'search[type]'
          schema:
            type: string
        - in: query
          name: 'search[is_resolved]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/PostFlag'
                  - type: object
                    description: No Results
                    required:
                      - post_flags
                    properties:
                      post_flags:
                        type: array
                        maxItems: 0
    post:
      summary: Create Post Flag
      operationId: createPostFlag
      tags:
        - Post Flags
      security:
        - basicAuth: []
      description: Will error if post_id is not provided.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'post_flag[post_id]'
                - 'post_flag[reason_name]'
              properties:
                'post_flag[post_id]':
                  type: integer
                'post_flag[reason_name]':
                  type: string
                  enum:
                    - uploading_guidelines
                    - young_human
                    - dnp_artist
                    - pay_content
                    - trace
                    - previously_deleted
                    - real_porn
                    - corrupt
                    - inferior
                'post_flag[parent_id]':
                  type: integer
                'post_flag[note]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostFlag'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_flags/{id}.json':
    get:
      summary: Get Post Flag
      operationId: getPostFlag
      tags:
        - Post Flags
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post flag.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostFlag'
        '404':
          $ref: '#/components/responses/NotFound'
  /post_replacements.json:
    get:
      summary: Search Post Replacements
      operationId: searchPostReplacements
      tags:
        - Post Replacements
      description: 'When no results are found, an object with an `post_replacements` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - in: query
          name: 'search[file_ext]'
          schema:
            type: string
        - in: query
          name: 'search[md5]'
          schema:
            type: string
        - in: query
          name: 'search[status]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[approver_id]'
          schema:
            type: integer
        - in: query
          name: 'search[approver_name]'
          schema:
            type: string
        - in: query
          name: 'search[uploader_name_on_approve]'
          schema:
            type: string
        - in: query
          name: 'search[uploader_id_on_approve]'
          schema:
            type: integer
        - in: query
          name: 'search[post_id]'
          description: |
            Allows a comma separated list of up to 100 post IDs.
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          schema:
            type: string
        - in: query
          name: 'search[penalized]'
          schema:
            type: boolean
        - in: query
          name: 'search[source]'
          schema:
            type: string
        - in: query
          name: 'search[file_name]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/PostReplacement'
                  - type: object
                    description: No Results
                    required:
                      - post_replacements
                    properties:
                      post_replacements:
                        type: array
                        maxItems: 0
    post:
      summary: Create Post Replacement
      operationId: createPostReplacement
      tags:
        - Post Replacements
      security:
        - basicAuth: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - 'post_replacement[reason]'
              properties:
                'post_replacement[replacement_file]':
                  type: string
                  format: binary
                  description: Mutually exclusive with replacement_url.
                'post_replacement[replacement_url]':
                  type: string
                  description: Mutually exclusive with replacement_file.
                'post_replacement[reason]':
                  type: string
                'post_replacement[source]':
                  type: string
                'post_replacement[as_pending]':
                  type: boolean
                  description: You must be Janitor+.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - location
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  location:
                    type: string
                    example: /posts/1
        '403':
          $ref: '#/components/responses/AccessDenied'
        '412':
          $ref: '#/components/responses/MessageError'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_replacements/{id}.json':
    delete:
      summary: Delete Post Replacement
      operationId: deletePostReplacement
      tags:
        - Post Replacements
      description: You must be Admin+.
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post replacement.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/post_replacements/{id}/approve.json':
    put:
      summary: Approve Post Replacement
      operationId: approvePostReplacement
      tags:
        - Post Replacements
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post replacement.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_replacements/{id}/reject.json':
    put:
      summary: Reject Post Replacement
      operationId: rejectPostReplacement
      tags:
        - Post Replacements
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post replacement.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_replacements/{id}/promote.json':
    post:
      summary: Promote Post Replacement
      operationId: promotePostReplacement
      tags:
        - Post Replacements
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post replacement.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/post_replacements/{id}/toggle_penalize.json':
    put:
      summary: Toggle Post Replacement Penalty
      operationId: togglePostReplacementPenalty
      tags:
        - Post Replacements
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post replacement.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /post_versions.json:
    get:
      summary: Search Post Versions
      operationId: searchPostVersions
      tags:
        - Post Versions
      description: Errors if no results are found.
      parameters:
        - $ref: '#/components/parameters/limit'
        - name: page
          in: query
          description: 'The page number of results to get. Between 1 and 750. Note that for post versions specifically, you can only go through the 10,000 most recent results with page numbers.'
          schema:
            type: integer
            minimum: 1
            maximum: 750
        - $ref: '#/components/parameters/id'
        - in: query
          name: 'search[updater_name]'
          schema:
            type: string
        - in: query
          name: 'search[updater_id]'
          schema:
            type: integer
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[start_id]'
          schema:
            type: integer
        - in: query
          name: 'search[rating]'
          schema:
            $ref: '#/components/schemas/Ratings'
        - in: query
          name: 'search[rating_changed]'
          schema:
            type: string
            enum:
              - e
              - q
              - s
              - any
        - in: query
          name: 'search[parent_id]'
          schema:
            type: integer
        - in: query
          name: 'search[parent_id_changed]'
          schema:
            type: boolean
        - in: query
          name: 'search[tags]'
          schema:
            type: string
        - in: query
          name: 'search[tags_removed]'
          schema:
            type: string
        - in: query
          name: 'search[tags_added]'
          schema:
            type: string
        - in: query
          name: 'search[locked_tags]'
          schema:
            type: string
        - in: query
          name: 'search[locked_tags_removed]'
          schema:
            type: string
        - in: query
          name: 'search[locked_tags_added]'
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          schema:
            type: string
        - in: query
          name: 'search[title]'
          schema:
            type: string
        - in: query
          name: 'search[title_changed]'
          schema:
            type: boolean
        - in: query
          name: 'search[description]'
          schema:
            type: string
        - in: query
          name: 'search[description_changed]'
          schema:
            type: boolean
        - in: query
          name: 'search[transcript]'
          schema:
            type: string
        - in: query
          name: 'search[transcript_changed]'
          schema:
            type: boolean
        - in: query
          name: 'search[source_changed]'
          schema:
            type: boolean
        - in: query
          name: 'search[uploads]'
          schema:
            type: string
            enum:
              - included
              - excluded
              - only
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PostVersion'
  '/post_versions/{id}/hide.json':
    put:
      summary: Hide Post Version
      operationId: hidePostVersion
      tags:
        - Post Versions
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post version.
          schema:
            type: integer
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/post_versions/{id}/unhide.json':
    put:
      summary: Unhide Post Version
      operationId: unhidePostVersion
      tags:
        - Post Versions
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post version.
          schema:
            type: integer
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /post_votes/lock.json:
    post:
      summary: Lock Post Vote
      operationId: lockPostVote
      tags:
        - Post Votes
      security:
        - basicAuth: []
      description: You must be Moderator+. Errors if ids is not provided.
      parameters:
        - name: ids
          in: query
          required: true
          description: 'The IDs of the post votes, comma separated.'
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /post_votes/delete.json:
    post:
      summary: Delete Post Vote
      operationId: deletePostVotes
      tags:
        - Post Votes
      security:
        - basicAuth: []
      description: You must be Admin+. Errors if ids is not provided.
      parameters:
        - name: ids
          in: query
          required: true
          description: 'The IDs of the post votes, comma separated.'
          schema:
            type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
  /tags.json:
    get:
      summary: Search Tags
      operationId: searchTags
      tags:
        - Tags
      description: 'When no results are found, an object with an `tags` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - name
              - date
              - count
              - similarity
        - in: query
          name: 'search[fuzzy_name_matches]'
          schema:
            type: string
        - in: query
          name: 'search[name_matches]'
          schema:
            type: string
        - in: query
          name: 'search[name]'
          schema:
            type: string
        - in: query
          name: 'search[category]'
          schema:
            $ref: '#/components/schemas/TagCategories'
        - in: query
          name: 'search[hide_empty]'
          schema:
            type: boolean
        - in: query
          name: 'search[has_wiki]'
          schema:
            type: boolean
        - in: query
          name: 'search[has_artist]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Tag'
                  - type: object
                    description: No Results
                    required:
                      - tags
                    properties:
                      tags:
                        type: array
                        maxItems: 0
  '/tags/{id}.json':
    get:
      summary: Get Tag
      operationId: getTag
      tags:
        - Tags
      parameters:
        - name: id
          in: path
          required: true
          description: The ID or name of the tag.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Tag
      operationId: editTag
      tags:
        - Tags
      security:
        - basicAuth: []
      description: Must be Admin+ if the tag is locked or post count is >100.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'tag[category]':
                  $ref: '#/components/schemas/TagCategories'
                'tag[is_locked]':
                  description: Must be Admin+.
                  type: boolean
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Tag
      operationId: deleteTag
      tags:
        - Tags
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '302':
          description: Failure
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/tags/{id}/correction.json':
    get:
      summary: Get Tag Correction
      operationId: getTagCorrection
      tags:
        - Tags
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    type: object
                    required:
                      - post_count
                      - real_post_count
                      - category
                      - category_cache
                      - tag
                    properties:
                      post_count:
                        type: integer
                      real_post_count:
                        type: integer
                      category:
                        $ref: '#/components/schemas/TagCategories'
                      category_cache:
                        $ref: '#/components/schemas/TagCategories'
                      tag:
                        $ref: '#/components/schemas/Tag'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      summary: Correct Tag
      operationId: correctTag
      tags:
        - Tags
      security:
        - basicAuth: []
      description: You must be Janitor+. `commit=Fix` must be set.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - commit
              properties:
                commit:
                  type: string
                  description: 'If not set, nothing will happen.'
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /tags/preview.json:
    post:
      summary: Preview Tags
      operationId: previewTags
      tags:
        - Tags
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - tags
              properties:
                tags:
                  type: string
                  description: 'The tags to preview, space separated.'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TagPreview'
        '403':
          $ref: '#/components/responses/AccessDenied'
  /tag_type_versions.json:
    get:
      summary: Search Tag Versions
      operationId: searchTagVersions
      tags:
        - Tag Versions
      description: 'When no results are found, an object with an `tag_type_versions` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[tag]'
          in: query
          schema:
            type: string
        - name: 'search[user_id]'
          in: query
          schema:
            type: string
        - name: 'search[user_name]'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/TagTypeVersion'
                  - type: object
                    description: No Results
                    required:
                      - tag_type_versions
                    properties:
                      tag_type_versions:
                        type: array
                        maxItems: 0
  /tag_aliases.json:
    get:
      summary: Search Tag Aliases
      operationId: searchTagAliases
      tags:
        - Tag Aliases
      description: 'When no results are found, an object with an `tag_aliases` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - created_at
              - updated_at
              - name
              - tag_count
        - in: query
          name: 'search[name_matches]'
          schema:
            type: string
        - in: query
          name: 'search[antecedent_name]'
          schema:
            type: string
        - in: query
          name: 'search[consequent_name]'
          schema:
            type: string
        - in: query
          name: 'search[status]'
          schema:
            $ref: '#/components/schemas/TagRequestStatuses'
        - in: query
          name: 'search[antecedent_tag_category]'
          schema:
            $ref: '#/components/schemas/TagCategories'
        - in: query
          name: 'search[consequent_tag_category]'
          schema:
            $ref: '#/components/schemas/TagCategories'
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[approver_id]'
          schema:
            type: integer
        - in: query
          name: 'search[approver_name]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/TagAlias'
                  - type: object
                    description: No Results
                    required:
                      - tag_aliases
                    properties:
                      tag_aliases:
                        type: array
                        maxItems: 0
  '/tag_aliases/{id}.json':
    get:
      summary: Get Tag Alias
      operationId: getTagAlias
      tags:
        - Tag Aliases
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag alias.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagAlias'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Tag Alias
      operationId: editTagAlias
      tags:
        - Tag Aliases
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag alias.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'tag_alias[antecedent_name]':
                  type: string
                'tag_alias[consequent_name]':
                  type: string
                'tag_alias[forum_topic_id]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Reject Tag Alias
      operationId: rejectTagAlias
      tags:
        - Tag Aliases
      description: 'You must be the creator of the request (if pending), or Admin+.'
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag alias.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/tag_aliases/{id}/approve.json':
    post:
      summary: Approve Tag Alias
      operationId: approveTagAlias
      tags:
        - Tag Aliases
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag alias.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /tag_alias_requests.json:
    post:
      summary: Create Tag Alias
      operationId: createTagAlias
      tags:
        - Tag Aliases
      security:
        - basicAuth: []
      description: Errors will result in a 406 with no information.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'tag_alias[antecedent_name]'
                - 'tag_alias[consequent_name]'
                - 'tag_alias[reason]'
              properties:
                'tag_alias[antecedent_name]':
                  type: string
                'tag_alias[consequent_name]':
                  type: string
                'tag_alias[reason]':
                  type: string
                'tag_alias[skip_forum]':
                  type: boolean
                  description: Must be Admin+.
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '406':
          description: Failure
  /tag_implications.json:
    get:
      summary: Search Tag Implications
      operationId: searchTagImplications
      tags:
        - Tag Implications
      description: 'When no results are found, an object with an `tag_implications` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - created_at
              - updated_at
              - name
              - tag_count
        - in: query
          name: 'search[name_matches]'
          schema:
            type: string
        - in: query
          name: 'search[antecedent_name]'
          schema:
            type: string
        - in: query
          name: 'search[consequent_name]'
          schema:
            type: string
        - in: query
          name: 'search[status]'
          schema:
            $ref: '#/components/schemas/TagRequestStatuses'
        - in: query
          name: 'search[antecedent_tag_category]'
          schema:
            $ref: '#/components/schemas/TagCategories'
        - in: query
          name: 'search[consequent_tag_category]'
          schema:
            $ref: '#/components/schemas/TagCategories'
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[approver_id]'
          schema:
            type: integer
        - in: query
          name: 'search[approver_name]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/TagImplication'
                  - type: object
                    description: No Results
                    required:
                      - tag_implications
                    properties:
                      tag_implications:
                        type: array
                        maxItems: 0
  '/tag_implications/{id}.json':
    get:
      summary: Get Tag Implication
      operationId: getTagImplication
      tags:
        - Tag Implications
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag implication.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagImplication'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Tag Implication
      operationId: editTagImplication
      tags:
        - Tag Implications
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag implication.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'tag_implication[antecedent_name]':
                  type: string
                'tag_implication[consequent_name]':
                  type: string
                'tag_implication[forum_topic_id]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Reject Tag Implication
      operationId: rejectTagImplication
      tags:
        - Tag Implications
      description: 'You must be the creator of the request (if pending), or Admin+.'
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag implication.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/tag_implications/{id}/approve.json':
    post:
      summary: Approve Tag Implication
      operationId: approveTagImplication
      tags:
        - Tag Implications
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the tag implication.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /tag_implication_requests.json:
    post:
      summary: Create Tag Implication
      operationId: createTagImplication
      tags:
        - Tag Implications
      security:
        - basicAuth: []
      description: Errors will result in a 406 with no information.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'tag_implication[antecedent_name]'
                - 'tag_implication[consequent_name]'
                - 'tag_implication[reason]'
              properties:
                'tag_implication[antecedent_name]':
                  type: string
                'tag_implication[consequent_name]':
                  type: string
                'tag_implication[reason]':
                  type: string
                'tag_implication[skip_forum]':
                  type: boolean
                  description: Must be Admin+.
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '406':
          description: Failure
  /related_tag/bulk.json:
    post:
      summary: List Bulk Related Tags
      operationId: listBulkRelatedTags
      tags:
        - Related Tags
      security:
        - basicAuth: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                category_id:
                  $ref: '#/components/schemas/TagCategories'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkRelatedTag'
                example:
                  - male:
                      - name: male
                        count: 0
                        category_id: 0
        '403':
          $ref: '#/components/responses/AccessDenied'
  /staff_notes.json:
    get:
      summary: Search Staff Notes
      operationId: searchStaffNotes
      tags:
        - Staff Notes
      description: 'When no results are found, an object with an `staff_notes` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - name: 'search[creator_id]'
          in: query
          schema:
            type: integer
        - name: 'search[creator_name]'
          in: query
          schema:
            type: string
        - name: 'search[updater_id]'
          in: query
          schema:
            type: integer
        - name: 'search[updater_name]'
          in: query
          schema:
            type: string
        - name: 'search[user_id]'
          in: query
          schema:
            type: integer
        - name: 'search[user_name]'
          in: query
          schema:
            type: string
        - name: 'search[body_matches]'
          in: query
          schema:
            type: string
        - name: 'search[without_system_user]'
          in: query
          schema:
            type: boolean
        - name: 'search[include_deleted]'
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/StaffNote'
                  - type: object
                    description: No Results
                    required:
                      - staff_notes
                    properties:
                      blips:
                        type: array
                        maxItems: 0
    post:
      summary: Create Staff Note
      operationId: createStaffNote
      tags:
        - Staff Notes
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'staff_note[body]'
              properties:
                'staff_note[body]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaffNote'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/staff_notes/{id}.json':
    get:
      summary: Get Staff Note
      operationId: getStaffNote
      tags:
        - Staff Notes
      parameters:
        - name: id
          in: path
          description: The ID of the staff note to get.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StaffNote'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Staff Note
      operationId: editStaffNote
      tags:
        - Staff Notes
      security:
        - basicAuth: []
      description: You must be the creator or Admin+.
      parameters:
        - name: id
          in: path
          description: The ID of the staff note.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'staff_note[body]':
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaffNote'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/staff_notes/{id}/delete.json':
    put:
      summary: Delete Staff Note
      operationId: deleteStaffNote
      tags:
        - Staff Notes
      security:
        - basicAuth: []
      description: |
        You must be the creator or Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the staff note.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaffNote'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/staff_notes/{id}/undelete.json':
    put:
      summary: Undelete Staff Note
      operationId: undeleteStaffNote
      tags:
        - Staff Notes
      security:
        - basicAuth: []
      description: |
        You must be the creator or Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the staff note.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaffNote'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /takedowns.json:
    get:
      summary: Search Takedowns
      operationId: searchTakedowns
      tags:
        - Takedowns
      description: 'When no results are found, an object with an `takedowns` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - in: query
          name: 'search[order]'
          schema:
            type: string
            description: Must Admin+ to use.
            enum:
              - id_asc
              - id_desc
              - status
              - post_count
        - in: query
          name: 'search[status]'
          schema:
            type: string
        - in: query
          name: 'search[source]'
          description: Must be Moderator+ to use.
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          description: Must be Moderator+ to use.
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          description: Must be Moderator+ to use.
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          description: Must be Moderator+ to use.
          schema:
            type: string
        - in: query
          name: 'search[reason_hidden]'
          description: Must be Moderator+ to use.
          schema:
            type: boolean
        - in: query
          name: 'search[instructions]'
          description: Must be Moderator+ to use.
          schema:
            type: string
        - in: query
          description: Must be Moderator+ to use.
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          description: Must be Moderator+ to use.
          name: 'search[notes]'
          schema:
            type: string
        - in: query
          name: 'search[creator_logged_in]'
          description: Must be Moderator+ to use.
          schema:
            type: boolean
        - in: query
          description: Must be Admin+ to use.
          name: 'search[email]'
          schema:
            type: string
        - in: query
          name: 'search[vericode]'
          description: Must be Admin+ to use.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Takedown'
                  - type: object
                    description: No Results
                    required:
                      - takedowns
                    properties:
                      takedowns:
                        type: array
                        maxItems: 0
    post:
      summary: Create Takedown
      operationId: createTakedown
      tags:
        - Takedowns
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'takedown[email]'
                - 'takedown[reason]'
              properties:
                'takedown[email]':
                  type: string
                'takedown[source]':
                  type: string
                'takedown[instructions]':
                  type: string
                'takedown[reason]':
                  type: string
                'takedown[post_ids]':
                  type: array
                  description: 'takedown[post_ids][]=1&takedown[post_ids][]=2'
                  items:
                    type: integer
                'takedown[reason_hidden]':
                  type: boolean
                'takedown[notes]':
                  type: string
                  description: Must have the bd staff user flag to use.
                'takedown[del_post_ids]':
                  type: array
                  description: |
                    Must have the bd staff user flag to use.
                    takedown[del_post_ids][]=1&takedown[del_post_ids][]=2
                  items:
                    type: integer
                'takedown[status]':
                  type: string
                  description: Must have the bd staff user flag to use.
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Takedown'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/takedowns/{id}.json':
    get:
      summary: Get Takedown
      operationId: getTakedown
      tags:
        - Takedowns
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Takedown'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Takedown
      operationId: editTakedown
      tags:
        - Takedowns
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'takedown[notes]':
                  type: string
                'takedown[reason_hidden]':
                  type: boolean
                takedown_posts:
                  type: string
                process_takedown:
                  type: boolean
                  description: 'If not truthy, the takedown will be denied.'
                delete_reason:
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Takedown
      operationId: deleteTakedown
      tags:
        - Takedowns
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/takedowns/{id}/add_by_ids.json':
    post:
      summary: Add Posts To Takedown By IDs
      operationId: addPostsToTakedownByIds
      tags:
        - Takedowns
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_ids
              properties:
                post_ids:
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - added_count
                  - added_post_ids
                properties:
                  added_count:
                    type: integer
                  added_post_ids:
                    type: array
                    items:
                      type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/takedowns/{id}/add_by_tags.json':
    post:
      summary: Add Posts To Takedown By Tags
      operationId: addPostsToTakedownByTags
      tags:
        - Takedowns
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_tags
              properties:
                post_tags:
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - added_count
                  - added_post_ids
                properties:
                  added_count:
                    type: integer
                  added_post_ids:
                    type: array
                    items:
                      type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/takedowns/{id}/count_matching_posts.json':
    post:
      summary: Count Matching Posts
      operationId: countMatchingPosts
      tags:
        - Takedowns
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_tags
              properties:
                post_tags:
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - matched_post_count
                properties:
                  matched_post_count:
                    type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/takedowns/{id}/remove_by_ids.json':
    post:
      summary: Remove Posts From Takedown By IDs
      operationId: removePostsFromTakedownByIds
      tags:
        - Takedowns
      security:
        - basicAuth: []
      description: You must have the bd staff user flag.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the takedown.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_ids
              properties:
                post_ids:
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /tickets.json:
    get:
      summary: Search Tickets
      operationId: searchTickets
      tags:
        - Tickets
      description: 'You must be Janitor+ to see tickets you did not create. When no results are found, an object with an `tickets` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - in: query
          name: 'search[creator_name]'
          description: You must be Janitor+.
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          description: You must be Janitor+ unless providing your own id.
          schema:
            type: integer
        - in: query
          name: 'search[claimant_name]'
          description: You must be Janitor+.
          schema:
            type: string
        - in: query
          name: 'search[claimant_id]'
          description: You must be Janitor+.
          schema:
            type: integer
        - in: query
          name: 'search[accused_name]'
          description: You must be Janitor+.
          schema:
            type: string
        - in: query
          name: 'search[accused_id]'
          description: You must be Janitor+.
          schema:
            type: integer
        - in: query
          name: 'search[qtype]'
          schema:
            $ref: '#/components/schemas/TicketTypes'
        - in: query
          name: 'search[reason]'
          description: You must be Janitor+.
          schema:
            type: string
        - in: query
          name: 'search[status]'
          schema:
            type: string
            enum:
              - pending
              - partial
              - approved
              - pending_claimed
              - pending_unclaimed
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Ticket'
                  - type: object
                    description: No Results
                    required:
                      - tickets
                    properties:
                      tickets:
                        type: array
                        maxItems: 0
        '403':
          $ref: '#/components/responses/AccessDenied'
  '/tickets/{id}.json':
    get:
      summary: Get Ticket
      operationId: getTicket
      tags:
        - Tickets
      security:
        - basicAuth: []
      description: You must be Janitor+ to see tickets you did not create.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the ticket.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticket'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Ticket
      operationId: editTicket
      tags:
        - Tickets
      description: You must be Moderator+.
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the ticket.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'ticket[response]'
              properties:
                'ticket[status]':
                  type: string
                  enum:
                    - partial
                    - approved
                'ticket[response]':
                  type: string
                'ticket[record_type]':
                  $ref: '#/components/schemas/WarningTypes'
                'ticket[send_update_dmail]':
                  type: boolean
                  description: An update dmail will always be sent when the status is changed.
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/tickets/{id}/claim.json':
    post:
      summary: Claim Ticket
      operationId: claimTicket
      tags:
        - Tickets
      description: You must be Moderator+. Errors are quietly swallowed and shown as notices in html.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the ticket.
          schema:
            type: integer
      security:
        - basicAuth: []
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticket'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/tickets/{id}/unclaim.json':
    post:
      summary: Unclaim Ticket
      operationId: unclaimTicket
      tags:
        - Tickets
      description: You must be Moderator+. Errors are quietly swallowed and shown as notices in html.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the ticket.
          schema:
            type: integer
      security:
        - basicAuth: []
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticket'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /uploads.json:
    get:
      summary: Search Uploads
      operationId: searchUploads
      tags:
        - Uploads
      description: 'You must be Janitor+. When no results are found, an object with an `uploads` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[uploader_id]'
          schema:
            type: integer
        - in: query
          name: 'search[uploader_name]'
          schema:
            type: string
        - in: query
          name: 'search[source]'
          schema:
            type: string
        - in: query
          name: 'search[source_matches]'
          schema:
            type: string
        - in: query
          name: 'search[rating]'
          schema:
            $ref: '#/components/schemas/Ratings'
        - in: query
          name: 'search[parent_id]'
          schema:
            type: integer
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[has_post]'
          schema:
            type: boolean
        - in: query
          name: 'search[post_tags_match]'
          schema:
            type: string
        - in: query
          name: 'search[status]'
          schema:
            type: string
            description: |
              Note: The "error" status will be proceeded by an error, ex: "error: RuntimeError - No file or source URL provided"
            enum:
              - completed
              - processing
              - pending
              - error
        - in: query
          name: 'search[backtrace]'
          schema:
            type: string
        - in: query
          name: 'search[tag_string]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Upload'
                  - type: object
                    description: No Results
                    required:
                      - uploads
                    properties:
                      uploads:
                        type: array
                        maxItems: 0
    post:
      summary: Upload Post
      operationId: uploadPost
      tags:
        - Uploads
        - Posts
      security:
        - basicAuth: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - 'upload[tag_string]'
                - 'upload[rating]'
              properties:
                'upload[file]':
                  type: string
                  format: binary
                  description: Mutually exclusive with direct_url.
                'upload[direct_url]':
                  type: string
                  description: Mutually exclusive with file.
                'upload[source]':
                  type: string
                'upload[tag_string]':
                  type: string
                'upload[rating]':
                  $ref: '#/components/schemas/Ratings'
                'upload[parent_id]':
                  type: integer
                'upload[title]':
                  type: string
                'upload[description]':
                  type: string
                'upload[transcript]':
                  type: string
                'upload[as_pending]':
                  type: boolean
                  description: Must have the "Unrestricted Uploads" permission.
                'upload[locked_rating]':
                  type: boolean
                  description: Must be Privileged+ to use.
                'upload[locked_tags]':
                  type: string
                  description: Must be Admin+ to use.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - location
                  - post_id
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  location:
                    type: string
                  post_id:
                    type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '412':
          $ref: '#/components/responses/MessageError'
  '/uploads/{id}.json':
    get:
      summary: Get Upload
      operationId: getUpload
      tags:
        - Uploads
      description: You must be Janitor+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the upload.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /upload_whitelists.json:
    get:
      summary: Search Upload Whitelists
      operationId: searchUploadWhitelists
      tags:
        - Upload Whitelists
      description: 'When no results are found, an object with an `upload_whitelists` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - pattern
              - updated_at
              - created_at
        - in: query
          name: 'search[pattern]'
          schema:
            type: string
        - in: query
          name: 'search[note]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/UploadWhitelist'
                  - type: object
                    description: No Results
                    required:
                      - upload_whitelists
                    properties:
                      upload_whitelists:
                        type: array
                        maxItems: 0
    post:
      summary: Create Upload Whitelist
      operationId: createUploadWhitelist
      tags:
        - Upload Whitelists
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'upload_whitelist[allowed]'
                - 'upload_whitelist[pattern]'
              properties:
                'upload_whitelist[allowed]':
                  type: string
                'upload_whitelist[pattern]':
                  type: string
                'upload_whitelist[reason]':
                  type: string
                'upload_whitelist[note]':
                  type: string
                'upload_whitelist[hidden]':
                  type: boolean
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadWhitelist'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/upload_whitelists/{id}.json':
    patch:
      summary: Edit Upload Whitelist
      operationId: editUploadWhitelist
      tags:
        - Upload Whitelists
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the upload whitelist entry.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'upload_whitelist[allowed]':
                  type: string
                'upload_whitelist[pattern]':
                  type: string
                'upload_whitelist[reason]':
                  type: string
                'upload_whitelist[note]':
                  type: string
                'upload_whitelist[hidden]':
                  type: boolean
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Upload Whitelist
      operationId: deleteUploadWhitelist
      tags:
        - Upload Whitelists
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the upload whitelist.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/upload_whitelists/{id}/is_allowed.json':
    get:
      summary: Check If URL Is Allowed
      operationId: checkIfUrlIsAllowed
      tags:
        - Upload Whitelists
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the upload whitelist.
          schema:
            type: integer
        - name: url
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - url
                  - domain
                  - is_allowed
                  - reason
                properties:
                  url:
                    type: string
                  domain:
                    type: string
                  is_allowed:
                    type: boolean
                  reason:
                    type: string
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /users.json:
    get:
      summary: Search Users
      operationId: searchUsers
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - name
              - post_upload_count
              - note_count
              - post_update_count
        - in: query
          name: 'search[name_matches]'
          schema:
            type: string
        - in: query
          name: 'search[about_me]'
          schema:
            type: string
        - in: query
          name: 'search[avatar_id]'
          schema:
            type: integer
        - in: query
          name: 'search[level]'
          schema:
            type: integer
        - in: query
          name: 'search[min_level]'
          schema:
            type: integer
        - in: query
          name: 'search[max_level]'
          schema:
            type: integer
        - in: query
          name: 'search[can_upload_free]'
          schema:
            type: boolean
        - in: query
          name: 'search[can_approve_posts]'
          schema:
            type: boolean
        - in: query
          name: 'search[email_matches]'
          description: You must be Admin+.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/User'
                    - $ref: '#/components/schemas/FullUser'
  '/users/{id}.json':
    get:
      summary: Get User
      operationId: getUser
      tags:
        - Users
      parameters:
        - name: id
          in: path
          required: true
          description: The ID or Username of the user.
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/UserResponse'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Current User
      operationId: editCurrentUser
      tags:
        - Users
      parameters:
        - name: id
          in: path
          required: true
          description: 'The ID of the user. The actual value is ignored, but something must be supplied.'
          schema:
            type: integer
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'user[comment_threshold]':
                  type: number
                'user[default_image_size]':
                  type: string
                  enum:
                    - large
                    - fit
                    - fitv
                    - original
                'user[favorite_tags]':
                  type: string
                'user[blacklisted_tags]':
                  type: string
                'user[time_zone]':
                  type: string
                  description: 'https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'
                'user[per_page]':
                  type: integer
                'user[custom_style]':
                  type: string
                'user[description_collapsed_initially]':
                  type: boolean
                'user[hide_comments]':
                  type: boolean
                'user[receive_email_notifications]':
                  type: boolean
                'user[enable_keyboard_navigation]':
                  type: boolean
                'user[enable_privacy_mode]':
                  type: boolean
                'user[disable_user_dmails]':
                  type: boolean
                'user[blacklist_users]':
                  type: boolean
                'user[show_post_statistics]':
                  type: boolean
                'user[style_usernames]':
                  type: boolean
                'user[show_hidden_comments]':
                  type: boolean
                'user[enable_autocomplete]':
                  type: boolean
                'user[disable_cropped_thumbnails]':
                  type: boolean
                'user[enable_safe_mode]':
                  type: boolean
                'user[disable_responsive_mode]':
                  type: boolean
                'user[dmail_filter_attributes][id]':
                  type: integer
                'user[dmail_filter_attributes][words]':
                  type: string
                'user[profile_about]':
                  type: string
                'user[profile_artinfo]':
                  type: string
                'user[avatar_id]':
                  type: integer
                'user[enable_compact_uploader]':
                  type: boolean
                  description: You must have uploaded at least 10 posts.
                'user[forum_notification_dot]':
                  type: boolean
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/users/{id}/upload_limit.json':
    get:
      summary: Get User Upload Limit
      operationId: getUserUploadLimit
      tags:
        - Users
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
      responses:
        '200':
          $ref: '#/components/responses/UserResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
  '/users/{id}/flush_favorites.json':
    post:
      summary: Clear User Favorites
      operationId: clearUserFavorites
      tags:
        - Users
      description: You must be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{id}/fix_counts.json':
    get:
      summary: Fix Specific User Counts
      operationId: fixSpecificUserCounts
      tags:
        - Users
      description: You must be Janitor+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{id}/toggle_uploads.json':
    get:
      summary: Toggle User Uploads
      operationId: toggleUserUploads
      tags:
        - Users
      description: You must be Janitor+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /maintenance/user/count_fixes.json:
    post:
      summary: Fix User Counts
      operationId: fixUserCounts
      tags:
        - Users
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
  /maintenance/user/dmail_filter.json:
    patch:
      summary: Update User Dmail Filter
      operationId: updateUserDmailFilter
      tags:
        - DMails
      parameters:
        - name: dmail_id
          in: query
          required: true
          description: 'Due to the odd way this route works, a dmail is REQUIRED to edit your dmail filter. You must be the owner of the dmail.'
          schema:
            type: integer
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'dmail_filter[words]'
              properties:
                'dmail_filter[words]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
  /user_feedbacks.json:
    get:
      summary: Search User Feedbacks
      operationId: searchUserFeedbacks
      tags:
        - User Feedbacks
      description: 'When no results are found, an object with an `user_feedbacks` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[deleted]'
          description: You must be Janitor+.
          schema:
            type: string
            enum:
              - included
              - excluded
              - only
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
        - in: query
          name: 'search[user_id]'
          schema:
            type: integer
        - in: query
          name: 'search[user_name]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[category]'
          schema:
            $ref: '#/components/schemas/FeedbackCategories'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/UserFeedback'
                  - type: object
                    description: No Results
                    required:
                      - user_feedbacks
                    properties:
                      user_feedbacks:
                        type: array
                        maxItems: 0
    post:
      summary: Create User Feedback
      operationId: createUserFeedback
      tags:
        - User Feedbacks
      security:
        - basicAuth: []
      description: You must be Moderator+.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'user_feedback[body]'
                - 'user_feedback[category]'
              properties:
                'user_feedback[user_id]':
                  type: integer
                'user_feedback[user_name]':
                  type: string
                'user_feedback[body]':
                  type: string
                'user_feedback[category]':
                  $ref: '#/components/schemas/FeedbackCategories'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFeedback'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/user_feedbacks/{id}.json':
    get:
      summary: Get User Feedback
      operationId: getUserFeedback
      tags:
        - User Feedbacks
      description: You must be Janitor+ if the feedback is deleted.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the feedback.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFeedback'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit User Feedback
      operationId: editUserFeedback
      tags:
        - User Feedbacks
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the feedback.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'user_feedback[body]':
                  type: string
                'user_feedback[category]':
                  $ref: '#/components/schemas/FeedbackCategories'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Destroy User Feedback
      operationId: destroyUserFeedback
      tags:
        - User Feedbacks
      security:
        - basicAuth: []
      description: 'You must be Admin+, or the creator and Moderator+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the feedback.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/user_feedbacks/{id}/delete.json':
    put:
      summary: Delete User Feedback
      operationId: deleteUserFeedback
      tags:
        - User Feedbacks
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the feedback.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/user_feedbacks/{id}/undelete.json':
    put:
      summary: Undelete User Feedback
      operationId: undeleteUserFeedback
      tags:
        - User Feedbacks
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the feedback.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /user_name_change_requests.json:
    get:
      summary: Search User Name Change Requests
      operationId: searchUserNameChangeRequests
      tags:
        - User Name Change Requests
      security:
        - basicAuth: []
      description: 'You must be Moderator+. When no results are found, an object with an `user_name_change_requests` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[current_id]'
          schema:
            type: integer
        - in: query
          name: 'search[current_name]'
          schema:
            type: string
        - in: query
          name: 'search[original_name]'
          schema:
            type: string
        - in: query
          name: 'search[desired_name]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/UserNameChangeRequest'
                  - type: object
                    description: No Results
                    required:
                      - user_name_change_requests
                    properties:
                      user_name_change_requests:
                        type: array
                        maxItems: 0
    post:
      summary: Create User Name Change Request
      operationId: createUserNameChangeRequest
      tags:
        - User Name Change Requests
      security:
        - basicAuth: []
      description: You must be Moderator+.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'user_name_change_request[desired_name]'
              properties:
                'user_name_change_request[desired_name]':
                  type: string
                'user_name_change_request[change_reason]':
                  type: string
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/user_name_change_requests/{id}.json':
    get:
      summary: Get User Name Change Request
      operationId: getUserNameChangeRequest
      tags:
        - User Name Change Requests
      security:
        - basicAuth: []
      description: You must be the creator of the request or Moderator+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the name change request.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNameChangeRequest'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /wiki_pages.json:
    get:
      summary: Search Wiki Pages
      operationId: searchWikiPages
      tags:
        - Wiki Pages
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - title
              - post_count
        - in: query
          name: 'search[title]'
          schema:
            type: string
        - in: query
          name: 'search[title_matches]'
          schema:
            type: string
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
        - in: query
          name: 'search[other_names_match]'
          schema:
            type: string
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[parent]'
          schema:
            type: string
        - in: query
          name: 'search[other_names_present]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_locked]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_deleted]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WikiPage'
    post:
      summary: Create Wiki Page
      operationId: createWikiPage
      tags:
        - Wiki Pages
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'wiki_page[title]'
                - 'wiki_page[body]'
              properties:
                'wiki_page[title]':
                  type: string
                'wiki_page[body]':
                  type: string
                'wiki_page[edit_reason]':
                  type: string
                'wiki_page[parent]':
                  type: string
                  description: Must be Privileged+ to use.
                'wiki_page[is_locked]':
                  type: boolean
                  description: Must be Janitor+ to use.
                'wiki_page[is_deleted]':
                  type: boolean
                  description: Must be Janitor+ to use.
                'wiki_page[skip_secondary_validations]':
                  type: boolean
                  description: Must be Janitor+ to use.
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WikiPage'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/wiki_pages/{id}.json':
    get:
      summary: Get Wiki Page
      operationId: getWikiPage
      tags:
        - Wiki Pages
      parameters:
        - name: id
          in: path
          required: true
          description: The ID or name of the wiki page.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WikiPage'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Wiki Page
      operationId: editWikiPage
      tags:
        - Wiki Pages
      security:
        - basicAuth: []
      description: You must be Janitor+ if the wiki page is locked.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the wiki page.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'wiki_page[body]':
                  type: string
                'wiki_page[edit_reason]':
                  type: string
                'wiki_page[parent]':
                  type: string
                  description: Must be Privileged+ to use.
                'wiki_page[title]':
                  type: string
                  description: Must be Janitor+ to use.
                'wiki_page[is_locked]':
                  type: boolean
                  description: Must be Janitor+ to use.
                'wiki_page[is_deleted]':
                  type: boolean
                  description: Must be Janitor+ to use.
                'wiki_page[skip_secondary_validations]':
                  type: boolean
                  description: Must be Janitor+ to use.
                'wiki_page[category_id]':
                  $ref: '#/components/schemas/TagCategories'
                'wiki_page[category_is_locked]':
                  type: boolean
                  description: Must be Admin+ to use.
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Delete Wiki Page
      operationId: deleteWikiPage
      tags:
        - Wiki Pages
      security:
        - basicAuth: []
      description: You must be Admin+
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the wiki page.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/wiki_page/{id}/revert.json':
    put:
      summary: Revert Wiki Page
      operationId: revertWikiPage
      tags:
        - Wiki Pages
      security:
        - basicAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the wiki page.
          schema:
            type: integer
        - name: version_id
          in: query
          required: true
          description: The version ID to revert to.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /wiki_page_versions.json:
    get:
      summary: Search Wiki Page Versions
      operationId: searchWikiPageVersions
      tags:
        - Wiki Page Versions
      description: 'When no results are found, an object with an `wiki_page_versions` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/ip_addr'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
        - in: query
          name: 'search[updater_id]'
          schema:
            type: integer
        - in: query
          name: 'search[updater_name]'
          schema:
            type: string
        - in: query
          name: 'search[wiki_page_id]'
          schema:
            type: integer
        - in: query
          name: 'search[title]'
          schema:
            type: string
        - in: query
          name: 'search[body]'
          schema:
            type: string
        - in: query
          name: 'search[is_locked]'
          schema:
            type: boolean
        - in: query
          name: 'search[is_deleted]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/WikiPageVersion'
                  - type: object
                    description: No Results
                    required:
                      - wiki_page_versions
                    properties:
                      wiki_page_versions:
                        type: array
                        maxItems: 0
  '/wiki_page_versions/{id}.json':
    get:
      summary: Get Wiki Page Version
      operationId: getWikiPageVersion
      tags:
        - Wiki Page Versions
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the wiki page version.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WikiPageVersion'
        '404':
          $ref: '#/components/responses/NotFound'
  /admin/users/alt_list.json:
    get:
      summary: Get Alt List
      operationId: getAltList
      tags:
        - Admin Users
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - name: page
          in: query
          description: The page number of results to get. Between 1 and 9999.
          schema:
            type: integer
            minimum: 1
            maximum: 9999
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - type: integer
                      description: ID of concerned user.
                    - type: array
                      items:
                        type: integer
                        description: ID of suspected alt.
  '/admins/users/{id}.json':
    patch:
      summary: Admin Edit User
      operationId: adminEditUser
      tags:
        - Admin Users
      security:
        - basicAuth: []
      description: 'You must be Admin+. If editing an Admin+, you must be Owner+.'
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'user[verified]':
                  type: boolean
                  description: Must have the bd staff user flag to use.
                'user[level]':
                  type: integer
                  description: Must have the bd staff user flag to promote to Admin+.
                'user[name]':
                  type: string
                'user[profile_about]':
                  type: string
                'user[profile_artinfo]':
                  type: string
                'user[base_upload_limit]':
                  type: number
                'user[enable_privacy_mode]':
                  type: boolean
                'user[email]':
                  type: string
                  description: Must have the bd staff user flag to use.
                'user[can_approve_posts]':
                  type: boolean
                'user[can_upload_free]':
                  type: boolean
                'user[no_flagging]':
                  type: boolean
                'user[replacements_beta]':
                  type: boolean
      responses:
        '204':
          description: Success
        '400':
          $ref: '#/components/responses/MessageError'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/moderator/post/posts/{id}/delete.json':
    post:
      summary: Delete Post
      operationId: deletePost
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission. `commit=Delete` must be set.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: 'If the post does not have an active flag, this is required.'
                move_favorites:
                  type: boolean
                  description: Move favorites to parent.
                copy_sources:
                  type: boolean
                  description: Copy sources to parent.
                copy_tags:
                  type: boolean
                  description: Copy tags to parent.
                commit:
                  type: string
                  description: 'If not set, nothing will happen.'
                  enum:
                    - Delete
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/moderator/post/posts/{id}/undelete.json':
    post:
      summary: Undelete Post
      operationId: undeletePost
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/moderator/post/posts/{id}/regenerate_thumbnails.json':
    post:
      summary: Regenerate Post Thumbnails
      operationId: regeneratePostThumbnails
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must be Janitor+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/moderator/post/posts/{id}/regenerate_videos.json':
    post:
      summary: Regenerate Post Videos
      operationId: regeneratePostVideos
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must be Janitor+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/moderator/post/posts/{id}/expunge.json':
    post:
      summary: Expunge Post
      operationId: expungePost
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission and be Admin+.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                reason:
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post
                properties:
                  post:
                    $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/moderator/post/posts/{id}/move_favorites.json':
    post:
      summary: Move Post Favorites
      operationId: movePostFavorites
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission. `commit=Submit`` must be set.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the post.
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - commit
              properties:
                commit:
                  type: string
                  description: 'If not set, nothing will happen.'
                  enum:
                    - Submit
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /moderator/post/approval.json:
    post:
      summary: Approve Post
      operationId: approvePost
      tags:
        - Posts
        - Post Approvals
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_id
              properties:
                post_id:
                  type: integer
      responses:
        '201':
          description: Success
        '204':
          description: Failure
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Unapprove Post
      operationId: unapprovePost
      tags:
        - Posts
        - Post Approvals
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission. The response does not differ for success or failure.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - post_id
              properties:
                post_id:
                  type: integer
      responses:
        '204':
          description: Success/Failure
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /moderator/post/disapprovals.json:
    get:
      summary: Search Post Disapprovals
      operationId: searchPostDisapprovals
      tags:
        - Post Disapprovals
      security:
        - basicAuth: []
      description: 'You must have the "Approve Posts" permission When no results are found, an object with a `post_disapprovals` key is returned.'
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/id'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - post_id
              - post_id_desc
        - in: query
          name: 'search[creator_id]'
          schema:
            type: integer
        - in: query
          name: 'search[creator_name]'
          schema:
            type: string
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[message]'
          schema:
            type: string
        - in: query
          name: 'search[post_tags_match]'
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          schema:
            type: string
        - in: query
          name: 'search[has_message]'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/PostDisapproval'
                  - type: object
                    description: No Results
                    required:
                      - post_disapprovals
                    properties:
                      post_disapprovals:
                        type: array
                        maxItems: 0
    post:
      summary: Create Post Disapproval
      operationId: createPostDisapproval
      tags:
        - Post Disapprovals
      security:
        - basicAuth: []
      description: You must have the "Approve Posts" permission.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'post_disapproval[post_id]'
                - 'post_disapproval[reason]'
              properties:
                'post_disapproval[post_id]':
                  type: integer
                'post_disapproval[reason]':
                  type: string
                  enum:
                    - borderline_quality
                    - borderline_relevancy
                    - other
                'post_disapproval[message]':
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDisapproval'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
