jarvisdevil.com

e621_openapi.yaml
openapi: 3.0.0
info:
  title: E621
  description: |
    OpenAPI definition for E621's API. You can find the source [here](https://github.com/DonovanDMC/E621OpenAPI)<br>
    This document is intended to compliment E621's existing [API Documentation](https://e621.net/help/api).<br>
    If the api is not working, you can check this [Unofficial Status Page](https://status.e621.church).
  license:
    name: MIT
    url: 'https://opensource.org/licenses/MIT'
  termsOfService: 'https://e621.net/static/terms_of_service'
  contact:
    name: Donovan_DMC
    url: 'https://e621.net/forum_topics/46279'
  version: be583f1
  x-e621ng-commit: 76a023eecea450486d1f1143c4ed9cb257a2be06
  x-e621ng-master-behind-by: 28
  x-e621ng-master-compare-url: https://github.com/e621ng/e621ng/compare/76a023eecea450486d1f1143c4ed9cb257a2be06...master
servers:
  - url: 'https://e621.net'
    description: E621 (Production)
  - url: 'https://e926.net'
    description: E621 (Safe)
  - url: 'http://localhost:3000'
    description: E621 (Development)
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    browserAuth:
      type: apiKey
      in: cookie
      name: _danbooru_session
    csrfToken:
      type: apiKey
      in: query
      name: authenticity_token
      description: Retrieved via scraping html for the `csrf-token` meta tag.
  parameters:
    idQuery:
      name: 'search[id]'
      in: query
      description: 'Search for a specific id. Multiple can be separated by commas, up to 100.'
      schema:
        oneOf:
          - type: integer
          - type: string
    limitQuery:
      name: limit
      in: query
      description: The maximum number of results to return. Between 0 and 320.
      schema:
        type: integer
        minimum: 0
        maximum: 320
    pageQuery:
      name: page
      in: query
      description: The page number of results to get. Between 1 and 750.
      schema:
        type: integer
        minimum: 1
        maximum: 750
    ipAddrQuery:
      name: 'search[ip_addr]'
      in: query
      description: 'Must be Admin+ to use. See [the PostgreSQL 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
    orderQuery:
      name: 'search[order]'
      in: query
      description: The order of the results.
      schema:
        type: string
        enum:
          - id_asc
          - id_desc
    idPath:
      name: id
      in: path
      description: The ID of the item.
      required: true
      schema:
        type: integer
    idOrNamePath:
      name: idOrName
      in: path
      required: true
      schema:
        oneOf:
          - type: integer
          - type: string
      description: An ID that can be either an integer or a name.
  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_destroy
        - blip_delete
        - blip_undelete
        - 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
        - search_trend_blacklist_purge
        - 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
        - replacement
    TicketStatuses:
      type: string
      enum:
        - pending
        - partial
        - approved
    Artist:
      type: object
      required:
        - id
        - name
        - updated_at
        - is_active
        - other_names
        - group_name
        - 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
        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
        - 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
        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_deleted
        - 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
        is_deleted:
          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
        - to_name
        - from_name
      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
        to_name:
          type: string
        from_name:
          type: string
    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: integer
        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: number
          format: float
          minimum: 0
          maximum: 100
        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: integer
        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: integer
        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: integer
        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
        - description
        - comment_count
        - is_favorited
        - has_notes
        - duration
        - uploader_name
      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: integer
        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
        description:
          type: string
        comment_count:
          type: integer
        is_favorited:
          type: boolean
        has_notes:
          type: boolean
        duration:
          type: number
          format: float
          nullable: true
        uploader_name:
          type: string
    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
        - is_resolved
        - updated_at
        - is_deletion
        - type
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        post_id:
          type: integer
        reason:
          type: string
        creator_id:
          type: integer
          description: Only visible to creator and Janitor+
          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
          description: Only visible to creator and Janitor+
          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
        - description
        - reason
        - locked_tags
        - added_tags
        - removed_tags
        - added_locked_tags
        - removed_locked_tags
        - rating_changed
        - parent_changed
        - source_changed
        - description_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
        description:
          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
        description_changed:
          type: boolean
        version:
          type: integer
        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: integer
        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
        - domain
        - path
      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
        domain:
          type: string
        path:
          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
        - description
        - 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
        description:
          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
    ApiKey:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - user_id
        - key
        - name
        - last_used_at
        - last_used_ip_address
        - last_user_agent
        - expires_at
        - notified_at
      properties:
        id:
          type: integer
        updated_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        user_id:
          type: integer
        key:
          type: string
        name:
          type: string
        last_used_at:
          type: string
          format: date-time
          nullable: true
        last_used_ip_address:
          oneOf:
            - type: string
              format: ipv4
              nullable: true
            - type: string
              format: ipv6
              nullable: true
        last_user_agent:
          type: string
          nullable: true
        expires_at:
          type: string
          format: date-time
          nullable: true
        notified_at:
          type: string
          format: date-time
          nullable: true
    EditHistory:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - body
        - subject
        - versionable_type
        - versionable_id
        - version
        - user_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        body:
          type: string
        subject:
          type: string
          nullable: true
        versionable_type:
          type: string
          enum:
            - Blip
            - Comment
            - ForumPost
        versionable_id:
          type: integer
        version:
          type: integer
        user_id:
          type: integer
    UserAvatarMenu:
      type: object
      required:
        - has_uploads
        - has_favorites
        - has_sets
        - has_comments
        - has_forums
      properties:
        has_uploads:
          type: boolean
        has_favorites:
          type: boolean
        has_sets:
          type: boolean
        has_comments:
          type: boolean
        has_forums:
          type: boolean
    TagCorrection:
      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'
    SearchTrend:
      type: object
      required:
        - tag
        - count
        - day
      properties:
        tag:
          type: string
        count:
          type: integer
        day:
          type: string
          format: date
    RisingSearchTrend:
      type: object
      required:
        - name
        - pretty_name
        - post_count
        - category
      properties:
        name:
          type: string
        pretty_name:
          type: string
        post_count:
          type: integer
        category:
          $ref: '#/components/schemas/TagCategories'
    SearchTrendBlacklist:
      type: object
      required:
        - id
        - tag
        - reason
        - creator_id
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        tag:
          type: string
        reason:
          type: string
        creator_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    MessageErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
        message:
          type: string
        code:
          type: string
          nullable: true
    MessageSuccessResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
    PostRecommendation:
      type: object
      required:
        - post_id
        - score
        - explanation
      properties:
        post_id:
          type: integer
        score:
          description: |
            Currently hardcoded as 1, https://github.com/e621ng/e621ng/blob/5f83e77329d4074c5462c7516c3850f33125f441/app/controllers/posts_controller.rb#L177
          type: number
          format: float
        explanation:
          description: |
            Currently hardcoded as null, https://github.com/e621ng/e621ng/blob/5f83e77329d4074c5462c7516c3850f33125f441/app/controllers/posts_controller.rb#L178
          type: string
          nullable: true
    RecommendedPosts:
      type: object
      required:
        - post_id
        - model_version
        - results
      properties:
        post_id:
          type: integer
        model_version:
          type: string
          enum:
            - opensearch
        results:
          type: array
          items:
            $ref: '#/components/schemas/PostRecommendation'
    PostVote:
      type: object
      required:
        - id
        - post_id
        - user_id
        - score
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        post_id:
          type: integer
        user_id:
          type: integer
        score:
          $ref: '#/components/schemas/UpDownVote'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    UpDownVote:
      type: integer
      enum:
        - 1
        - -1
    UpDownMehVote:
      type: integer
      enum:
        - 1
        - 0
        - -1
  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
    MessageSuccess:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageSuccessResponse'
    MessageError:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageErrorResponse'
    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:
  /api_keys.json:
    get:
      summary: Get API Keys
      operationId: getAPIKeys
      tags:
        - API Keys
      security:
        - browserAuth: []
      description: 'Requires [browser authentication](#operations-Sessions-login) (username & password), as well as hourly password confirmations (reauthentication).'
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id
              - id_asc
              - id_desc
              - name
              - name_asc
              - name_desc
              - created_at
              - created_at_asc
              - created_at_desc
              - updated_at
              - updated_at_asc
              - updated_at_desc
              - expires_at
              - expires_at_asc
              - expires_at_desc
              - last_used_at
              - last_used_at_asc
              - last_used_at_desc
        - name: 'search[name_matches]'
          in: query
          schema:
            type: string
        - name: 'search[is_expired]'
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiKey'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      summary: Create API Key
      operationId: createAPIKey
      tags:
        - API Keys
      security:
        - browserAuth: []
          csrfToken: []
      description: 'Requires [browser authentication](#operations-Sessions-login) (username & password), as well as hourly password confirmations (reauthentication).'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - authenticity_token
                - 'api_key[name]'
              properties:
                authenticity_token:
                  type: string
                  description: CSRF Token
                'api_key[name]':
                  type: string
                'api_key[duration]':
                  oneOf:
                    - type: integer
                      description: days
                    - type: string
                      enum:
                        - never
                        - custom
                'api_key[expires_at]':
                  type: string
                  format: date-time
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/api_keys/{id}.json':
    delete:
      summary: Delete API Key
      operationId: deleteAPIKey
      tags:
        - API Keys
      security:
        - browserAuth: []
          csrfToken: []
      description: 'Requires [browser authentication](#operations-Sessions-login) (username & password), as well as hourly password confirmations (reauthentication).'
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/api_keys/{id}/regenerate.json':
    post:
      summary: Regenerate API Key
      operationId: regenerateAPIKey
      tags:
        - API Keys
      security:
        - browserAuth: []
          csrfToken: []
      description: 'Requires [browser authentication](#operations-Sessions-login) (username & password), as well as hourly password confirmations (reauthentication).'
      parameters:
        - $ref: '#/components/parameters/idPath'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - authenticity_token
              properties:
                authenticity_token:
                  type: string
                  description: CSRF Token
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /artists.json:
    get:
      summary: Search Artists
      operationId: searchArtists
      tags:
        - Artists
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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: integer
        - name: 'search[has_tag]'
          in: query
          schema:
            type: boolean
        - name: 'search[is_linked]'
          in: query
          schema:
            type: string
        - name: 'search[linked_user_id]'
          in: query
          schema:
            type: integer
        - name: 'search[linked_user_name]'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Artist'
                    - type: object
                      required:
                        - urls
                      properties:
                        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[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/idOrNamePath'
      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:
                            - - e621.net
                              - 1
                          items:
                            oneOf:
                              - type: string
                              - type: integer
                      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/idOrNamePath'
      requestBody:
        content:
          application/x-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[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/idOrNamePath'
      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/idOrNamePath'
        - 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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/ArtistVersion'
  /artist_urls.json:
    get:
      summary: Search Artist URLs
      operationId: searchArtistUrls
      tags:
        - Artist URLs
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/AvoidPosting'
    post:
      summary: Create Avoid Posting Entry
      operationId: createAvoidPosting
      tags:
        - Avoid Posting Entries
      security:
        - basicAuth: []
      description: Must have the bd staff user flag.
      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
                  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/idOrNamePath'
      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/idOrNamePath'
      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:
        '204':
          description: Success
        '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/idOrNamePath'
      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: Soft deletion. Must have the bd staff user flag.
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      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/idOrNamePath'
      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/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/AvoidPostingVersion'
  /bans.json:
    get:
      summary: Search Bans
      operationId: searchBans
      tags:
        - Bans
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Ban'
  '/bans/{id}.json':
    get:
      summary: Get Ban
      operationId: getBan
      tags:
        - Bans
      parameters:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Blip'
    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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $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:
        - $ref: '#/components/parameters/idPath'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'blip[body]':
                  type: string
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
    delete:
      summary: Destroy Blip
      operationId: destroyBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: |
        You must be Admin+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/blips/{id}/delete.json':
    post:
      summary: Delete Blip
      operationId: deleteBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: |
        Soft deletion. You must be the creator or Moderator+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blip'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/blips/{id}/undelete.json':
    post:
      summary: Undelete Blip
      operationId: undeleteBlip
      tags:
        - Blips
      security:
        - basicAuth: []
      description: |
        You must be Moderator+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/BulkUpdateRequest'
    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_requests/{id}.json':
    get:
      summary: Get Bulk Update Request
      operationId: getBulkUpdateRequest
      tags:
        - Bulk Update Requests
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/bulk_update_requests/{id}/approve.json':
    post:
      summary: Approve Bulk Update Request
      operationId: approveBulkUpdateRequest
      tags:
        - Bulk Update Requests
      description: Must be Admin+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      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.'
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Comment'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
        - name: score
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/UpDownVote'
        - 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:
        - $ref: '#/components/parameters/idPath'
      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 Votes
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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: []
        - csrfToken: []
      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'
  /edit_histories.json:
    get:
      summary: Search Edit Histories
      operationId: searchEditHistories
      tags:
        - Edit Histories
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - in: query
          name: 'search[body_matches]'
          schema:
            type: string
        - in: query
          name: 'search[subject_matches]'
          schema:
            type: string
        - in: query
          name: 'search[versionable_type]'
          schema:
            type: string
            enum:
              - Blip
              - Comment
              - ForumPost
        - in: query
          name: 'search[versionable_id]'
          schema:
            type: integer
        - in: query
          name: 'search[editor_id]'
          schema:
            type: integer
        - in: query
          name: 'search[editor_name]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EditHistory'
        '403':
          $ref: '#/components/responses/AccessDenied'
  '/edit_histories/{id}.json':
    get:
      summary: Get Edit History
      operationId: getEditHistory
      tags:
        - Edit Histories
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - $ref: '#/components/parameters/idPath'
        - name: type
          in: query
          required: true
          description: The versionable type.
          schema:
            type: string
            enum:
              - Blip
              - Comment
              - ForumPost
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EditHistory'
        '403':
          $ref: '#/components/responses/AccessDenied'
  /email_blacklists.json:
    get:
      summary: Search Email Blacklists
      operationId: searchEmailBlacklists
      tags:
        - Email Blacklists
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/EmailBlacklist'
    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:
        - $ref: '#/components/parameters/idPath'
      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/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - 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_id
                  - favorite_count
                properties:
                  post_id:
                    type: integer
                  favorite_count:
                    type: integer
        '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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - post_id
                  - favorite_count
                properties:
                  post_id:
                    type: integer
                  favorite_count:
                    type: integer
        '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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/ForumPost'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'forum_post_vote[score]'
              properties:
                'forum_post_vote[score]':
                  $ref: '#/components/schemas/UpDownMehVote'
      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:
        - $ref: '#/components/parameters/idPath'
      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/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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
          schema:
            oneOf:
              - type: integer
              - type: string
          description: An ID that can be either an integer or a name.
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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: []
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/IpBan'
    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:
        - $ref: '#/components/parameters/idPath'
      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: integer
        - 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: array
                items:
                  $ref: '#/components/schemas/IqdbResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
    post:
      summary: Query IQDB
      operationId: queryIqdbPost
      tags:
        - IQDB
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                'search[file]':
                  type: string
                  format: binary
                'search[score_cutoff]':
                  type: integer
                '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: array
                items:
                  $ref: '#/components/schemas/IqdbResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
  /mascots.json:
    get:
      summary: Search Mascots
      operationId: searchMascots
      tags:
        - Mascots
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Mascot'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NewsUpdate'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /notes.json:
    get:
      summary: Search Notes
      operationId: searchNotes
      tags:
        - Notes
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Note'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/notes/{id}/revert.json':
    put:
      summary: Revert Note
      operationId: revertNote
      tags:
        - Notes
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/idPath'
        - 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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/NoteVersion'
  /pools.json:
    get:
      summary: Search Pools
      operationId: searchPools
      tags:
        - Pools
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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'
                'pool[is_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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
        - 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.json:
    post:
      summary: Add Post To Pool
      operationId: addPostToPool
      tags:
        - Pools
      security:
        - basicAuth: []
      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:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pool'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Remove Post From Pool
      operationId: removePostFromPool
      tags:
        - Pools
      security:
        - basicAuth: []
      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. The value is not normalized.
                post_id:
                  type: integer
      responses:
        '204':
          description: Success
        '404':
          $ref: '#/components/responses/NotFound'
  /pool_element/recent.json:
    get:
      summary: Get Recent Pools
      operationId: getRecentPools
      tags:
        - Pools
      security:
        - basicAuth: []
      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. The value is not normalized.
                post_id:
                  type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - name
                  properties:
                    id:
                      type: string
                    name:
                      type: string
  /pool_versions.json:
    get:
      summary: Search Pool Versions
      operationId: searchPoolVersions
      tags:
        - Pool Versions
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/PoolVersion'
  /popular.json:
    get:
      summary: List Most Upvoted Posts
      operationId: listPopular
      tags:
        - Popular
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - 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/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - 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/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}.json':
    get:
      summary: Get Post
      operationId: getPost
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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[description]':
                  type: string
                'post[old_description]':
                  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:
        - $ref: '#/components/parameters/idPath'
      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':
    put:
      summary: Mark Post As Translated
      operationId: markPostAsTranslated
      tags:
        - Posts
      security:
        - basicAuth: []
      description: Will error if no body is provided.
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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':
    put:
      summary: Revert Post
      operationId: revertPost
      tags:
        - Posts
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/idPath'
        - 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:
        - $ref: '#/components/parameters/idPath'
        - 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:
        - $ref: '#/components/parameters/idPath'
      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/{id}/favorites.json':
    get:
      summary: List Post Favorites
      operationId: listPostFavorites
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/idPath'
        - name: limit
          in: query
          description: The maximum number of results to return. Between 1 and 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - $ref: '#/components/parameters/pageQuery'
      description: You must be the user or Moderator+ to see users that have their favorites hidden.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Post'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/posts/{id}/votes.json':
    post:
      summary: Create Post Vote
      operationId: createPostVote
      tags:
        - Post Votes
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/idPath'
        - name: score
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/UpDownVote'
        - 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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/posts/{id}/recommended.json':
    get:
      summary: Get Recommended Posts
      operationId: getRecommendedPosts
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/idPath'
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendedPosts'
        '404':
          $ref: '#/components/responses/NotFound'
  /post_sets.json:
    get:
      summary: Search Post Sets
      operationId: searchPostSets
      tags:
        - Post Sets
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/PostSet'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
                      oneOf:
                        - type: string
                        - type: integer
                      example:
                        - - my_set
                          - 1
                  Maintained:
                    type: array
                    items:
                      oneOf:
                        - type: string
                        - type: integer
                      example:
                        - - my_set
                          - 1
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /post_approvals.json:
    get:
      summary: Search Post Approvals
      operationId: searchPostApprovals
      tags:
        - Post Approvals
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/PostApproval'
  /post_events.json:
    get:
      summary: Search Post Events
      operationId: searchPostEvents
      tags:
        - Post Events
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/PostFlag'
    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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostFlag'
        '404':
          $ref: '#/components/responses/NotFound'
  '/post_flags/{id}/clear_note.json':
    post:
      summary: Clear Post Flag Note
      operationId: clearPostFlagNote
      tags:
        - Post Flags
      security:
        - basicAuth: []
      description: You must be Janitor+
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostFlag'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /post_replacements.json:
    get:
      summary: Search Post Replacements
      operationId: searchPostReplacements
      tags:
        - Post Replacements
      description: Rejected replacements can only be seen by staff.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/PostReplacement'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
          required: true
          description: The ID of the post flag.
          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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - 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/idQuery'
        - 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[description]'
          schema:
            type: string
        - in: query
          name: 'search[description_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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/post_versions/{id}/undo.json':
    put:
      summary: Undo Post Version
      operationId: undoPostVersion
      tags:
        - Post Versions
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /post_votes.json:
    get:
      summary: Search Post Votes
      operationId: searchPostVotes
      tags:
        - Post Votes
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - name: 'search[order]'
          in: query
          description: The order of the results. You must be Admin+.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - ip_addr
        - in: query
          name: 'search[post_id]'
          schema:
            type: integer
        - in: query
          name: 'search[user_name]'
          schema:
            type: string
        - in: query
          name: 'search[user_id]'
          schema:
            type: integer
        - in: query
          name: 'search[post_creator_name]'
          description: 'Only usable if one of `post_id`, `user_name`, or `user_id` is also provided.'
          schema:
            type: string
        - in: query
          name: 'search[post_creator_id]'
          description: 'Only usable if one of `post_id`, `user_name`, or `user_id` is also provided.'
          schema:
            type: integer
        - in: query
          name: 'search[user_ip_addr]'
          description: 'You must be Admin+. Only usable if one of `post_id`, `user_name`, or `user_id` is also provided. See [the PostgreSQL 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
        - in: query
          name: 'search[score]'
          description: 'Only usable if one of `post_id`, `user_name`, or `user_id` is also provided.'
          schema:
            $ref: '#/components/schemas/UpDownVote'
        - in: query
          name: 'search[duplicates_only]'
          description: 'You must be Admin+. Only usable if one of `post_id`, `user_name`, or `user_id` is also provided.'
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PostVote'
  /post_votes/lock.json:
    post:
      summary: Lock Post Votes
      operationId: lockPostVotes
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
  '/tags/{id}.json':
    get:
      summary: Get Tag
      operationId: getTag
      tags:
        - Tags
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagCorrection'
        '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:
        - $ref: '#/components/parameters/idPath'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - commit
              properties:
                commit:
                  type: string
                  enum:
                    - Fix
                  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 Type Versions
      operationId: searchTagTypeVersions
      tags:
        - Tag Type Versions
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/TagTypeVersion'
  /tag_aliases.json:
    get:
      summary: Search Tag Aliases
      operationId: searchTagAliases
      tags:
        - Tag Aliases
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/TagAlias'
  '/tag_aliases/{id}.json':
    get:
      summary: Get Tag Alias
      operationId: getTagAlias
      tags:
        - Tag Aliases
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/TagImplication'
  '/tag_implications/{id}.json':
    get:
      summary: Get Tag Implication
      operationId: getTagImplication
      tags:
        - Tag Implications
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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'
  /search_trends.json:
    get:
      summary: List Search Trends
      operationId: listSearchTrends
      tags:
        - Search Trends
      parameters:
        - in: query
          name: day
          schema:
            type: string
            format: date
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SearchTrend'
  /search_trends/rising.json:
    get:
      summary: List Rising Search Trends
      operationId: listRisingSearchTrends
      tags:
        - Search Trends
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RisingSearchTrend'
  /search_trends/clear_cache.json:
    post:
      summary: Clear Search Trends Cache
      operationId: clearSearchTrendsCache
      tags:
        - Search Trends
      security:
        - basicAuth: []
      description: You must be Admin+.
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '403':
          $ref: '#/components/responses/AccessDenied'
  /search_trends/update_settings.json:
    post:
      summary: Update Search Trends Settings
      operationId: updateSearchTrendsSettings
      tags:
        - Search Trends
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                trends_enabled:
                  type: boolean
                trends_displayed:
                  type: boolean
                trends_min_today:
                  type: integer
                trends_min_dleta:
                  type: integer
                trends_min_ratio:
                  type: number
                  format: float
                trends_ip_limit:
                  type: integer
                trends_ip_window:
                  type: integer
                trends_tag_limit:
                  type: integer
                trends_tag_window:
                  type: integer
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '403':
          $ref: '#/components/responses/AccessDenied'
  /search_trend_blacklists.json:
    get:
      summary: Search Search Trend Blacklists
      operationId: searchSearchTrendBlacklists
      tags:
        - Search Trend Blacklists
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/orderQuery'
        - in: query
          name: tag
          schema:
            type: string
        - in: query
          name: reason
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SearchTrendBlacklist'
        '403':
          $ref: '#/components/responses/AccessDenied'
    post:
      summary: Create Search Trend Blacklist
      operationId: createSearchTrendBlacklist
      tags:
        - Search Trend Blacklists
      security:
        - basicAuth: []
      description: You must be Admin+.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - tag
                - reason
              properties:
                tag:
                  type: string
                reason:
                  type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchTrendBlacklist'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/ExpectedError'
  '/search_trend_blacklists/{id}.json':
    delete:
      summary: Delete Search Trend Blacklist
      operationId: deleteSearchTrendBlacklist
      tags:
        - Search Trend Blacklists
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/search_trend_blacklists/{id}/purge.json':
    delete:
      summary: Purge Search Trend Blacklist
      operationId: purgeSearchTrendBlacklist
      tags:
        - Search Trend Blacklists
      security:
        - basicAuth: []
      description: You must be Admin+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - deleted_count
                properties:
                  deleted_count:
                    type: integer
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /session.json:
    post:
      summary: Login
      operationId: login
      tags:
        - Sessions
      security:
        - csrfToken: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - authenticity_token
                - 'session[name]'
                - 'session[password]'
              properties:
                authenticity_token:
                  type: string
                  description: CSRF Token
                'session[url]':
                  type: string
                  description: 'Optional relative URL to redirect to after login, defaults to `/posts`.'
                'session[name]':
                  type: string
                'session[password]':
                  type: string
      responses:
        '302':
          description: Success
          headers:
            Set-Cookie:
              description: The session cookie.
              schema:
                type: string
                example: _danbooru_session=(...); path=/; secure; httponly; samesite=lax
        '403':
          $ref: '#/components/responses/AccessDenied'
        '406':
          description: Failure
  /staff_notes.json:
    get:
      summary: Search Staff Notes
      operationId: searchStaffNotes
      tags:
        - Staff Notes
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/StaffNote'
    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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Takedown'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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[disp_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:
                type: array
                items:
                  $ref: '#/components/schemas/Ticket'
        '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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/Upload'
    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[description]':
                  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:
        - $ref: '#/components/parameters/idPath'
      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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - name: 'search[order]'
          in: query
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - domain
              - path
              - updated_at
              - created_at
        - in: query
          name: 'search[domain]'
          schema:
            type: string
        - in: query
          name: 'search[path]'
          schema:
            type: string
        - in: query
          name: 'search[note]'
          schema:
            type: string
        - in: query
          name: 'search[reason]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UploadWhitelist'
    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[domain]'
                - 'upload_whitelist[path]'
              properties:
                'upload_whitelist[allowed]':
                  type: string
                'upload_whitelist[domain]':
                  type: string
                'upload_whitelist[path]':
                  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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  /upload_whitelists/is_allowed.json:
    get:
      summary: Check If URL Is Allowed
      operationId: checkIfUrlIsAllowed
      tags:
        - Upload Whitelists
      security:
        - basicAuth: []
      parameters:
        - 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/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - 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:
                  oneOf:
                    - $ref: '#/components/schemas/User'
                    - $ref: '#/components/schemas/FullCurrentUser'
  /users/me.json:
    get:
      summary: Get Current User
      operationId: getMe
      description: |
        This will return the default settings for anonymous users if no authentication is used.
        This most interesting part is probably the default blacklist, located in `blacklisted_tags`.
      tags:
        - Users
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullCurrentUser'
  /users/avatar_menu.json:
    get:
      summary: Get Avatar Menu
      operationId: getAvatarMenu
      tags:
        - Users
      security:
        - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAvatarMenu'
        '403':
          $ref: '#/components/responses/AccessDenied'
  '/users/{idOrName}.json':
    get:
      summary: Get User
      operationId: getUser
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      responses:
        '200':
          $ref: '#/components/responses/UserResponse'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Edit Current User
      operationId: editCurrentUser
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                'user[comment_threshold]':
                  type: integer
                '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/{idOrName}/upload_limit.json':
    get:
      summary: Get User Upload Limit
      operationId: getUserUploadLimit
      tags:
        - Users
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      responses:
        '200':
          $ref: '#/components/responses/UserResponse'
        '403':
          $ref: '#/components/responses/AccessDenied'
  '/users/{idOrName}/flush_favorites.json':
    post:
      summary: Clear User Favorites
      operationId: clearUserFavorites
      tags:
        - Users
      description: You must be Admin+.
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{idOrName}/fix_counts.json':
    get:
      summary: Staff Fix User Counts
      operationId: staffFixUserCounts
      tags:
        - Users
      description: You must be Janitor+.
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{idOrName}/toggle_uploads.json':
    get:
      summary: Toggle User Uploads
      operationId: toggleUserUploads
      tags:
        - Users
      description: |
        You must be Janitor+.
        This endpoint will return HTML when disabling uploads (due to a reason being required), this endpoint should only be used for reenabling. Use [Disable User Uploads](#operation-Users-disableUserUploads) to disable uploads.
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      security:
        - basicAuth: []
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{idOrName}/disable_uploads.json':
    post:
      summary: Disable User Uploads
      operationId: disableUserUploads
      tags:
        - Users
      description: You must be Janitor+.
      parameters:
        - $ref: '#/components/parameters/idOrNamePath'
      security:
        - basicAuth: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - 'staff_note[body]'
              properties:
                'staff_note[body]':
                  type: string
      responses:
        '302':
          description: |
            Redirect
            Success should be determined based on the html, any errors will be present in an alert.
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{user_id}/dmails.json':
    get:
      summary: Audit User DMails
      operationId: auditUserDMails
      tags:
        - DMails
      security:
        - basicAuth: []
      description: Must have the bd auditor user flag.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - name: user_id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DMail'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/users/{user_id}/dmails/{id}.json':
    get:
      summary: Audit User DMail
      operationId: auditUserDMail
      tags:
        - DMails
      security:
        - basicAuth: []
      description: Must have the bd auditor user flag.
      parameters:
        - name: user_id
          in: path
          required: true
          description: The ID of the user.
          schema:
            type: integer
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DMail'
        '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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/UserFeedback'
    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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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+.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/UserNameChangeRequest'
    post:
      summary: Create User Name Change Request
      operationId: createUserNameChangeRequest
      tags:
        - User Name Change Requests
      security:
        - basicAuth: []
      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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNameChangeRequest'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Delete User Name Change Request
      operationId: deleteUserNameChangeRequest
      tags:
        - User Name Change Requests
      security:
        - basicAuth: []
      description: You must be Moderator+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
  /wiki_pages.json:
    get:
      summary: Search Wiki Pages
      operationId: searchWikiPages
      tags:
        - Wiki Pages
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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
          schema:
            oneOf:
              - type: integer
              - type: string
          description: An ID that can be either an integer or a name.
      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:
        - $ref: '#/components/parameters/idPath'
          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:
        - $ref: '#/components/parameters/idPath'
      responses:
        '204':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
  '/wiki_pages/{id}/revert.json':
    put:
      summary: Revert Wiki Page
      operationId: revertWikiPage
      tags:
        - Wiki Pages
      security:
        - basicAuth: []
      parameters:
        - $ref: '#/components/parameters/idPath'
        - 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
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - $ref: '#/components/parameters/ipAddrQuery'
        - $ref: '#/components/parameters/orderQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/WikiPageVersion'
  '/wiki_page_versions/{id}.json':
    get:
      summary: Get Wiki Page Version
      operationId: getWikiPageVersion
      tags:
        - Wiki Page Versions
      parameters:
        - $ref: '#/components/parameters/idPath'
      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:
                  oneOf:
                    - type: integer
                      description: ID of concerned user.
                    - type: array
                      items:
                        type: integer
                        description: ID of suspected alt.
  '/admin/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:
        - $ref: '#/components/parameters/idPath'
      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: integer
                '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'
  '/admin/users/{id}/anonymize.json':
    post:
      summary: Admin Anonymize User
      operationId: adminAnonymizeUser
      tags:
        - Admin Users
      security:
        - basicAuth: []
      description: You must have the bd staff user flag. Cannot be used on staff.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '302':
          description: |
            Redirect
            Success should be determined based on the html, any errors will be present in an alert.
        '404':
          $ref: '#/components/responses/NotFound'
  '/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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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:
        - $ref: '#/components/parameters/idPath'
      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/posts/{id}/ai_check.json':
    get:
      summary: AI Check Post
      operationId: aiCheckPost
      tags:
        - Posts
      security:
        - basicAuth: []
      description: You must be Janitor+.
      parameters:
        - $ref: '#/components/parameters/idPath'
      responses:
        '302':
          description: Success
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ExpectedError'
  /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
          content:
            application/json:
              schema:
                type: object
                minProperties: 0
                maxProperties: 0
                additionalProperties: false
        '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.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/pageQuery'
        - $ref: '#/components/parameters/idQuery'
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/PostDisapproval'
    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'