openapi: 3.1.0
info:
  title: ClickHelp API version 2.0.0
  description: |
    Every ClickHelp portal is equipped with  REST API to enable task automation and to help you integrate your documentation workflow into the existing business processes.
    
    Base URL: https://{your-portal-URL}/api/v2/
    
    Authentication: most requests use HTTP Basic (login + API key), some requests can be made anonymously. [Get API key](https://docs.clickhelp.com/articles/clickhelp-user-manual/get-api-key) in your user profile. 
    
    To resolve errors see the [API Troubleshooting](https://docs.clickhelp.com/articles/clickhelp-user-manual/api-troubleshooting) section.
  version: 2.0.0
servers:
  - url: "https://{your-portal-URL}/api/v2/"
    description: Portal API
    variables:
      your-portal-URL:
        default: your-portal.clickhelp.co
tags:
  - name: Projects & Publications
    description: Projects & publications API allows you to get information on projects and publications, export publications, and change their visibility.
  - name: Reporting & Analytics
    description: "Reporting & analytics API allows you to retrieve different statistics on your portal, like topic views or users' search queries."
  - name: Search
    description: Full-text search API allows you to run search queries on your ClickHelp portal and retrieve search results for further use.
  - name: Storage
    description: Storage API allows you to work with files in your ClickHelp storage — create new files, get information about them, delete files, etc.
  - name: TOC Nodes
    description: TOC API allows you to manage a table of content elements and their associated topics — get information about them, delete, update, etc.
  - name: Topics
    description: The Topics API allows you to manage topics within a project — create, update, get information, etc.
  - name: Users
    description: The Users API allows you to generate login tokens, create accounts for Power Readers and so on.
  - name: AnswerGenius
    description: AnswerGenius API allows you to send queries to AnswerGenius and get responses for these queries based on the documentation on your ClickHelp portal.
  - name: Workflow Statuses
    description: Workflow Statuses API allows you to manage workflow statuses — get information about them, create, update, and delete.
  - name: Workflow Transitions
    description: Workflow Transitions API allows you to manage workflow transitions between statuses — get information about them, create, and delete.

paths:
  # ──────────────────────────────────────────────
  # Projects & Publications
  # ──────────────────────────────────────────────

  /projects:
    get:
      operationId: getAllProjectsPublications
      summary: Get all projects and publications
      description: Returns information on all projects and publications available to the user making the request.
      tags:
        - Projects & Publications
      parameters:
        - name: types
          in: query
          required: false
          description: Filter by entity types. Allowed values are 'Project' and 'Publication'. If not specified, returns both projects and publications.
          schema:
            type: string
        - name: parentId
          in: query
          required: false
          description: The Id of a project. If specified returns publications only of the specified project.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/ProjectDetails"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        -
          basicAuth: []
        - {}          
    post:
      operationId: createProject
      summary: Create a new project
      description: Creates a new empty project, from a template, or by copying an existing project.
      tags:
        - Projects & Publications
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - projectName
              properties:
                projectName:
                  type: string
                  description: The name of the new project.
                projectId:
                  type: string
                  description: The ID (URL slug) of the new project. If not specified, it will be generated from the project name.
                sourceType:
                  type: string
                  description: "The source type for creating the project: Empty (default), Template, or Copy."
                  enum: [Empty, Template, Copy]
                sourceProjectId:
                  type: string
                  description: The ID of an existing project to use as a source. Required when sourceType is Template or Copy. When using Template, allowed values are 'minimalist-template', 'api-documentation-template', 'coffee-break-template', 'colorize-template', 'mountain-peak-template' or 'stardust-template'.
                languageFourLetterCode:
                  type: string
                  description: The four-letter language code for the new project (e.g., 'en-US'). If not specified, the portal's default language will be used.
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{id}:
    get:
      operationId: getProjectPublication
      summary: Get project/publication
      description: Returns information about a single project or publication.
      tags:
        - Projects & Publications
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the project/publication to retrieve information about.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/ProjectInfoResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        -
          basicAuth: []
        - {}          
    patch:
      operationId: changePublicationVisibility
      summary: Change publication visibility
      description: "Changes publication's visibility."
      tags:
        - Projects & Publications
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the publication to change the visibility for.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                updatedFields:
                  type: string
                  description: A comma-separated list of field names that will be updated. If a field name is not in the list, it will not be updated even if the field value is specified in other request parameters.
                  example: visibility
                visibility:
                  type: string
                  description: The new visibility value. It can be one of the following case-sensitive values - Private, Restricted, Public
                  enum:
                    - Private
                    - Restricted
                    - Public
              required:
                - updatedFields
                - visibility
      responses:
        "200":
          $ref: "#/components/responses/ProjectInfoResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    delete:
      operationId: deleteProject
      summary: Delete project/publication
      description: Deletes a project or publication.
      tags:
        - Projects & Publications
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the project or publication to delete.
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/DeleteProject"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/import:
    post:
      operationId: importNewProject
      summary: Import new project
      description: Creates a new project by importing content from multiple supported formats.
      tags:
        - Projects & Publications
      parameters:
        - name: format
          in: query
          required: true
          description: Specifies how the import data is provided. Can be url or base64.
          schema:
            type: string
            enum: [url, base64]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportProjectBody"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/export:
    post:
      operationId: exportPublication
      summary: Export publication
      description: Exports a publication in one of the supported formats.
      tags:
        - Projects & Publications
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the publication to export.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                format:
                  type: string
                  description: One of the allowed case-sensitive export formats.
                  enum:
                    - WebHelp
                    - PureHtml
                    - Markdown
                    - Chm
                    - Pdf
                    - Doc
                    - Docx
                    - Rtf
                    - Epub
                    - Mht
                    - Odt
                outputFileName:
                  type: string
                  description: The full name of the output file. If the output file is written in ClickHelp File Storage (default), this should be a full file name, including the file path that starts with Storage/. If the output is written to an FTP server, this should be an FTP file name relative to the FTP directory in which the file is written.
                  example: Storage/export-files/deep-space-1.0-docs.zip
                exportPresetName:
                  type: string
                  description: For printed formats only. The name of the Export Preset to be used (e.g. "Default" or "Default - Single Topic").
                ftpInfo:
                  type: object
                  description: An object specifying FTP server connection settings. If the value is null, the output file will be written to your ClickHelp portal File Storage.
                  properties:
                    hostName:
                      type: string
                      description: The FTP hostname of your FTP server, like ftp.hedronlabs.org.
                    userName:
                      type: string
                      description: The FTP user name.
                    password:
                      type: string
                      description: The FTP user password.
                    isUsePassiveMode:
                      type: boolean
                      description: Whether or not to use passive mode for the FTP connection. Try setting it to true if you face FTP errors, specifically, the 425 Can't open data connection error.
                    port:
                      type: integer
                      description: The FTP server port to which the connection is established. The default FTP port is used if the value is null or not specified.
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/download:
    post:
      operationId: downloadProject
      summary: Download project backup
      description: Creates a backup of a project and saves it to the specified location.
      tags:
        - Projects & Publications
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to download.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                outputFileName:
                  type: string
                  description: The full name of the output file. Should be a full file name starting with Storage/.
                  example: Storage/backups/deep-space-backup.zip
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/publish:
    post:
      operationId: publishProject
      summary: Publish project
      description: Publishes a project, creating or updating a publication.
      tags:
        - Projects & Publications
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to publish.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pubId:
                  type: string
                  description: The ID of the publication to create.
                pubName:
                  type: string
                  description: The name of the publication to create.
                isPublishOnlyReadyTopics:
                  type: boolean
                  description: Whether to publish only topics in the Ready status.
                outputTags:
                  type: array
                  items:
                    type: string
                  description: An array of strings containing Output Tags to use.
                pubVisibility:
                  type: string
                  description: The target publication visibility. Specify Public, Restricted or Private.
                  enum:
                    - Public
                    - Restricted
                    - Private
                publishedTocNodeIds:
                  type: array
                  items:
                    type: string
                  description: An array of strings containing IDs of the TOC nodes to publish. If not specified, the entire project is published.
                updatedPubId:
                  type: string
                  description: The ID of the publication to update.
                updateMode:
                  type: string
                  description: Defines which update mode to choose for the update. Specify FullReplace or Partial.
                  enum:
                    - FullReplace
                    - Partial
                isReplacePubStyles:
                  type: boolean
                  description: Specifies whether to update CSS style files.
                isReplacePubScripts:
                  type: boolean
                  description: Specifies whether to update JavaScript files.
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/import:
    post:
      operationId: importToProject
      summary: Import to existing project
      description: Imports content into an existing project from multiple supported formats.
      tags:
        - Projects & Publications
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to import into.
          schema:
            type: string
        - name: format
          in: query
          required: true
          description: Specifies how the import data is provided. Can be url or base64.
          schema:
            type: string
            enum: [url, base64]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportProjectBody"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulTask"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{projectId}/publications:
    get:
      operationId: getProjectPublications
      summary: Get project publications
      description: Returns a list of publications belonging to a specific project.
      tags:
        - Projects & Publications
      parameters:
        - name: projectId
          in: path
          required: true
          description: The ID of the project to get publications for.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/ProjectDetails"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/users:
    get:
      operationId: getUsersWithAccessToProjectPublication
      summary: Get users with access to project/publication
      description: Returns a list of users who has access to a specific project or publication.
      tags:
        - Projects & Publications
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project/publication to retrieve information about.
          schema:
            type: string
        - name: types
          in: query
          required: false
          description: Filter by user types (comma-separated).
          schema:
            type: string
            enum: [PowerReader, Contributor]
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    userInfo:
                      type: object
                      description: An object containing basic profile information.
                      properties:
                        about:
                          type: string
                          description: Information the user specified in the About box.
                        avatarImageUrl:
                          type: string
                          nullable: true
                          description: URL of the image used as an avatar.
                        cultureInfoId:
                          type: string
                          description: A four-letter language code of the user's culture.
                        email:
                          type: string
                          description: Email of the user.
                        firstName:
                          type: string
                          description: First name of the user.
                        isAutoDetectCultureInfo:
                          type: boolean
                          description: Whether the culture is automatically detected. false if the culture is explicitly set by the user.
                        isAutoDetectTimeZone:
                          type: boolean
                          description: Whether the time zone is set to be automatically detected.
                        lastActivityDate:
                          type: string
                          nullable: true
                          description: An ISO 8601 timestamp of the user's last activity date. GMT timezone.
                        lastName:
                          type: string
                          description: Last name of the user.
                        middleName:
                          type: string
                          description: The middle name of the user.
                        timeZoneId:
                          type: string
                          description: An ID of the time zone the user specified.
                    userName:
                      type: string
                      description: The login of the user.
                    userType:
                      type: string
                      description: The user type of the user – PowerReader or Contributor.
                    userRole:
                      type: string
                      nullable: true
                      description: Comma-separated list of Reviewer or Power Reader Access Groups this user belongs to.
                    isEnabled:
                      type: boolean
                      description: Whether the account is enabled or not.
              example:
                - userInfo:
                    about: ""
                    avatarImageUrl: null
                    cultureInfoId: en-US
                    email: admin@email.com
                    firstName: ""
                    isAutoDetectCultureInfo: true
                    isAutoDetectTimeZone: true
                    lastActivityDate: "/Date(1734525940030+0000)/"
                    lastName: ""
                    middleName: ""
                    timeZoneId: Jordan Standard Time
                  userName: admin
                  userRole: Administrator
                  userType: Contributor
                  isEnabled: true
                - userInfo:
                    about: ""
                    avatarImageUrl: null
                    cultureInfoId: en-GB
                    email: power-reader@email.com
                    firstName: ""
                    isAutoDetectCultureInfo: false
                    isAutoDetectTimeZone: true
                    lastActivityDate: null
                    lastName: ""
                    middleName: ""
                    timeZoneId: UTC
                  userName: power-reader
                  userRole: null
                  userType: PowerReader
                  isEnabled: true
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /tasks/{taskKey}:
    get:
      operationId: getProjectManagementTaskStatus
      summary: Get project management task status
      description: "Returns a status of a project management task. Once the job finishes, the server will wait for you to retrieve the status, after which the task object is terminated — i.e., you'll get 404 for every subsequent requests for the same finished task."
      tags:
        - Projects & Publications
      parameters:
        - name: taskKey
          in: path
          required: true
          description: The key of the task to get the status of.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/TaskStatusResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /users/{user-login}/projects:
    get:
      operationId: getPublicationsAvailableToUser
      summary: Get projects/publications available to user
      description: Returns a list of projects and publications available to a specific user.
      tags:
        - Projects & Publications
      parameters:
        - name: user-login
          in: path
          required: true
          description: The login of the user to get a list of available publications for.
          schema:
            type: string
      responses:
        "200":
          description: OK
          $ref: "#/components/responses/ProjectDetails"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  # ──────────────────────────────────────────────
  # Topics
  # ──────────────────────────────────────────────

  /projects/{id}/articles:
    get:
      operationId: getAllTopicsFromProject
      summary: Get all topics from project/publication
      description: Returns information on all topics from a project.
      tags:
        - Topics
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the project or publication to get topics from.
          schema:
            type: string
        - name: isReturnSnippets
          in: query
          required: false
          description: If true, returns `ftsTitle` and `ftsSnippet` in the response body.
          schema:
            type: boolean
            example: true
        - name: format
          in: query
          required: false
          description: "The format of the `compiledContent` field in the response. Possible values: `html`, `md`. Default: `html`."
          schema:
            type: string
            enum:
              - html
              - md
            example: "html"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Topic"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        -
          basicAuth: []
        - {}           
    delete:
      operationId: deleteTopics
      summary: Delete several topics
      description: Deletes multiple topics from a project.
      tags:
        - Topics
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the project to delete topics from.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ids
              properties:
                ids:
                  type: array
                  items:
                    type: string
                  description: An array of strings containing topic ids.
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/articles:
    post:
      operationId: createTopic
      summary: Create topic
      description: Creates a new topic in a project.
      tags:
        - Topics
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to create topic in.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                assigneeUserName:
                  type: string
                  description: Topic assignee's login.
                body:
                  type: string
                  description: The HTML content of the topic.
                id:
                  type: string
                  description: The ID of the topic.
                isShowInToc:
                  type: boolean
                  description: Whether the topic's TOC node is shown in the table of contents in publications. Sets the corresponding option in the topic's properties. false by default.
                ownerUserName:
                  type: string
                  description: Topic owner's login.
                parentTocNodeId:
                  type: string
                  description: The unique identifier of the parent TOC node. Specifying null will put the topic on the root level.
                statusName:
                  type: string
                  description: Topic's workflow status.
                title:
                  type: string
                  description: The topic title.
                tocNodeCaption:
                  type: string
                  description: Custom TOC node caption. If not specified, the topic title is used instead.
                tocNodeOrdinalNo:
                  type: integer
                  description: The number indicating the position of the topic's TOC node in the table of contents. If not specified, will create the topic on the last position on the respective level.
                indexKeywords:
                  type: array
                  items:
                    type: string
                  description: An array of strings containing Index Keywords to set when creating a topic.
      responses:
        "201":
          description: Created
          headers:
            Location:
              description: URL of the created resource
              schema:
                type: string
                format: uri
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Topic"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{id}/articles/{topic-id}:
    get:
      operationId: getTopic
      summary: Get topic
      description: Returns information on a single topic.
      tags:
        - Topics
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the project or publication to get the specified topic from.
          schema:
            type: string
        - name: topic-id
          in: path
          required: true
          description: The ID of the topic to get information about.
          schema:
            type: string
        - name: format
          in: query
          required: false
          description: "The format of the `compiledContent` field in the response. Possible values: `html`, `md`. Default: `html`."
          schema:
            type: string
            enum:
              - html
              - md
            example: "html"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Topic"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        - basicAuth: []
        - {}
    delete:
      operationId: deleteTopic
      summary: Delete topic
      description: Deletes a single topic from a project.
      tags:
        - Topics
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the project to delete the topic from.
          schema:
            type: string
        - name: topic-id
          in: path
          required: true
          description: The ID of the topic to delete.
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/articles/{topic-id}:
    patch:
      operationId: updateTopic
      summary: Update topic
      description: Updates topic content and/or metadata.
      tags:
        - Topics
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to update the topic in.
          schema:
            type: string
        - name: topic-id
          in: path
          required: true
          description: The ID of the topic to update.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - updatedFields
              properties:
                assigneeUserName:
                  type: string
                  description: Topic assignee's login.
                body:
                  type: string
                  description: The HTML content of the topic.
                ownerUserName:
                  type: string
                  description: Topic owner's login.
                statusName:
                  type: string
                  description: Topic's workflow status.
                title:
                  type: string
                  description: The topic title.
                indexKeywords:
                  type: array
                  items:
                    type: string
                  description: An array of strings containing Index Keywords to set when updating a topic.
                updatedFields:
                  type: string
                  description: A comma-separated list of fields that will be updated. If a field name is not in the list, it will not be updated even if the field value is specified in other request parameters.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Topic"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  # ──────────────────────────────────────────────
  # TOC Nodes
  # ──────────────────────────────────────────────

  /projects/{project-id}/toc/nodes:
    post:
      operationId: createTocNodeFolder
      summary: Create TOC Node (Folder)
      description: Creates a folder in the table of contents of a project.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request POST 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes' \
            --data-raw '{
                "caption": "New Folder",
                "isShowInToc": true,
                "ordinalNo": 0,
                "parentId": "0e7adad0-2572-4966-8f02-bc46930cf848"
            }'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - caption
              properties:
                caption:
                  type: string
                  description: The folder name.
                  example: "New folder"
                isShowInToc:
                  type: boolean
                  default: false
                  description: "Whether to show the folder in the TOC in publications. Sets the corresponding option in the topic's properties. `false` by default."
                  example: true
                ordinalNo:
                  type: integer
                  description: "The position of the node in the TOC. Not sending the parameter will place the node at the end."
                  example: 0
                parentId:
                  type: string
                  nullable: true
                  description: "The unique identifier of the parent TOC node. Sending `null` or not sending the parameter will create a node on the root level."
                  example: "0e7adad0-2572-4966-8f02-bc46930cf848"
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to create the folder in.
          schema:
            type: string
      responses:
        "201":
          description: Created
          headers:
            Location:
              description: URL of the created resource
              schema:
                type: string
                format: uri
          content:
            application/json:
              schema:
                type: object
                properties:
                  caption:
                    type: string
                    description: "Custom TOC node caption as set in the topic properties. Empty if the topic title is used."
                  id:
                    type: string
                    description: "The unique identifier of the TOC node."
                  isAutoDocsMountPoint:
                    type: boolean
                    description: "Whether this node is a mount point of an API definition."
                  isShowInToc:
                    type: boolean
                    description: "Whether the node is shown in the TOC in publications. Sets the corresponding option in the topic's properties. `false` by default."
                  ordinalNo:
                    type: integer
                    description: "The number indicating the position of the node in the TOC."
                  parentId:
                    type: string
                    nullable: true
                    description: "The unique identifier of the parent TOC node. `null` if the node is on the root level."
                  topicId:
                    type: string
                    description: "The unique identifier of the topic associated with the TOC node."
                  topicTitle:
                    type: ["string", "null"]
                    description: The title of the topic associated with the TOC node, or null if there is no associated topic.
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    get:
      operationId: getSeveralTocNodes
      summary: Get Several TOC Nodes
      description: Returns information on all TOC nodes from a project.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request GET 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes'
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to get a list of TOC nodes from.
          schema:
            type: string
            example: "project-deep-space-exploration"
        - name: isRootNodesOnly
          in: query
          required: false
          description: If true, returns only root-level TOC nodes. Defaults to false.
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    caption:
                      type: string
                      description: Custom TOC node caption as set in the topic properties. Empty if the topic title is used.
                      example: ""
                    id:
                      type: string
                      description: The unique identifier of the TOC node.
                      example: "0e7adad0-2572-4966-8f02-bc46930cf848"
                    isAutoDocsMountPoint:
                      type: boolean
                      description: Whether this node is a mount point of an API definition.
                      example: false
                    isShowInToc:
                      type: boolean
                      description: Whether the node is shown in the TOC in publications. Sets the corresponding option in the topic's properties.
                      example: true
                    ordinalNo:
                      type: integer
                      description: The number indicating the position of the node in the TOC.
                      example: 1
                    parentId:
                      type: string
                      nullable: true
                      description: The unique identifier of the parent TOC node. `null` if the node is on the root level.
                      example: null
                    topicId:
                      type: string
                      description: The unique identifier of the topic associated with the TOC node.
                      example: "outer-space"
                    topicTitle:
                      type: ["string", "null"]
                      description: The title of the topic associated with the TOC node, or null if there is no associated topic.
                      example: "Outer Space"
              example:
                - caption: ""
                  id: "0e7adad0-2572-4966-8f02-bc46930cf848"
                  isAutoDocsMountPoint: false
                  isShowInToc: true
                  ordinalNo: 1
                  parentId: null
                  topicId: "outer-space"
                  topicTitle: "Outer Space"
                - caption: ""
                  id: "928d32c6-579b-4e98-a79e-aae03f12f1b5"
                  isAutoDocsMountPoint: false
                  isShowInToc: true
                  ordinalNo: 2
                  parentId: null
                  topicId: "astronomical-object"
                  topicTitle: "Astronomical Object"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        -
          basicAuth: []
        - {}   

    delete:
      operationId: deleteTocNodes
      summary: Delete Several TOC Nodes
      description: Deletes multiple TOC nodes along with the linked topics from a project.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request DELETE 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes' \
            --data-raw '{
                "tocNodeIds": [
                    "9b874ccc-0e0d-470e-839a-73f966b53662",
                    "c487c94e-f5c0-4c2d-a9ce-243bd77d1873"
                ]
            }'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tocNodeIds:
                  type: object
                  description: An object consisting of TOC node ID strings.
                  example:
                    - "9b874ccc-0e0d-470e-839a-73f966b53662"
                    - "c487c94e-f5c0-4c2d-a9ce-243bd77d1873"
            example:
              tocNodeIds:
                - "9b874ccc-0e0d-470e-839a-73f966b53662"
                - "c487c94e-f5c0-4c2d-a9ce-243bd77d1873"
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to delete TOC nodes from.
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/toc/nodes/{node-id}:
    get:
      operationId: getTocNode
      summary: Get TOC Node
      description: Returns information on a single TOC node.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request GET 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes/0e7adad0-2572-4966-8f02-bc46930cf848'
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to get the specified TOC node from.
          schema:
            type: string
            example: "project-deep-space-exploration"
        - name: node-id
          in: path
          required: true
          description: The ID of the TOC node to get information about.
          schema:
            type: string
            example: "0e7adad0-2572-4966-8f02-bc46930cf848"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  caption:
                    type: string
                    description: Custom TOC node caption as set in the topic properties. Empty if the topic title is used.
                    example: ""
                  id:
                    type: string
                    description: The unique identifier of the TOC node.
                    example: "0e7adad0-2572-4966-8f02-bc46930cf848"
                  isAutoDocsMountPoint:
                    type: boolean
                    description: Whether this node is a mount point of an API definition.
                    example: false
                  isShowInToc:
                    type: boolean
                    description: Whether the node is shown in the TOC in publications. Sets the corresponding option in the topic's properties.
                    example: true
                  ordinalNo:
                    type: integer
                    description: The number indicating the position of the node in the TOC.
                    example: 1
                  parentId:
                    type: string
                    nullable: true
                    description: The unique identifier of the parent TOC node. `null` if the node is on the root level.
                    example: null
                  topicId:
                    type: string
                    description: The unique identifier of the topic associated with the TOC node.
                    example: "outer-space"
                  topicTitle:
                    type: ["string", "null"]
                    description: The title of the topic associated with the TOC node, or null if there is no associated topic.
                    example: "Outer Space"
              example:
                caption: ""
                id: "0e7adad0-2572-4966-8f02-bc46930cf848"
                isAutoDocsMountPoint: false
                isShowInToc: true
                ordinalNo: 1
                parentId: null
                topicId: "outer-space"
                topicTitle: "Outer Space"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        -
          basicAuth: []
        - {}   

    patch:
      operationId: updateTocNode
      summary: Update TOC Node
      description: Updates TOC node metadata.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request PATCH 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes/0e7adad0-2572-4966-8f02-bc46930cf848' \
            --data-raw '{
                "caption":"",
                "isShowInToc":true,
                "ordinalNo":2,
                "parentId":null,
                "updatedFields":"parentId, caption, ordinalNo, isShowInToc"
            }'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - caption
                - updatedFields
              properties:
                caption:
                  type: string
                  description: The TOC node caption.
                  example: ""
                isShowInToc:
                  type: boolean
                  default: false
                  description: "Whether to show the folder in the TOC in publications. Sets the corresponding option in the topic's properties. `false` by default."
                  example: true
                ordinalNo:
                  type: integer
                  description: "The position of the node in the TOC. Not sending the parameter will place the node at the end."
                  example: 2
                parentId:
                  type: string
                  nullable: true
                  description: "The unique identifier of the parent TOC node. Sending `null` or not sending the parameter will create node on the root level."
                  example: null
                updatedFields:
                  type: string
                  description: "A comma-separated list of fields that will be updated. If a field name is not in the list, it will not be updated even if the field value is specified in other request parameters."
                  example: "parentId, caption, ordinalNo, isShowInToc"
            example:
              caption: ""
              isShowInToc: true
              ordinalNo: 2
              parentId: null
              updatedFields: "parentId, caption, ordinalNo, isShowInToc"
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to update the specified TOC node in.
          schema:
            type: string
        - name: node-id
          in: path
          required: true
          description: The ID of the TOC node to update.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  caption:
                    type: string
                    description: "Custom TOC node caption as set in the topic properties. Empty if the topic title is used."
                    example: ""
                  id:
                    type: string
                    description: "The unique identifier of the TOC node."
                    example: "0e7adad0-2572-4966-8f02-bc46930cf848"
                  isAutoDocsMountPoint:
                    type: boolean
                    description: "Whether this node is a mount point of an API definition."
                    example: false
                  isShowInToc:
                    type: boolean
                    description: "Whether the node is shown in the TOC in publications."
                    example: true
                  ordinalNo:
                    type: integer
                    description: "The number indicating the position of the node in the TOC."
                    example: 2
                  parentId:
                    type: string
                    nullable: true
                    description: "The unique identifier of the parent TOC node. `null` if the node is on the root level."
                    example: null
                  topicId:
                    type: string
                    description: "The unique identifier of the topic associated with the TOC node."
                    example: "history-of-space-exploration"
                  topicTitle:
                    type: ["string", "null"]
                    description: The title of the topic associated with the TOC node, or null if there is no associated topic.
                    example: "History of Space Exploration"
              example:
                caption: ""
                id: "0e7adad0-2572-4966-8f02-bc46930cf848"
                isAutoDocsMountPoint: false
                isShowInToc: true
                ordinalNo: 2
                parentId: null
                topicId: "history-of-space-exploration"
                topicTitle: "History of Space Exploration"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    delete:
      operationId: deleteTocNode
      summary: Delete TOC Node
      description: Deletes a single TOC node from a project.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request DELETE 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes/0e7adad0-2572-4966-8f02-bc46930cf848'
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to delete the TOC node from.
          schema:
            type: string
            example: "project-deep-space-exploration"
        - name: node-id
          in: path
          required: true
          description: The ID of the TOC node to delete.
          schema:
            type: string
            example: "0e7adad0-2572-4966-8f02-bc46930cf848"
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /projects/{project-id}/toc/nodes/{toc-node-id}/children:
    get:
      operationId: getChildTocNodes
      summary: Get Сhild TOC Nodes
      description: Returns a list of children nodes of a TOC node.
      tags:
        - TOC Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request GET 'https://{portal-url}/api/v2/projects/project-deep-space-exploration/toc/nodes/0e7adad0-2572-4966-8f02-bc46930cf848/children?isRecursive=true'
      parameters:
        - name: project-id
          in: path
          required: true
          description: The ID of the project to get children of a node from.
          schema:
            type: string
        - name: toc-node-id
          in: path
          required: true
          description: The ID of the TOC node to get child nodes of.
          schema:
            type: string
        - name: isRecursive
          in: query
          required: false
          description: "Whether or not to get information about all child nodes as well. `false` by default."
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    caption:
                      type: string
                      description: "Custom TOC node caption as set in the topic properties. Empty if the topic title is used."
                    id:
                      type: string
                      description: "The unique identifier of the TOC node."
                      example: "69fc2771-20ef-496a-8141-b8fe38e0fac4"
                    isAutoDocsMountPoint:
                      type: boolean
                      description: "Whether this node is a mount point of an API definition."
                      example: false
                    isShowInToc:
                      type: boolean
                      description: "Whether the node is shown in the TOC in publications."
                      example: true
                    ordinalNo:
                      type: integer
                      description: "The number indicating the position of the node in the TOC."
                      example: 0
                    parentId:
                      type: string
                      nullable: true
                      description: "The unique identifier of the parent TOC node. `null` if the node is on the root level."
                      example: "928d32c6-579b-4e98-a79e-aae03f12f1b5"
                    topicId:
                      type: string
                      description: "The unique identifier of the topic associated with the TOC node."
                      example: "planetary-system"
                    topicTitle:
                      type: ["string", "null"]
                      description: The title of the topic associated with the TOC node, or null if there is no associated topic.
                      example: "Planetary System"
              example:
                - caption: ""
                  id: "69fc2771-20ef-496a-8141-b8fe38e0fac4"
                  isAutoDocsMountPoint: false
                  isShowInToc: true
                  ordinalNo: 0
                  parentId: "928d32c6-579b-4e98-a79e-aae03f12f1b5"
                  topicId: "planetary-system"
                  topicTitle: "Planetary System"
                - caption: ""
                  id: "42914509-ee9b-4b95-9c25-0334419f86db"
                  isAutoDocsMountPoint: false
                  isShowInToc: true
                  ordinalNo: 1
                  parentId: "928d32c6-579b-4e98-a79e-aae03f12f1b5"
                  topicId: "star-cluster"
                  topicTitle: "Star Cluster"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        -
          basicAuth: []
        - {}             

  # ──────────────────────────────────────────────
  # Reporting & Analytics
  # ──────────────────────────────────────────────

  /reports/user-events/{user-login}/articles:
    get:
      operationId: getTopicViews
      summary: Get Topic Views
      description: Returns information on topics viewed by anonymous users or a specific user.
      tags:
        - Reporting & Analytics
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request GET 'https://{portal-url}/api/v2/reports/user-events/pr1/articles?startDate=2022-08-09T02:35:00&endDate=2022-12-31T02:35:00'
      parameters:
        - name: user-login
          in: path
          required: true
          description: The login of the user to get topic views for. Use `-` instead of the login to get the data for anonymous users.
          schema:
            type: string
            example: pr1
        - name: startDate
          in: query
          required: true
          description: An ISO 8601 timestamp of the report range start date. GMT timezone.
          schema:
            type: string
            example: "2022-08-09T02:35:00"
        - name: endDate
          in: query
          required: true
          description: An ISO 8601 timestamp of the report range end date. GMT timezone.
          schema:
            type: string
            example: "2022-12-31T02:35:00"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    actionType:
                      type: string
                      description: |
                        The type of the topic view action. Can be one of the following:
                          - DirectNavigation — navigation via link clicks.
                          - FromToc — the topic was opened by clicking on the TOC node.
                          - FromIndex — the topic was opened by clicking on the index keyword.
                          - FromSearch — the topic was opened from the search results.
                          - FromContextHelp — the topic was loaded as a Context Help snippet.
                    dateTime:
                      type: string
                      format: date-time
                      description: An ISO 8601 timestamp of the event. GMT timezone.
                    href:
                      type: string
                      description: The URL which can be used to retrieve detailed information on the topic viewed by the user.
                    referrerUrl:
                      type: string
                      description: The URL of the page from which the user navigated to the topic.
              example:
                - actionType: DirectNavigation
                  dateTime: "2025-02-15T10:20:30Z"
                  href: "/api/v2/projects/deep-space-exploration/articles/basic-functionality"
                  referrerUrl: "https://docs.hedronlabs.org/articles/"
                - actionType: FromToc
                  dateTime: "2025-05-10T14:45:00Z"
                  href: "/api/v2/projects/deep-space-exploration/articles/advanced-functionality"
                  referrerUrl: "https://docs.hedronlabs.org/articles/toc"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        - basicAuth: []

  /reports/user-events/{user-login}/search-queries:
    get:
      operationId: getSearchQueries
      summary: Get Search Queries
      description: Returns information on the search queries by anonymous or a specific user.
      tags:
        - Reporting & Analytics
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request GET 'https://{portal-url}/api/v2/reports/user-events/pr1/search-queries?startDate=2022-08-09T02:35:00&endDate=2022-12-31T02:35:00&projectId=project-deep-space-exploration' \
            --header 'Authorization: Basic <base64-encoded-credentials>'
      parameters:
        - name: user-login
          in: path
          required: true
          description: The login of the user to get search queries for. Use `-` instead of the login to get the data for anonymous users.
          schema:
            type: string
            example: "pr1"
        - name: startDate
          in: query
          required: true
          description: Start date for the report period.
          schema:
            type: string
            example: "2022-11-07T15:25:00"
        - name: endDate
          in: query
          required: true
          description: End date for the report period.
          schema:
            type: string
            example: "2022-11-07T15:30:00"
        - name: projectId
          in: query
          required: false
          description: Filter by project ID.
          schema:
            type: string
            example: "deep-space-exploration-publication"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    dateTime:
                      type: string
                      format: date-time
                      description: An ISO 8601 timestamp of the event. GMT timezone.
                      example: "2022-11-07T15:25:34"
                    queryText:
                      type: string
                      description: The full-text search query.
                      example: "click"
                    resultsTotal:
                      type: integer
                      description: The total number of search results returned.
                      example: 5
                    projectId:
                      type: string
                      description: Id of the project or publication search was performed in.
                      example: "deep-space-exploration-publication"
                  example:
                    - dateTime: "2022-11-07T15:25:34"
                      queryText: "click"
                      resultsTotal: 5
                      projectId: "deep-space-exploration-publication"
                    - dateTime: "2022-11-07T15:25:27"
                      queryText: "nebula"
                      resultsTotal: 0
                      projectId: "deep-space-exploration-publication"
                    - dateTime: "2022-11-07T15:25:22"
                      queryText: "some"
                      resultsTotal: 0
                      projectId: "deep-space-exploration-publication"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        - basicAuth: []

  # ──────────────────────────────────────────────
  # Search
  # ──────────────────────────────────────────────

  /search:
    get:
      operationId: searchThePortal
      summary: Search the Portal
      description: Returns results of a full-text search query. Projects/publications unavailable to the user sending request will be skipped. For unauthorized users, returns results from public publications only.
      tags:
        - Search
      x-codeSamples:
        - lang: curl
          source: |
            curl --location -g --request GET 'https://{portal-url}/api/v2/search?count=2&projectIds=project-deep-space-exploration,space-program-pub&lang=en-us&isReturnSnippets=true&q=nebula'
      parameters:
        - name: q
          in: query
          required: true
          description: Full-text search query. May contain any [supported search operators](https://docs.clickhelp.com/articles/clickhelp-user-manual/full-text-search-supported-search-operators/).
          schema:
            type: string
            example: "nebula"
        - name: count
          in: query
          required: false
          description: The maximum number of results to return. When not specified, the top 10 results are returned. When a negative number is specified, returns all search results regardless of their total count.
          schema:
            type: integer
            example: 2
        - name: projectIds
          in: query
          required: false
          description: Comma-separated list of project/publication IDs to search in. IDs of projects/publications you don't have access to will be ignored.
          schema:
            type: string
            example: "project-deep-space-exploration,space-program-pub"
        - name: lang
          in: query
          required: false
          description: Four-letter language code. If specified, only projects/publications in that language are searched.
          schema:
            type: string
            example: "en-us"
        - name: isReturnSnippets
          in: query
          required: false
          description: If true, returns `ftsTitle` and `ftsSnippet` in the response body.
          schema:
            type: boolean
            example: true
        - name: format
          in: query
          required: false
          description: "The format of the `compiledContent` field in the response. Possible values: `html`, `md`. Default: `html`."
          schema:
            type: string
            enum:
              - html
              - md
            example: "html"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    assigneeUserName:
                      type: string
                      description: Topic assignee's login.
                      example: "admin"
                    body:
                      type: string
                      nullable: true
                      description: The content of the <body> tag of the topic. Returns null for all methods except [Get Topic](https://docs.clickhelp.com/articles/clickhelp-user-manual/api-get-topic).
                      example: null
                    compiledContent:
                      type: string
                      nullable: true
                      description: The content of the topic in the format specified by the `format` parameter. Returns null for all methods except Get Topic.
                      example: null
                    compiledContentType:
                      type: string
                      nullable: true
                      description: The format of the `compiledContent` field. Either `html` or `md`.
                      enum:
                        - html
                        - md
                    createdOn:
                      type: string
                      format: date-time
                      description: An ISO 8601 timestamp of the topic creation date. GMT timezone.
                      example: "2021-05-10T12:32:25"
                    ftsSnippet:
                      type: string
                      nullable: true
                      description: A topic content snippet with full-text search query matches highlighted. Populated only when `isReturnSnippets` is true.
                      example: "...A&#160;<strong>nebula</strong>&#160;..."
                    ftsTitle:
                      type: string
                      nullable: true
                      description: The topic title with full-text search query matches highlighted. Populated only when `isReturnSnippets` is true.
                      example: "New topic created with API"
                    fullUrl:
                      type: string
                      description: Full topic URL.
                      example: "https://docs.hedron.org/articles/project-deep-space-exploration/nebula"
                    id:
                      type: string
                      description: The ID of the topic.
                      example: "nebula"
                    indexKeywords:
                      type: array
                      items:
                        type: string
                      description: An array of strings containing index keywords associated with the topic. Hierarchical keywords are represented as comma-separated values.
                      example: ["cluster", "N", "nebula"]
                    modifiedOn:
                      type: string
                      format: date-time
                      description: An ISO 8601 timestamp of the topic modification date. GMT timezone.
                      example: "2022-11-07T12:59:40"
                    ownerUserName:
                      type: string
                      description: Topic owner's login.
                      example: "admin"
                    projectId:
                      type: string
                      description: The unique identifier of the project or publication.
                      example: "project-deep-space-exploration"
                    projectTitle:
                      type: string
                      description: The title of the project or publication the topic belongs to.
                      example: "Project Deep Space Exploration"
                    statusName:
                      type: string
                      description: Topic's workflow status.
                      example: null
                    title:
                      type: string
                      description: The topic title.
                      example: "New topic created with API"
                    tocNodeId:
                      type: string
                      description: The ID of the TOC node associated with the topic.
                      example: "cd1ad87f-55a4-46e5-b496-c3434d555cd1"
                    isAutoTopic:
                      type: boolean
                      description: True if the topic is an auto-topic.
                      example: false
              example:
                - assigneeUserName: "admin"
                  compiledContent: null
                  compiledContentType: null
                  createdOn: "2021-05-10T12:32:25"
                  ftsSnippet: "...A&#160;<strong>nebula</strong>&#160;( Latin&#160;for &#39;cloud&#39; or &#39;fog&#39;...) is an interstellar cloud&#160;of dust, hydrogen, helium&#160;and other ionized gases..."
                  ftsTitle: "New topic created with API"
                  fullUrl: "https://docs.hedron.org/articles/project-deep-space-exploration/nebula"
                  id: "nebula"
                  indexKeywords: ["cluster", "N", "nebula", "N, nebula"]
                  modifiedOn: "2022-11-07T12:59:40"
                  ownerUserName: "admin"
                  projectId: "project-deep-space-exploration"
                  projectTitle: "Project Deep Space Exploration"
                  statusName: null
                  title: "New topic created with API"
                  tocNodeId: "cd1ad87f-55a4-46e5-b496-c3434d555cd1"
                  isAutoTopic: false
                - assigneeUserName: "admin"
                  compiledContent: null
                  compiledContentType: null
                  createdOn: "2022-10-25T13:32:19"
                  ftsSnippet: "...A&#160;<strong>nebula</strong>&#160;( Latin&#160;for &#39;cloud&#39; or &#39;fog&#39;...) is an interstellar cloud&#160;of dust, hydrogen, helium&#160;and other ionized gases..."
                  ftsTitle: "<strong>Nebula</strong>"
                  fullUrl: "https://docs.hedron.org/articles/space-program-pub/nebula"
                  id: "nebula"
                  indexKeywords: []
                  modifiedOn: "2022-10-25T13:32:27"
                  ownerUserName: "admin"
                  projectId: "space-program-pub"
                  projectTitle: "Space Program Pub"
                  statusName: null
                  title: "Nebula"
                  tocNodeId: "cd1ad87f-55a4-46e5-b496-c3434d555cd1"
                  isAutoTopic: false
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        - basicAuth: []
        - {}

  # ──────────────────────────────────────────────
  # Storage
  # ──────────────────────────────────────────────

  /storage/{filePath}:
    get:
      operationId: getFiles
      summary: Get file(s) or folder info
      description: |
        Retrieves information about a specific file, a folder, or several files. 

        **Scenario 1: Get a Single File**
        * Use `format=base64` if you want to download the actual file content.
        * **Do not use** `filter` or `isRecursive`.

        **Scenario 2: Get Several Files**
        * Use `filter` to specify what to retrieve (e.g., `*` for everything, `*.png` for images).
        * Use `isRecursive=true` if you want to include subfolders.
        * **Do not use** `format`.

        **Scenario 3: Get Folder Information**
        * **Do not use** `format` or `filter`.
      tags:
        - Storage
      x-codeSamples:
        - lang: bash
          source: |
            # Scenario 1: Get a Single File
            curl --location -g --request GET 'https://{portal-url}/api/v2/storage/project-deep-space-exploration/info.png?format=base64'

            # Scenario 2: Get Several Files
            curl --location -g --request GET 'https://{portal-url}/api/v2/storage/project-deep-space-exploration?filter=*&isRecursive=false'

            # Scenario 3: Get Folder Information
            curl --location -g --request GET 'https://{portal-url}/api/v2/storage/project-deep-space-exploration/images'
      parameters:
        - name: filePath
          in: path
          required: true
          description: |
            The path relative to the root (`...resources/Storage/`). 
            - For a **single file**, specify the full file path with its extension.
            - For **several files** or **folder information**, specify the folder path.
          schema:
            type: string
          example: "project-deep-space-exploration"
        - name: format
          in: query
          required: false
          description: |
            **[Single File Only]** Allowed value: `base64`. Use it to include the actual file content in the response. Do not use this parameter when querying a folder or several files.
          schema:
            type: string
        - name: filter
          in: query
          required: false
          description: |
            **[Several Files Only]** File name mask to filter the results. Use `*` to get all files, or specify an extension like `*.png`.
          schema:
            type: string
        - name: isRecursive
          in: query
          required: false
          description: |
            **[Several Files Only]** Whether to return files from all nested subfolders recursively.
          schema:
            type: boolean
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StorageItem"
                  - type: array
                    items:
                      $ref: "#/components/schemas/StorageItem"
              examples:
                GetFileResponse:
                  summary: Get File (format=base64)
                  value:
                    fileName: "info.png"
                    fileFullName: "Storage\\project-deep-space-exploration\\info.png"
                    content: "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVQ4y2P0av/xn4ECwMRAIcBrwNYKdoatFey0dQELPknvjp/kG4DsdHwGMVFiO+1jYdQACg1ATgf4kjPLgKcDAL8dECIPWD7kAAAAAElFTkSuQmCC"
                    modifiedBy: "katherine"
                    modifiedOn: "2021-04-07T15:50:15"
                    size: 123
                    isFolder: false
                GetSeveralFilesResponse:
                  summary: Get Several Files
                  value:
                    - fileName: "2b7f5b28-771e-46fc-9b60-427c6f6e10d9.gif"
                      fileFullName: "Storage\\project-deep-space-exploration\\2b7f5b28-771e-46fc-9b60-427c6f6e10d9.gif"
                      content: null
                      modifiedBy: "jen"
                      modifiedOn: "2022-05-06T08:16:29"
                      size: 490
                      isFolder: false
                    - fileName: "Artist_Concept_Planetary_System.jpg"
                      fileFullName: "Storage\\project-deep-space-exploration\\Artist_Concept_Planetary_System.jpg"
                      content: null
                      modifiedBy: "admin"
                      modifiedOn: "2022-09-27T12:45:57"
                      size: 80801
                      isFolder: false
                GetFolderInfoResponse:
                  summary: Get Folder Information
                  value:
                    fileName: "images"
                    fileFullName: "Storage\\project-deep-space-exploration\\images"
                    content: null
                    modifiedBy: "admin"
                    modifiedOn: "2024-01-15T12:00:00"
                    size: 0
                    isFolder: true
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    patch:
      operationId: updateFile
      summary: Update file content
      description: Updates existing file content. The maximum file size that you can upload via API is 1 GB.
      tags:
        - Storage
      parameters:
        - name: filePath
          in: path
          required: true
          description: File path relative to the root, i.e., everything after ...resources/Storage/.
          schema:
            type: string
          example: "project-deep-space-exploration/info.png"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: Base64-encoded file content.
                updatedFields:
                  type: string
                  description: A comma-separated list of field names that will be updated. If a field name is not in the list, it will not be updated even if the field value is specified in other request parameters.
            examples:
              UpdateFileExample:
                summary: Update file content
                value:
                  content: "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5gsICiIy3F/ZtwAAC95JREFUeNrtm19QW9edxz/3CgkQIIGE+A82BjuAsWwgCAyecZ3a3pmknmy3k05eNrN1nLQznTYP7VM7s9uHTd8y2c2Dm8ZtdtpJk6k7bt02u6ETtnYTY/7IKIDcAAYRgWywwAgkAfqD7r37ANZyA8GORKymzm9GL+eec+7v9z2/c37f3+9cCYqiAOQAZ4DngL1AGn+fsgq4gNeBV4GgoChKDvAi8E1Al2oNHyAQrwI/TAO+tf7TplqrByha1hb8I0FRlGGgJtUapUiGBUVRojxcq79RYoKyfgo+rCKmWoFUyxcApFqBVEvKCE84HMbv96PRaMjLy0Oj0Tw8AEiSxG/On6e7uxudTsczzzxDY1PTwwOAoijcvHmT2dlZNBoNC4uLKTEeUngGiKKIIAjx30MFgCiKsMFoMYUAPNAtEAqFuDM3h3d2lgWfL77yozduYDKbsVgsWCwW0tIenFpJM8HFxUVcLhd1dXVkZmZu27ezs5Pzv/41oVCI1VgM1l8tCAKatDSKiop44YUXKC8v33ae6elp5u/cobauLmmwktoCCwsLnHvtNf7j5Zf5zfnzhMPh+LNoNEo0GlX137VrF7Isr7VvwF1RFCLhMGaTCYvFohoTCoXYuEaeqSl+cvYsL730Em//8Y9IkpQ6AAYHBujv7ycajdLR0cH58+cJh0JMut385OxZ3nvvPVX/yspKDh48yFZOp9PpaD9yhIyMjHhbOBzml7/4BRcvXmRlZQWPx8NPX3uN0dFRVlZW6OzsZG5uLikAkvKf/fX1NDQ04HA4kCSJP3V0MOv1cmt6Gs/UFH6/n/b29vjWSEtLo629HbvdrvIOWZbZvXs3VqtVNb/b7aa3t5dQKMToyAiBYJDxsTEEQSA9PZ3jx49jNpuTAiApD7BYLJw5c4bGpiYEQUCSJPr6+pi+dQuNRsPExATjY2OqMbW1tVRXVyPLcrxNEARaWlvJzc1V9bX39bG0tISiKDgcDlzj4wiCQEZGBv/0ta/xlVOn0GqTy+STDoPm/HyeffZZ9u7diyzLqvi+srJCb2+vyuX1ej2H29ri1FdRFCwWCzabTTXv/Pw8AwMD/6/ohnlPnDzJqVOndiRa7AgPWFlZYWl5eROhEQSBoaEhvF6vqr2xsZGSkhJkWUZRFBoaGigpKVH1cTqdzMzMrHGGDaIoCnNzc0QjkZ1QPXkAIpEIFy5cwDM1tSUAc3NzDA0NqdrNZjPN6yuenZ3N4bY21dhoNIq9r49YLLblO3t7erj8l7/8bQAQi8UoLi6moqICURTjq3pXJEnC3tenCpEArS0tGI1GHqmpobq6WvVscnKS0dFRFSiKoiDLMpmZmdTU1mIwGNiJYlbSmygrK4unn36aEydO4Bwaos9u58boKIFAAFjzgvHxcVwuF/v374+PK6+ooNlmY39dHTqduhp/zW4nEAggCAKyLKPRaCgoLOSg1YrNZqOquhq9Xp+08bADTPDjEo1GmXS7sV+7xgcOB9PT00QiEZ544gm+cfq0qq/X6yU7O5usrKx4m8/n48cvvojb7SbHYKC6qopmm42DVisFhYU7njh9pkVRn8/H9evX6enuJhgM8p3vfpeCgoJtx3R1dfHbCxeor6/H1tJCVVWVihzttCQMQDAYxOl0Ul1dfU+jotEoN2/eJC8vj7y8vG37Tk1Okp6efs/VjsViTExMsLy8zKFDhxL2jITPAI/Hw8/OncNoNNJss9Ha2kpFRcWWsVmn07Fnz577mrdi165tny8vLzM8PEzXlSsMDQ1RsWsXtbW1CXtJwgDMzMysxf+lJW397ndcvnQJq9VKW3s7NTU1O3ZI3ZW5uTk+cDi4evUqExMT8ahyZ26OgN9PRkZGPCp8Gm+4ry2wvLzMf7/9NgsLC3E25na7GV+nprAWphRFITMzk6rqatrb22loaMBkMiVstCRJTE1N0dPdjd1uZ2ZmBkmSVORIq9VitVrJyspCARRZ5oDVytGjR+/rHfflAV6vl46ODoKBQLySc5eaxpFcByYSiXDd6WT4ww8pKSmhra2N4ydOYDQaP5XxLpeLd955h6HBQfx+P4qiIIriJma4urqK3W6Pr74sy"
                  updatedFields: "content"
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    post:
      operationId: uploadFile
      summary: Create File or Folder / Start Resumable Upload
      description: |
        Creates a file or folder in the Storage. 

        **Upload Methods:**
        - **Base64 Upload (`format=base64`)**: Best for small files (less than 5 MB). Send an `application/json` body with the `content` property.
        - **Create Folder (`format=base64`)**: Send an `application/json` body with `isFolder: true`.
        - **Multipart Upload (`format=multipart`)**: Best for standard uploads (up to 10 MB). The maximum file size that you can upload is 10 MB.
        - **Resumable Upload Step 1 (`format=resumable`)**: Initializes a chunked upload for large files. Request and Response bodies are empty for this method.
      tags:
        - Storage
      parameters:
        - name: filePath
          in: path
          required: true
          description: File or folder path relative to the root. i.e., everything after ...resources/Storage/.
          schema:
            type: string
          example: "project-deep-space-exploration/info.png"
        - name: format
          in: query
          required: true
          description: File encoding format.
          schema:
            type: string
            enum: [base64, multipart, resumable]
        - name: isOverwrite
          in: query
          required: false
          description: Whether to overwrite an existing file. false by default.
          schema:
            type: boolean
            default: false
      requestBody:
        required: false
        description: The request body is required for base64 and multipart formats, but must be empty for resumable.
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: Base64-encoded file content. Only applicable when format=base64.
                isFolder:
                  type: boolean
                  description: Whether to create a folder. If true, content is ignored. false by default.
                  default: false
            examples:
              Base64UploadExample:
                summary: Upload via Base64
                description: Request sample for format=base64
                value:
                  content: "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVQ4y2P0av/xn4ECwMRAIcBrwNYKdoatFey0dQELPknvjp/kG4DsdHwGMVFiO+1jYdQACg1ATgf4kjPLgKcDAL8dECIPWD7kAAAAAElFTkSuQmCC"
                  isFolder: false
              CreateFolderExample:
                summary: Create an empty folder
                description: Request sample to just create a directory
                value:
                  isFolder: true
              ResumableUploadStep1Example:
                summary: Resumable upload (Step 1)
                description: Request body must be completely empty for format=resumable.
                value: {}
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The binary file to upload. Only applicable when format=multipart.
      responses:
        "201":
          description: Created. Returns file metadata for base64 and multipart uploads. Note that the response body is empty for format=resumable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StorageItem"
              examples:
                Base64ResponseExample:
                  summary: Response for Base64 (Small file)
                  value:
                    content: null
                    fileFullName: "Storage\\info.png"
                    fileName: "info.png"
                    isFolder: false
                    modifiedBy: "admin"
                    modifiedOn: "2025-10-29T13:21:28"
                    size: 123
                MultipartResponseExample:
                  summary: Response for Multipart (Medium file)
                  value:
                    content: null
                    fileFullName: "Storage\\manual.docx"
                    fileName: "manual.docx"
                    isFolder: false
                    modifiedBy: "admin"
                    modifiedOn: "2025-10-29T13:21:28"
                    size: 99849
                ResumableResponseExample:
                  summary: Response for Resumable Step 1
                  description: Response body is completely empty.
                  value: {}
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    put:
      operationId: uploadResumableChunk
      summary: Upload file chunks (Resumable Step 2)
      description: |
        Uploads a piece of the file. The maximum size of one chunk is 10 MB. Chunks are uploaded sequentially until the entire file is transferred.

        **Samples:**

        **Uploading the first chunk:**
        ```bash
        curl --location -g --request PUT 'https://{portal-url}/api/v2/storage/file.zip?format=resumable' \
        --header 'Content-Range: bytes 0-10485759/52428800' \
        --data-binary @chunk1.bin
        ```

        **Uploading the last chunk:**
        ```bash
        curl --location -g --request PUT 'https://{portal-url}/api/v2/storage/file.zip?format=resumable' \
        --header 'Content-Range: bytes 41943040-52428799/52428800' \
        --data-binary @last_chunk.bin
        ```
      tags:
        - Storage
      parameters:
        - name: filePath
          in: path
          required: true
          description: The same path specified when initializing the upload at Step 1.
          schema:
            type: string
          example: "file.zip"
        - name: format
          in: query
          required: true
          description: Must be 'resumable'.
          schema:
            type: string
            enum: [resumable]
        - name: Content-Range
          in: header
          required: true
          description: "Specifies the byte range of the current chunk and total file size. Format: bytes {start}-{end}/{total} or bytes {start}-{end}/* (when total size is unknown). The {start} value must equal the last successfully uploaded byte + 1. For the final chunk, {end} + 1 must equal {total}."
          schema:
            type: string
          examples:
            FirstChunk:
              summary: Uploading the first chunk
              value: "bytes 0-10485759/52428800"
            LastChunk:
              summary: Uploading the last chunk
              value: "bytes 41943040-52428799/52428800"
      requestBody:
        required: true
        description: Raw bytes of the file chunk.
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        "201":
          description: Final response. The last chunk was received and the file has been assembled successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StorageItem"
              examples:
                ResumableFinalResponse:
                  summary: Final response (Large file)
                  value:
                    content: null
                    fileFullName: "Storage\\file.zip"
                    fileName: "file.zip"
                    isFolder: false
                    modifiedBy: "admin"
                    modifiedOn: "2025-10-31T09:45:00"
                    size: 52428800
        "202":
          description: Intermediate response. The chunk was successfully received, but the upload is not yet complete.
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    head:
      operationId: checkFileExists
      summary: Check file exists
      description: Returns information on whether a file or folder exists.
      tags:
        - Storage
      parameters:
        - name: filePath
          in: path
          required: true
          description: File or folder path relative to the root. i.e., everything after ...resources/Storage/.
          schema:
            type: string
          example: "project-deep-space-exploration/info.png"
      responses:
        "200":
          description: File exists.
        "404":
          description: File not found.
    delete:
      operationId: deleteFile
      summary: Delete file
      description: Deletes a single file from storage.
      tags:
        - Storage
      parameters:
        - name: filePath
          in: path
          required: true
          description: File path relative to the root.
          schema:
            type: string
          example: "project-deep-space-exploration/info.png"
      responses:
        "204":
          description: No Content. The file was successfully deleted.
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /storage:
    delete:
      operationId: deleteFiles
      summary: Delete multiple files
      description: Deletes multiple files from storage.
      tags:
        - Storage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteFilesRequest"
      responses:
        "204":
          description: No Content. The files were successfully deleted.
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  # ──────────────────────────────────────────────
  # Users
  # ──────────────────────────────────────────────

  /users:
    post:
      operationId: createUser
      summary: Create user
      description: Creates a new user account.
      tags:
        - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - userName
                - userInfo
              properties:
                userName:
                  type: string
                  description: The login of the user.
                userInfo:
                  type: object
                  description: An object containing basic profile information.
                  required:
                    - email
                  properties:
                    email:
                      type: string
                      description: Email of the user.
                    firstName:
                      type: string
                      description: First name of the user.
                    middleName:
                      type: string
                      description: Middle name of the user.
                    lastName:
                      type: string
                      description: Last name of the user.
                isPasswordChangeRequired:
                  type: boolean
                  description: "Whether to redirect the user to the password change page on their first login. Defaults to `false`."
                userRole:
                  type: string
                  description: "If the userType is Contributor, the role of the user: Reviewer, Translator, Administrator, etc. If the user is a PowerReader or a Reviewer, a comma-separated list of Power Reader or Reviewer Access Groups to assign to this user."
                userType:
                  type: string
                  description: "Type of the user – Contributor or PowerReader (default)."
                isDontSendEmail:
                  type: boolean
                  description: Whether to send an email to the user about the account creation.
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    get:
      operationId: getUsers
      summary: Get users
      description: Returns information about all users on the portal.
      tags:
        - Users
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/User"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /users/{user-login}:
    patch:
      operationId: changeUserProfile
      summary: Change user profile
      description: "Updates user's profile information."
      tags:
        - Users
      parameters:
        - name: user-login
          in: path
          required: true
          description: The login of the user to update the profile of.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - updatedFields
              properties:
                updatedFields:
                  type: string
                  description: A comma-separated list of fields that will be updated. If a field name is not in the list, it will not be updated even if the field value is specified in other request parameters.
                email:
                  type: string
                  description: Email of the user.
                userRole:
                  type: string
                  description: "If the user is Contributor, the user role, e.g., Reviewer, Translator, Writer, etc. If the user is a Power Reader or a Reviewer, a comma-separated list of Power Reader or Reviewer Access Groups this user belongs to."
                userType:
                  type: string
                  description: "The type of the user: Contributor or PowerReader."
                isEnabled:
                  type: boolean
                  description: Whether the account is enabled or not.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    get:
      operationId: getUserProfile
      summary: Get user profile
      description: Returns information on the user.
      tags:
        - Users
      parameters:
        - name: user-login
          in: path
          required: true
          description: The login of the user to get information about.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /users/{user-login}/tokens:
    get:
      operationId: getLoginToken
      summary: Get login token
      description: Returns a login token for the user. You can use any Contributor account credentials for the [authentication](https://docs.clickhelp.com/articles/clickhelp-user-manual/clickhelp-api/#h2__55841322) to run this method. To learn more about the token login mechanism and how to use tokens, please refer to the [Token Login Mechanism](https://docs.clickhelp.com/articles/clickhelp-user-manual/the-token-login-mechanism/).
      tags:
        - Users
      parameters:
        - name: user-login
          in: path
          required: true
          description: The login of the user to get the login token for.
          schema:
            type: string
        - name: exp
          in: query
          required: false
          description: An ISO 8601 timestamp of the token expiration date. GMT timezone. The default value is 30 minutes from the current moment.
          schema:
            type: string
        - name: muse
          in: query
          required: false
          description: "Whether to consume the token on the first use. If true, the token can be used unlimited times until it hits the expiration date. false by default."
          schema:
            type: boolean
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expirationDate:
                    type: string
                    format: date-time
                    description: An ISO 8601 timestamp of the token expiration date. GMT timezone.
                  token:
                    type: string
                    description: The generated login token.
                  userName:
                    type: string
                    description: The login of the user.
                  isMultiUse:
                    type: boolean
                    description: Whether the token can be used multiple times, i.e., not consumed on the first use.
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  # ──────────────────────────────────────────────
  # AnswerGenius
  # ──────────────────────────────────────────────

  /answergenius/ask:
    post:
      operationId: askAnswerGenius
      summary: Ask AnswerGenius
      description: Send a query to AnswerGenius.
      tags:
        - AnswerGenius
      parameters:
        - name: format
          in: query
          required: false
          description: "The format of the `content` field in each chat message of the response. Possible values: `html`, `md`. Default: `html`."
          schema:
            type: string
            enum:
              - html
              - md
            example: "html"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  description: The query to send to AnswerGenius.
                chatId:
                  type: string
                  description: The ID of a specific chat conversation with AnswerGenius. Specifying the chatId adds more context to a conversation.
                projectId:
                  type: string
                  description: The ID of a publication for prioritized search.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the chat conversation with AnswerGenius.
                  messages:
                    type: array
                    description: The answer to the query.
                    items:
                      type: object
                      properties:
                        content:
                          type: string
                          description: The content of the answer in the format specified by the `format` parameter.
                        contentType:
                          type: string
                          description: "The format of the `content` field. Either `html` or `md`."
                          enum:
                            - html
                            - md
                        messageType:
                          type: string
                          description: "The type of the message, for example: Assistant."
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
      security:
        - basicAuth: []
        - {}

  # ──────────────────────────────────────────────
  # Workflow Statuses
  # ──────────────────────────────────────────────

  /workflow/statuses:
    get:
      operationId: getWorkflowStatuses
      summary: Get all workflow statuses
      description: Returns a list of all workflow statuses.
      tags:
        - Workflow Statuses
      parameters:
        - name: isTranslation
          in: query
          required: false
          description: If specified, filters workflow statuses by whether they are translation statuses.
          schema:
            type: boolean
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/WorkflowStatus"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    post:
      operationId: createWorkflowStatus
      summary: Create workflow status
      description: Creates a new workflow status (non-translation statuses only).
      tags:
        - Workflow Statuses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorkflowStatusParam"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowStatus"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /workflow/statuses/{statusName}:
    get:
      operationId: getWorkflowStatus
      summary: Get workflow status
      description: Returns workflow status details by its name.
      tags:
        - Workflow Statuses
      parameters:
        - name: statusName
          in: path
          required: true
          description: The name of the workflow status.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowStatus"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    patch:
      operationId: updateWorkflowStatus
      summary: Update workflow status
      description: Updates an existing workflow status (non-translation statuses only).
      tags:
        - Workflow Statuses
      parameters:
        - name: statusName
          in: path
          required: true
          description: The name of the workflow status to update.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWorkflowStatusParam"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowStatus"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    delete:
      operationId: deleteWorkflowStatus
      summary: Delete workflow status
      description: Deletes a workflow status by its name (non-translation statuses only).
      tags:
        - Workflow Statuses
      parameters:
        - name: statusName
          in: path
          required: true
          description: The name of the workflow status to delete.
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  # ──────────────────────────────────────────────
  # Workflow Transitions
  # ──────────────────────────────────────────────

  /workflow/transitions:
    get:
      operationId: getWorkflowTransitions
      summary: Get all workflow transitions
      description: Returns a list of all workflow transitions.
      tags:
        - Workflow Transitions
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/WorkflowTransition"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
    post:
      operationId: createWorkflowTransition
      summary: Create workflow transition
      description: Creates a new workflow transition between two statuses (non-translation statuses only).
      tags:
        - Workflow Transitions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorkflowTransitionParam"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowTransition"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

  /workflow/transitions/{transitionId}:
    delete:
      operationId: deleteWorkflowTransition
      summary: Delete workflow transition
      description: Deletes a workflow transition by its ID (non-translation status transitions only).
      tags:
        - Workflow Transitions
      parameters:
        - name: transitionId
          in: path
          required: true
          description: The ID of the workflow transition to delete.
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"

components:
  schemas:
    ApiError:
      type: object
      properties:
        Message:
          type: string
          description: Exception message with details.
        ExceptionType:
          type: string
          description: The type of exception.
        ExceptionDetail:
          type: ["string", "null"]
          description: Reserved for future use.
        StackTrace:
          type: ["string", "null"]
          description: Reserved for future use.
        AdditionalData:
          type: ["string", "object", "null"]
          description: Any additional data related to the exception.
    TaskStatus:
      type: object
      properties:
        isSucceeded:
          type: boolean
          description: Whether the task has been completed successfully or not. If the task is not yet completed, returns null.
        isWorking:
          type: boolean
          description: Whether or not the task is still in progress.
        maxOverallProgress:
          type: string
          description: The maximum value of task progress value.
        overallProgress:
          type: string
          description: The current task progress. Together with the maxOverallProgress, can be used to calculate the percentage of task completion.
        statusText:
          type: string
          description: The name of the current task status.
        taskName:
          type: string
          description: The task name.
      example:
        isSucceeded: true
        isWorking: false
        maxOverallProgress: 100
        overallProgress: 100
        statusText: Export finished.
        taskName: Exporting Publication
    ProjectInfo:
      type: object
      properties:
        createdOn:
          type: string
          description: An ISO 8601 timestamp of the project/publication creation date. GMT timezone.
        fullUrl:
          type: string
          description: The full URL of the project or publication.
        id:
          type: string
          description: The unique identifier of the project or publication.
        parentId:
          type: string
          description: The unique identifier of the parent entity. Returns null for projects. For publications, returns the ID of the associated project.
        title:
          type: string
          description: The title of the project or publication.
        visibility:
          type: string
          description: The visibility of the project/publication. Always returns Private for projects.
        lang:
          type: string
          description: The four-letter language code of the project or publication (e.g., 'en-US', 'de-DE').
        baseLangProjectId:
          type: ["string", "null"]
          description: The ID of the base language project. Returns null for base projects. For translation projects or publications, returns the ID of the associated project/publication in the original language.
      example:
        createdOn: 2024-05-17T20:21:51
        fullUrl: https://docs.hedronlabs.org/articles/my-manual-publication
        id: my-manual-publication
        parentId: project-my-manual
        title: My Manual Publication
        visibility: Private
        lang: en-US
        baseLangProjectId: null
    ProjectsInfo:
      type: array
      items:
        $ref: "#/components/schemas/ProjectInfo"
      example:
        - createdOn: 2024-05-17T20:21:51
          fullUrl: https://docs.hedronlabs.org/articles/my-manual-publication
          id: my-manual-publication
          parentId: project-my-manual
          title: My Manual Publication
          visibility: Private
          lang: en-US
          baseLangProjectId: null
        - createdOn: 2025-01-31T09:24:15
          fullUrl: https://docs.hedronlabs.org/articles/pro
          id: pro
          parentId: project-my-manual
          title: Pro
          visibility: Restricted
          lang: de-DE
          baseLangProjectId: my-manual-publication
    Topic:
      type: object
      properties:
        assigneeUserName:
          type: string
          description: Topic assignee's login.
        body:
          type: string
          description: "The content of the `<body>` tag of the topic. Returns null for all methods except Get Topic."
        createdOn:
          type: string
          format: date-time
          description: An ISO 8601 timestamp of the topic creation date. GMT timezone.
        compiledContent:
          type: string
          description: The content of the topic in the format specified by the `format` parameter. Returns null for all methods except Get Topic and Get All Topics from Project.
        compiledContentType:
          type: string
          description: The format of the `compiledContent` field. Either `html` or `md`.
          enum:
            - html
            - md
        ftsSnippet:
          type: string
          description: A topic content snippet with full-text search query matches highlighted. Populated only when `isReturnSnippets` is true.
        ftsTitle:
          type: string
          description: The topic title with full-text search query matches highlighted. Populated only when `isReturnSnippets` is true.
        fullUrl:
          type: string
          description: Full topic URL.
        id:
          type: string
          description: The ID of the topic.
        indexKeywords:
          type: array
          items:
            type: string
          description: An array of strings containing index keywords associated with the topic. Hierarchical keywords are represented as comma-separated values.
        modifiedOn:
          type: string
          format: date-time
          description: An ISO 8601 timestamp of the topic modification date. GMT timezone.
        ownerUserName:
          type: string
          description: Topic owner's login.
        projectId:
          type: string
          description: The unique identifier of the project or publication.
        projectTitle:
          type: string
          description: The title of the project or publication the topic belongs to.
        statusName:
          type: string
          description: Topic's workflow status.
        title:
          type: string
          description: The topic title.
        tocNodeId:
          type: string
          description: The ID of the TOC node associated with the topic.
        isAutoTopic:
          type: boolean
          description: True if the topic is an auto-topic.
    User:
      type: object
      properties:
        userInfo:
          type: object
          description: An object containing basic profile information.
          properties:
            about:
              type: string
              description: Information the user specified in the About box.
            avatarImageUrl:
              type: string
              description: URL of the image used as an avatar.
            cultureInfoId:
              type: string
              description: A four-letter language code of the user's culture.
            email:
              type: string
              description: Email of the user.
            firstName:
              type: string
              description: First name of the user.
            isAutoDetectCultureInfo:
              type: boolean
              description: Whether the culture is automatically detected. false if the culture is explicitly set by the user.
            isAutoDetectTimeZone:
              type: boolean
              description: Whether the time zone is set to be automatically detected.
            lastActivityDate:
              type: string
              format: date-time
              description: An ISO 8601 timestamp of the user's last activity date. GMT timezone.
            lastName:
              type: string
              description: Last name of the user.
            middleName:
              type: string
              description: The middle name of the user.
            timeZoneId:
              type: string
              description: An ID of the time zone the user specified.
        userName:
          type: string
          description: The login of the user.
        userType:
          type: string
          description: "The user type of the user – Power Reader or Contributor."
        userRole:
          type: string
          description: Comma-separated list of Reviewer or Power Reader Access Groups this user belongs to.
        isEnabled:
          type: boolean
          description: Whether the account is enabled or not.
    StorageItem:
      type: object
      properties:
        fileName:
          type: string
          description: File name and extension.
          example: "info.png"
        fileFullName:
          type: string
          description: Full file name, including the base Storage/ folder.
          example: "Storage\\project-deep-space-exploration\\info.png"
        content:
          type: string
          nullable: true
          description: Base64-encoded file content.
        modifiedBy:
          type: string
          description: Login of the user the file was last modified by.
          example: "katherine"
        modifiedOn:
          type: string
          format: date-time
          description: An ISO 8601 timestamp of the file modification date (GMT).
          example: "2021-04-07T15:50:15"
        size:
          type: integer
          description: File size in bytes.
          example: 123
        isFolder:
          type: boolean
          description: Whether the entity is a file or a folder.
          example: false
    DeleteFilesRequest:
      type: object
      required: [fileFullNames]
      properties:
        fileFullNames:
          type: array
          description: An array consisting of file path strings. Each should start with Storage/.
          items:
            type: string
          example:
            - "Storage/project-deep-space-exploration/test-folder/API methods.cs"
            - "Storage/project-deep-space-exploration/test-folder/API notes.md"

    WorkflowStatus:
      type: object
      properties:
        name:
          type: string
          description: The name of the workflow status.
        color:
          type: ["integer", "null"]
          description: The color of the workflow status as an integer value.
        type:
          type: ["string", "null"]
          description: The type of the workflow status.
          enum: [Draft, Review, Ready, Translation, null]
        isTranslationStatus:
          type: boolean
          description: Indicates whether this is a translation workflow status.
        description:
          type: ["string", "null"]
          description: The description of the workflow status.

    CreateWorkflowStatusParam:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: The name of the workflow status.
        color:
          type: ["integer", "null"]
          description: The color of the workflow status as an integer value.
        type:
          type: string
          description: The type of the workflow status.
          enum: [Draft, Review, Ready]
        description:
          type: ["string", "null"]
          description: The description of the workflow status.

    UpdateWorkflowStatusParam:
      type: object
      properties:
        name:
          type: string
          description: The new name of the workflow status.
        color:
          type: ["integer", "null"]
          description: The color of the workflow status as an integer value.
        type:
          type: string
          description: The type of the workflow status.
          enum: [Draft, Review, Ready, Translation]
        description:
          type: ["string", "null"]
          description: The description of the workflow status.

    WorkflowTransition:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the workflow transition.
        sourceStatusName:
          type: string
          description: The name of the source workflow status.
        destinationStatusName:
          type: string
          description: The name of the destination workflow status.

    CreateWorkflowTransitionParam:
      type: object
      required:
        - sourceStatusName
        - destinationStatusName
      properties:
        sourceStatusName:
          type: string
          description: The name of the source workflow status.
        destinationStatusName:
          type: string
          description: The name of the destination workflow status.

    ImportProjectBody:
      type: object
      properties:
        importFormat:
          type: string
          description: Import format.
          enum:
            [
              Word,
              Rtf,
              Epub,
              Odt,
              Html,
              Markdown,
              ProjectBackup,
              Docfx,
              AutoDocs,
            ]
        inputFileContent:
          type: string
          description: Base64-encoded content of the file to import. Required if base64 is selected for the format query parameter. If url format is selected, this parameter is ignored.
        inputFileName:
          type: string
          description: The name of the file with an extension. Required if base64 is selected for the format query parameter. If url format is selected, this parameter is ignored.
        inputFileUrl:
          type: string
          description: The URL of the file. It can be a public URL (no authentication required) or a path to a file in ClickHelp Storage. Required if url is selected for the format query parameter. If base64 format is selected, this parameter is ignored.
        newProjectId:
          type: string
          description: The ID of a new project where to import a definition. Either newProjectId or newProjectName should be specified.
        newProjectName:
          type: string
          description: The name of a new project where to import a definition. Either newProjectId or newProjectName should be specified.
        newProjectLanguageFourLetterCode:
          type: string
          description: An ISO 639 four-letter language code of a new project where to import a definition. If not specified, the en-US code is used.
        options:
          type: object
          description: Additional import parameters.
          properties:
            __type:
              type: string
              description: The type of the import options.
              enum:
                [
                  AutoDocs,
                  Word,
                  Rtf,
                  Epub,
                  Odt,
                  Html,
                  Markdown,
                  ProjectBackup,
                  Docfx,
                ]
            isDownloadExternalLinkedFiles:
              type: boolean
              description: Whether or not to download files linked from your content. Set to False by default. Available for these formats - Word, Rtf, Epub, Odt, Html, Markdown, ProjectBackup, Docfx.
            isDownloadExternalLinkedImages:
              type: boolean
              description: Whether or not to download images linked from your content. Set to True by default. Available for these formats - Word, Rtf, Epub, Odt, Html, Markdown, ProjectBackup, Docfx.
            tocGenerationType:
              type: string
              description: Defines how the imported document will be split into topics. Acceptable values for Word, Rtf, Epub, Odt formats - UseStyleOutline, UseParagraphOutline, UseTcFields, ImportAsSingleTopic. Set to UseStyleOutline by default. Acceptable values for Html and Markdown formats - UseParagraphOutline and ImportAsSingleTopic. Set to ImportAsSingleTopic by default.
            maxTocOutlineLevel:
              type: string
              description: The maximum TOC depth for the imported file. Set to 2 by default. Available for these formats - Word, Rtf, Epub, Odt.
            stylesProcessingType:
              type: string
              description: Configuration of how ClickHelp should handle the styles. Acceptable values - KeepPreciseStyles, OptimizeStyles, DoNotImportStyles. Set to OptimizeStyles by default. Available for these formats - Word, Rtf, Epub, Odt, Html, Markdown.
            imageFormat:
              type: string
              description: The desired format for image files - Png or Jpeg. Set to Png by default. Available for these formats - Word, Rtf, Epub, Odt.
            splitModeType:
              type: string
              description: Import mode for the AutoDocs format - GroupMethods, SeparateTopics or SingleTopic.
            updatedMountPointTocNodeId:
              type: string
              description: The ID of a TOC mount point node that should be updated. This ID corresponds to tocNodeId that can be gotten using the Get Topic method. If specified, all the topics of this mount point are updated. Available for AutoDocs format.

  requestBodies:
    DeleteProject:
      description: Delete a project/publication options
      required: false
      content:
        application/json:
          schema:
            type: object
            properties:
              isDeleteFiles:
                type: boolean
                default: false
              isDeleteStyles:
                type: boolean
                default: false
              isDeleteScripts:
                type: boolean
                default: false
  responses:
    SuccessfulTask:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              taskKey:
                type: string
                example: f8de60eb4ad8757c5a2b533afae6251aa
    ProjectDetails:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ProjectsInfo"
    ProjectInfoResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ProjectInfo"
    TaskStatusResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/TaskStatus"
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiError"
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiError"
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiError"
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiError"

  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Login + API key (not password). Get API key in profile.

security:
  - basicAuth: []
