Create or import a new project

Create or import a new project

Creates a new project or imports content into a new project.

  • action=create: Creates a new empty project, from a template, or by copying an existing project. Request body fields: projectName (required), projectId, sourceType, sourceProjectId, languageFourLetterCode.
  • action=import: Creates a new project by importing content from multiple supported formats. Requires the format query parameter. Required request body fields: importFormat, newProjectName or newProjectId, options, inputFileUrl (when format=url), inputFileName (when format=base64), inputFileContent (when format=base64).
Query Parameters
  • action
    string enum
    required

    Action to perform: create or import.

    • create
    • import
  • format
    string enum

    Specifies how the import data is provided. Required when action=import. Can be url or base64.

    • url
    • base64
Body
application/json

A combined request body containing all possible parameters for project and publication actions. Fields are used depending on the specific operation (e.g., 'projectName' for creating, 'outputFileName' for backups).

projectName
string

The name of the new project. Required when action=create.

projectId
string

The ID (URL slug) of the new project. If not specified, it will be generated from the project name. Used when action=create.

sourceType
string enum

The source type for creating the project: Empty (default), Template, or Copy. Used when action=create.

  • Empty
  • Template
  • Copy
sourceProjectId
string

The ID of an existing project to use as a source. Required when sourceType is Template (use 'minimalist-template', 'api-documentation-template', 'coffee-break-template', 'colorize-template', 'mountain-peak-template' or 'stardust-template') or Copy (use your existing project ID). Used when action=create.

languageFourLetterCode
string

The four-letter language code for the new project (e.g., 'en-US'). If not specified, the portal's default language will be used. Used when action=create.

pubId
string

The ID of the publication to create.

pubName
string

The name of the publication to create.

isPublishOnlyReadyTopics
boolean

Whether to publish only topics in the Ready status.

outputTags
array string[]

An array of strings containing Output Tags to use.

pubVisibility
string enum

The target publication visibility. Specify Public, Restricted or Private.

  • Public
  • Restricted
  • Private
publishedTocNodeIds
array string[]

An array of strings containing IDs of the TOC nodes to publish. If not specified, the entire project is published.

updatedPubId
string

The ID of the publication to update.

updateMode
string enum

Defines which update mode to choose for the update. Specify FullReplace or Partial.

  • FullReplace
  • Partial
isReplacePubStyles
boolean

Specifies whether to update CSS style files.

isReplacePubScripts
boolean

Specifies whether to update JavaScript files.

format
string enum

One of the allowed case-sensitive export formats.

  • WebHelp
  • PureHtml
  • Markdown
  • Chm
  • Pdf
outputFileName
string

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.

ExampleStorage/export-files/deep-space-1.0-docs.zip
exportPresetName
string

For printed formats only. The full name of the Export Preset to be used.

ftpInfo
object

An object specifying FTP server connection settings. If the value is null, the output file will be written to your ClickHelp portal File Storage.

importFormat
string enum

Import format.

  • Word
  • Rtf
  • Epub
  • Odt
  • Html
  • Markdown
  • ProjectBackup
  • Docfx
  • AutoDocs
inputFileContent
string

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
string

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
string

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.

site
string

The domain of the site to assign a publication to.

Examplehedron-partners.clickhelp.com
options
object

Additional import parameters.

newProjectId
string

The ID of a new project where to import a definition. Either newProjectId or newProjectName should be specified.

newProjectName
string

The name of a new project where to import a definition. Either newProjectId or newProjectName should be specified.

newProjectLanguageFourLetterCode
string

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.

Responses
POST/projects

{
  "taskKey": "f8de60eb4ad8757c5a2b533afae6251aa"
}