---
title: "Add File"
method: POST
path: "/projects/{projectId}/files"
tags: ["Source Files"]
---

# Add File

`POST /projects/{projectId}/files`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/projects/{projectId}/files`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/projects/:projectId/files/post.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `project.source.file` (Read and Write).

## Path parameters

- `projectId` integer, required

## Request body

- EnterpriseFileCreateForm
  - `storageId` integer, required: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany)
  - `name` string, required: File name __Note:__ Can't contain `\ / : * ? " < > |` symbols. * * `ZIP` files are not allowed.
  - `branchId` integer: Branch Identifier — defines branch to which file will be added. Get via [List Branches](#operation/api.projects.branches.getMany) __Note:__ Can't be used with `directoryId` in same request
  - `directoryId` integer: Directory Identifier — defines directory to which file will be added. Get via [List Directories](#operation/api.projects.directories.getMany) __Note:__ Can't be used with `branchId` in same request
  - `title` string: Use to provide more details for translators. Title is available in UI only
  - `context` string: Use to provide context about whole file
  - `type` 'auto' | 'android' | 'macosx' | 'resx' | 'properties' | 'gettext' | 'yaml' | 'php' | 'json' | 'xml' | 'ini' | 'rc' | 'resw' | 'resjson' | 'qtts' | 'joomla' | 'chrome' | 'dtd' | 'dklang' | 'flex' | 'nsh' | 'wxl' | 'xliff' | 'xliff_two' | 'html' | 'haml' | 'txt' | 'csv' | 'md' | 'mdx_v1' | 'mdx_v2' | 'flsnp' | 'fm_html' | 'fm_md' | 'mediawiki' | 'docx' | 'vsdx' | 'xlsx' | 'sbv' | 'properties_play' | 'properties_xml' | 'maxthon' | 'go_json' | 'dita' | 'idml' | 'mif' | 'stringsdict' | 'plist' | 'vtt' | 'vdf' | 'srt' | 'stf' | 'toml' | 'contentful_rt' | 'svg' | 'js' | 'coffee' | 'ts' | 'i18next_json' | 'xaml' | 'arb' | 'adoc' | 'fbt' | 'webxml' | 'nestjs_i18n' | 'loc': Values available: - empty value or 'auto' — Try to detect file type by extension or MIME type - 'android' — Android (*.xml) - 'macosx' — Mac OS X / iOS (*.strings) - 'resx' — .NET, Windows Phone (*.resx) - 'properties' — Java (*.properties) - 'gettext' — GNU GetText (*.po, *.pot) - 'yaml' — Ruby On Rails (*.yaml, *.yml) - 'php' — Hypertext Preprocessor (*.php) - 'json' — Generic JSON (*.json) - 'xml' — Generic XML (*.xml) - 'ini' — Generic INI (*.ini) - 'rc' — Windows Resources (*.rc) - 'resw' — Windows 8 Metro (*.resw) - 'resjson' — Windows 8 Metro (*.resjson) - 'qtts' — Nokia Qt (*.ts) - 'joomla' — Joomla localizable resources (*.ini) - 'chrome' — Google Chrome Extension (*.json) - 'dtd' — Mozilla DTD (*.dtd) - 'dklang' — Delphi DKLang (*.dklang) - 'flex' — Flex (*.properties) - 'nsh' — NSIS Installer Resources (*.nsh) - 'wxl' — WiX Installer (*.wxl) - 'xliff' — XLIFF (*.xliff, *.xlf) - 'xliff_two' — XLIFF 2.0 (*.xliff, *.xlf) - 'html' — HTML (*.html, *.htm, *.xhtml, *.xhtm, *.xht, *.hbs, *.liquid) - 'haml' — Haml (*.haml) - 'txt' — Plain Text (*.txt) - 'csv' — Comma Separated Values (*.csv) - 'md' — Markdown (*.md, *.text, *.markdown...) - 'flsnp' — MadCap Flare (*.flnsp, .flpgpl .fltoc) - 'fm_html' — Jekyll HTML (*.html) - 'fm_md' — Jekyll Markdown (*.md) - 'mediawiki' — MediaWiki (*.wiki, *.wikitext, *.mediawiki) - 'docx' — Microsoft Office, OpenOffice.org Documents, Adobe InDesign, Adobe FrameMaker(*.docx, *.dotx, *.docm, *.dotm, *.xlsx, *.xltx, *.xlsm, *.xltm, *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm, *.odt, *.ods, *.odg, *.odp, *.imdl, *.mif) - 'vsdx' — Microsoft Visio (*.vsdx, *.vsdm) - 'xlsx' — Microsoft Excel (*.xlsx) - 'sbv' — Youtube .sbv (*.sbv) - 'properties_play' — Play Framework - 'properties_xml' — Java Application (*.xml) - 'maxthon' — Maxthon Browser (*.ini) - 'go_json' — Go (*.gotext.json) - 'dita' — DITA Document (*.dita, *.ditamap) - 'mif' — Adobe FrameMaker (*.mif) - 'idml' — Adobe InDesign (*.idml) - 'stringsdict' — iOS (*.stringsdict) - 'plist' — Mac OS property list (*.plist) - 'vtt' — Video Subtitling and WebVTT (*.vtt) - 'vdf' — Steamworks Localization Valve Data File (*.vdf) - 'srt' — SubRip .srt (*.srt) - 'stf' — Salesforce (*.stf) - 'toml' — Toml (*.toml) - 'contentful_rt' — Contentful (*.json) - 'svg' — SVG (*.svg) - 'js' — JavaScript (*.js) - 'coffee' — CoffeeScript (*.coffee) - 'nestjs_i18n' - NestJS i18n - 'loc' — LOC (*.loc) __Note__: Use `docx` type to import each cell as a separate source string for XLSX file
  - `parserVersion` integer: Using latest parser version by default. __Note:__ Must be used together with `type`
  - `importOptions` union
    - object
      - `firstLineContainsHeader` boolean: Defines whether the file includes a first-row header that should not be imported
      - `importHiddenSheets` boolean: Defines whether hidden sheets that should be imported
      - `importHiddenRows` boolean: Defines whether hidden rows that should be imported
      - `importEqSuggestions` boolean: Defines whether to import translations identical to sources
      - `autoApproveImported` boolean: Defines whether to auto-approve imported translations
      - `translateHidden` boolean: Defines whether to import translations for hidden strings
      - `addToTm` boolean: Defines whether to add imported translations to TM
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. __Important!__ This option disables the possibility to upload existing translations for Spreadsheet files when enabled.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
      - `importTranslations` boolean: Defines whether to import translations from the file
      - `scheme` SpreadsheetFileImportSchema: Defines data columns mapping. The column numbering starts at 0
        - `none` integer: Defines empty column
        - `identifier` integer: Defines identifier column number
        - `sourcePhrase` integer: Defines source phrase column number
        - `sourceOrTranslation` integer: Defines source or translation column number
        - `translation` integer: Defines translation column number
        - `context` integer: Defines context column number
        - `maxLength` integer: Defines max length column number
        - `translatable` integer: Defines visible status `yes` as show and `no` as hidden
        - `labels` integer: Defines labels column number
    - object
      - `translateContent` boolean: Defines whether to translate texts placed inside the tags
      - `translateAttributes` boolean: Defines whether to translate tags attributes
      - `inlineTags` string[]: Specify tags that should be considered inline
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. __Important!__ This option disables the possibility to upload existing translations for XML files when enabled.
      - `translatableElements` string[]: This is an array of strings, where each item is the XPaths to DOM element that should be imported. Supported XPath patterns: - `/path/to/node` — Absolute path to a specific node - `/path/to/attribute[@attr]` — Absolute path to an attribute - `//node` — All nodes with the specified name - `//[@attr]` — All elements with the specified attribute - `nodeone/nodetwo` — Relative path - `/nodeone//nodetwo` — Mixed absolute and descendant path - `//node[@attr]` — All nodes with the specified name and attribute
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `inlineTags` string[]: Specify tags that should be considered inline
      - `hideAttributeValues` boolean: HTML attributes (e.g., src, href, data) will be imported as hidden strings.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `cleanTagsAggressively` boolean: When checked, strips additional formatting tags related to text spacing. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm, *.xlsx, *.xltx, *.xlsm, *.xltm, *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm
      - `translateHiddenText` boolean: When checked, exposes hidden text for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `translateHyperlinkUrls` boolean: When checked, exposes hidden hyperlinks for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm, *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm
      - `translateHiddenRowsAndColumns` boolean: When checked, exposes hidden rows and columns for translation. __Note:__ Works only for files with the following extensions: *.xlsx, *.xltx, *.xlsm, *.xltm
      - `importNotes` boolean: When checked, expose slide notes for translation. __Note:__ Works only for files with the following extensions: *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm
      - `importHiddenSlides` boolean: When checked, exposes hidden slides for translation. __Note:__ Works only for files with the following extensions: *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. __Important!__ This option disables the possibility to upload existing translations for XML files when enabled.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
      - `translateDocProperties` boolean: When checked, exposes document properties such as title, subject, and creator for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm, *.xlsx, *.xltx, *.xlsm, *.xltm
      - `translateComments` boolean: When checked, exposes comments for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm, *.xlsx, *.xltx, *.xlsm, *.xltm
      - `ignoreWhitespaceStyles` boolean: When checked, formatting that differs only in whitespace no longer produces separate tags. __Note:__ Can be set only when `cleanTagsAggressively` is enabled
      - `addTabAsCharacter` boolean: When checked, a tab inside a text run is exposed as a character instead of a tag.
      - `addLineSeparatorAsCharacter` boolean: When checked, a line break inside a text run is exposed as `lineSeparatorReplacement` instead of a tag.
      - `lineSeparatorReplacement` string: Character that replaces a line break when `addLineSeparatorAsCharacter` is enabled. __Note:__ Must be exactly one character
      - `replaceNoBreakHyphenTag` boolean: When checked, a non-breaking hyphen is exposed as a character instead of a tag.
      - `ignoreSoftHyphenTag` boolean: When checked, soft hyphens are removed instead of being exposed as tags.
      - `complexFieldDefinitionsToExtract` string[]: Word complex field types whose text is exposed for translation. __Note:__ `HYPERLINK` is always extracted and can't be removed
      - `translateWordHeadersFooters` boolean: When checked, exposes headers and footers for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `translateWordGraphicName` boolean: When checked, exposes the name of a shape or image for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm, *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm
      - `translateWordGraphicDescription` boolean: When checked, exposes the alternative text of a shape or image for translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm, *.pptx, *.potx, *.ppsx, *.pptm, *.potm, *.ppsm
      - `ignoreWordFontColors` boolean: When checked, excludes text whose font color falls between `wordFontColorsMinIgnoranceThreshold` and `wordFontColorsMaxIgnoranceThreshold` from translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `wordFontColorsMinIgnoranceThreshold` string: Darkest font color ignored when `ignoreWordFontColors` is enabled, as six hexadecimal digits with an optional leading hash. Empty means black. Must not be lighter than `wordFontColorsMaxIgnoranceThreshold` in any color channel. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `wordFontColorsMaxIgnoranceThreshold` string: Lightest font color ignored when `ignoreWordFontColors` is enabled, as six hexadecimal digits with an optional leading hash. Empty means white. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `excludeWordStyles` string[]: Paragraph style names singled out by `translateWordInExcludeStyleMode`, for example `Heading1`. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `translateWordInExcludeStyleMode` boolean: How `excludeWordStyles` is read. If `true`, the listed styles are excluded from translation; if `false`, only they are translated. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `wordHighlightColors` string[]: Word highlight colors singled out by `translateWordInExcludeHighlightMode`. One of: `black`, `blue`, `cyan`, `green`, `magenta`, `red`, `yellow`, `white`, `darkBlue`, `darkCyan`, `darkGreen`, `darkMagenta`, `darkRed`, `darkYellow`, `darkGray`, `lightGray`, `none`. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `translateWordInExcludeHighlightMode` boolean: How `wordHighlightColors` is read. If `true`, text with the listed highlights is excluded from translation; if `false`, only it is translated. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `translateWordExcludeColors` boolean: When checked, excludes text whose color is listed in `wordExcludedColors` from translation. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `wordExcludedColors` string[]: Text colors excluded from translation when `translateWordExcludeColors` is enabled, each six hexadecimal digits with an optional leading hash. __Note:__ Works only for files with the following extensions: *.docx, *.dotx, *.docm, *.dotm
      - `translateExcelCellsCopied` boolean: When checked, a cell whose text is shared with another cell is exposed once for translation. __Note:__ Works only for files with the following extensions: *.xlsx, *.xltx, *.xlsm, *.xltm
      - `translateExcelSheetNames` boolean: When checked, exposes worksheet names for translation. __Note:__ Works only for files with the following extensions: *.xlsx, *.xltx, *.xlsm, *.xltm
      - `excelExcludedColors` string[]: Cell fill colors whose cells are excluded from translation, each the six-digit RGB with an optional leading hash, not the eight-digit ARGB stored in the file. __Note:__ Works only for files with the following extensions: *.xlsx, *.xltx, *.xlsm, *.xltm
      - `translateExcelDiagramData` boolean: When checked, exposes text inside SmartArt and diagram data for translation. __Note:__ Works only for files with the following extensions: *.xlsx, *.xltx, *.xlsm, *.xltm
      - `translateExcelDrawings` boolean: When checked, exposes text inside drawings and shapes on a worksheet for translation. __Note:__ Works only for files with the following extensions: *.xlsx, *.xltx, *.xlsm, *.xltm
    - object
      - `cleanTagsAggressively` boolean: When checked, strips additional formatting tags related to text spacing.
      - `translateHyperlinkUrls` boolean: When checked, exposes hidden hyperlinks for translation.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `inlineHyperlinkText` boolean: When checked, a hyperlink's text is extracted as part of the surrounding sentence so it can be translated in context, instead of appearing as a separate non-editable tag. __Note:__ Works only for files imported with the `idml8` parser.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `excludedElements` string[]: Specify CSS selectors for elements that should not be imported
      - `inlineTags` string[]: Specify tags that should be considered inline
      - `hideAttributeValues` boolean: HTML attributes (e.g., src, href, data) will be imported as hidden strings.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `excludedElements` string[]: Specify CSS selectors for elements that should not be imported
      - `excludedFrontMatterElements` string[]: Specify elements that should not be imported
      - `inlineTags` string[]: Specify tags that should be considered inline
      - `hideAttributeValues` boolean: HTML attributes (e.g., src, href, data) will be imported as hidden strings.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `excludedFrontMatterElements` string[]: Specify elements that should not be imported
      - `excludeCodeBlocks` boolean: Defines whether to import code blocks.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `excludedFrontMatterElements` string[]: Specify elements that should not be imported
      - `excludeCodeBlocks` boolean: Defines whether to import code blocks.
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `excludedFrontMatterElements` string[]: Specify elements that should not be imported
      - `excludeCodeBlocks` boolean: Defines whether to import code blocks.
      - `inlineTags` string[]: Specify tags that should be considered inline
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
    - object
      - `importKeyAsSource` boolean: Determines whether to import the key as source string if it does not exist.
      - `importTranslations` boolean: Defines whether to import translations from the file
    - object
      - `excludeIncludeDirectives` boolean: Skip Include Directives
    - object
      - `convertIcu` boolean: Defines whether to convert placeholders to the ICU MessageFormat syntax.
      - `addGenderArgument` boolean: Defines whether to append _gender suffix to variable names when converting gender ICU to ICU MessageFormat. __Note:__ Can be enabled only when `convertIcu` is `true`.
    - object
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. Only for __xml__, __flsnp__, __docx__, __mif__, __idml__, __dita__, __android8__, __xliff13__, __xliff_two4__ files. __Note:__ When Content segmentation is enabled, the translation upload is handled by an experimental machine learning technology. To achieve the best results, we recommend uploading translation files with the same or as close as possible file structure as in source files.
      - `srxStorageId` integer: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany). Storage identifier of the SRX segmentation rules file. Read more about [Custom Segmentation](https://support.crowdin.com/custom-segmentation/#segmentation-examples).
  - `exportOptions` union
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
      - `escapeQuotes` 0 | 1 | 2 | 3: Values available: - 0 - Do not escape single quote - 1 - Escape single quote by another single quote - 2 - Escape single quote by a backslash - 3 - Escape single quote by another single quote only in strings containing variables (`{0}`)
      - `escapeSpecialCharacters` 0 | 1: Defines whether any special characters (=, :, ! and #) should be escaped by backslash in exported translations. You can add escape_special_characters per-file option. Acceptable values are: 0, 1. Default is 0. - 0 - Do not escape special characters - 1 - Escape special characters by a backslash
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
      - `exportQuotes` 'single' | 'double': Acceptable values are: 'single', 'double'. Default is 'single'. - 'single' - Output will be enclosed in single quotes - 'double' - Output will be enclosed in double quotes
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
      - `strongMarker` 'asterisk' | 'underscore': Marker to use for strong.
      - `emphasisMarker` 'asterisk' | 'underscore': Marker to use for emphasis.
      - `unorderedListBullet` 'asterisks' | 'plus' | 'dash': Marker to use for unordered list bullet.
      - `tableColumnWidth` 'consolidate' | 'evenly_distribute_cells': Table formatting.
      - `frontMatterQuotes` 'auto' | 'single' | 'double': Export front matter values in quotes.
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
      - `strongMarker` 'asterisk' | 'underscore': Marker to use for strong.
      - `emphasisMarker` 'asterisk' | 'underscore': Marker to use for emphasis.
      - `unorderedListBullet` 'asterisks' | 'plus' | 'dash': Marker to use for unordered list bullet.
      - `tableColumnWidth` 'consolidate' | 'evenly_distribute_cells': Table formatting.
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
      - `strongMarker` 'asterisk' | 'underscore': Marker to use for strong.
      - `emphasisMarker` 'asterisk' | 'underscore': Marker to use for emphasis.
      - `unorderedListBullet` 'asterisks' | 'plus' | 'dash': Marker to use for unordered list bullet.
      - `tableColumnWidth` 'consolidate' | 'evenly_distribute_cells': Table formatting.
    - object
      - `exportPattern` string: File export pattern. Defines file name and path in resulting translations bundle __Note:__ Can't contain `: * ? " < > |` symbols
      - `allowWordStyleOptimization` boolean: When checked, run properties in the exported document are minified against the style definitions instead of being kept verbatim.
      - `translateExcelExcludeColors` boolean: When checked, excludes colored text runs inside a spreadsheet cell from translation. __Note:__ Applied when the file is parsed, even though it is set through `exportOptions`
  - `excludedTargetLanguages` string[], nullable: Set Target Languages the file should not be translated into. Do not use this option if the file should be available for all project languages.
  - `attachLabelIds` integer[]: Attach labels to strings. Get via [List Labels](#operation/api.projects.labels.getMany)
  - `fields` EnterpriseAdditionalFields: Fields. Keys get via [List Fields](#operation/api.fields.getMany)

## Response `201`

File was successfully added

- EnterpriseFileResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` EnterpriseFile, required: Class FileInfoResponseModel
    - `id` integer
    - `projectId` integer
    - `branchId` integer, nullable
    - `directoryId` integer, nullable
    - `name` string
    - `title` string, nullable
    - `context` string, nullable
    - `type` string
    - `path` string
    - `status` string
    - `revisionId` integer
    - `priority` string
    - `importOptions` union
      - object
        - `importTranslations` boolean
        - `firstLineContainsHeader` boolean
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `scheme` object
          - `identifier` integer
          - `sourcePhrase` integer
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `inlineTags` string[]
        - `hideAttributeValues` boolean
      - object
        - `importTranslations` boolean
        - `firstLineContainsHeader` boolean
        - `importHiddenSheets` boolean
        - `importHiddenRows` boolean
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `scheme` object
          - `identifier` integer
          - `sourcePhrase` integer
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `excludedElements` string[]
        - `inlineTags` string[]
        - `hideAttributeValues` boolean
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `excludedElements` string[]
        - `inlineTags` string[]
        - `excludedFrontMatterElements` string[]
        - `hideAttributeValues` boolean
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `excludeCodeBlocks` boolean
        - `excludedFrontMatterElements` string[]
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `excludeCodeBlocks` boolean
        - `excludedFrontMatterElements` string[]
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `excludeCodeBlocks` boolean
        - `excludedFrontMatterElements` string[]
        - `inlineTags` string[]
      - object
        - `translateContent` boolean
        - `translateAttributes` boolean
        - `contentSegmentation` boolean
        - `translatableElements` string[]: This is an array of strings, where each item is the XPaths to DOM element that should be imported. Supported XPath patterns: - `/path/to/node` — Absolute path to a specific node - `/path/to/attribute[@attr]` — Absolute path to an attribute - `//node` — All nodes with the specified name - `//[@attr]` — All elements with the specified attribute - `nodeone/nodetwo` — Relative path - `/nodeone//nodetwo` — Mixed absolute and descendant path - `//node[@attr]` — All nodes with the specified name and attribute
        - `customSegmentation` boolean
        - `inlineTags` string[]
      - object
        - `cleanTagsAggressively` boolean: When checked, strips additional formatting tags related to text spacing.
        - `translateHiddenText` boolean: When checked, exposes hidden text for translation.
        - `translateHyperlinkUrls` boolean: When checked, exposes hidden hyperlinks for translation.
        - `translateHiddenRowsAndColumns` boolean: When checked, exposes hidden rows and columns for translation.
        - `importNotes` boolean: When checked, expose slide notes for translation.
        - `importHiddenSlides` boolean: When checked, exposes hidden slides for translation.
        - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. * * Important! This option disables the possibility to upload existing translations for XML files when enabled.
        - `customSegmentation` boolean: Specifies whether custom segmentation rules are used.
        - `translateDocProperties` boolean: When checked, exposes document properties such as title, subject, and creator for translation.
        - `translateComments` boolean: When checked, exposes comments for translation.
        - `ignoreWhitespaceStyles` boolean: When checked, formatting that differs only in whitespace no longer produces separate tags. __Note:__ Can be set only when `cleanTagsAggressively` is enabled
        - `addTabAsCharacter` boolean: When checked, a tab inside a text run is exposed as a character instead of a tag.
        - `addLineSeparatorAsCharacter` boolean: When checked, a line break inside a text run is exposed as `lineSeparatorReplacement` instead of a tag.
        - `lineSeparatorReplacement` string: Character that replaces a line break when `addLineSeparatorAsCharacter` is enabled. __Note:__ Must be exactly one character
        - `replaceNoBreakHyphenTag` boolean: When checked, a non-breaking hyphen is exposed as a character instead of a tag.
        - `ignoreSoftHyphenTag` boolean: When checked, soft hyphens are removed instead of being exposed as tags.
        - `complexFieldDefinitionsToExtract` string[]: Word complex field types whose text is exposed for translation. __Note:__ `HYPERLINK` is always extracted and can't be removed
        - `translateWordHeadersFooters` boolean: When checked, exposes headers and footers for translation.
        - `translateWordGraphicName` boolean: When checked, exposes the name of a shape or image for translation.
        - `translateWordGraphicDescription` boolean: When checked, exposes the alternative text of a shape or image for translation.
        - `ignoreWordFontColors` boolean: When checked, excludes text whose font color falls between `wordFontColorsMinIgnoranceThreshold` and `wordFontColorsMaxIgnoranceThreshold` from translation.
        - `wordFontColorsMinIgnoranceThreshold` string: Darkest font color ignored when `ignoreWordFontColors` is enabled, as six hexadecimal digits with an optional leading hash. Empty means black. Must not be lighter than `wordFontColorsMaxIgnoranceThreshold` in any color channel.
        - `wordFontColorsMaxIgnoranceThreshold` string: Lightest font color ignored when `ignoreWordFontColors` is enabled, as six hexadecimal digits with an optional leading hash. Empty means white.
        - `excludeWordStyles` string[]: Paragraph style names singled out by `translateWordInExcludeStyleMode`, for example `Heading1`.
        - `translateWordInExcludeStyleMode` boolean: How `excludeWordStyles` is read. If `true`, the listed styles are excluded from translation; if `false`, only they are translated.
        - `wordHighlightColors` string[]: Word highlight colors singled out by `translateWordInExcludeHighlightMode`. One of: `black`, `blue`, `cyan`, `green`, `magenta`, `red`, `yellow`, `white`, `darkBlue`, `darkCyan`, `darkGreen`, `darkMagenta`, `darkRed`, `darkYellow`, `darkGray`, `lightGray`, `none`.
        - `translateWordInExcludeHighlightMode` boolean: How `wordHighlightColors` is read. If `true`, text with the listed highlights is excluded from translation; if `false`, only it is translated.
        - `translateWordExcludeColors` boolean: When checked, excludes text whose color is listed in `wordExcludedColors` from translation.
        - `wordExcludedColors` string[]: Text colors excluded from translation when `translateWordExcludeColors` is enabled, each six hexadecimal digits with an optional leading hash.
        - `translateExcelCellsCopied` boolean: When checked, a cell whose text is shared with another cell is exposed once for translation.
        - `translateExcelSheetNames` boolean: When checked, exposes worksheet names for translation.
        - `excelExcludedColors` string[]: Cell fill colors whose cells are excluded from translation, each the six-digit RGB with an optional leading hash, not the eight-digit ARGB stored in the file.
        - `translateExcelDiagramData` boolean: When checked, exposes text inside SmartArt and diagram data for translation.
        - `translateExcelDrawings` boolean: When checked, exposes text inside drawings and shapes on a worksheet for translation.
      - object
        - `cleanTagsAggressively` boolean: When checked, strips additional formatting tags related to text spacing.
        - `translateHiddenText` boolean: When checked, exposes hidden text for translation.
        - `translateHyperlinkUrls` boolean: When checked, exposes hidden hyperlinks for translation.
        - `translateHiddenRowsAndColumns` boolean: When checked, exposes hidden rows and columns for translation.
        - `importNotes` boolean: When checked, expose slide notes for translation.
        - `importHiddenSlides` boolean: When checked, exposes hidden slides for translation.
        - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. * * Important! This option disables the possibility to upload existing translations for XML files when enabled.
        - `customSegmentation` boolean: Specifies whether custom segmentation rules are used.
      - object
        - `cleanTagsAggressively` boolean: When checked, strips additional formatting tags related to text spacing.
        - `translateHyperlinkUrls` boolean: When checked, exposes hidden hyperlinks for translation.
        - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
        - `customSegmentation` boolean: Specifies whether custom segmentation rules are used.
      - object
        - `inlineHyperlinkText` boolean: When checked, a hyperlink's text is extracted as part of the surrounding sentence so it can be translated in context, instead of appearing as a separate non-editable tag.
        - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments.
        - `customSegmentation` boolean: Specifies whether custom segmentation rules are used.
      - object
        - `convertIcu` boolean: Defines whether to convert placeholders to the ICU MessageFormat syntax.
        - `addGenderArgument` boolean: Defines whether to append _gender suffix to variable names when converting gender ICU to ICU MessageFormat. __Note:__ Can be enabled only when `convertIcu` is `true`.
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
      - object
        - `customSegmentation` boolean
      - object
        - `importKeyAsSource` boolean
        - `importTranslations` boolean
      - object
        - `contentSegmentation` boolean
        - `customSegmentation` boolean
        - `excludeIncludeDirectives` boolean
    - `exportOptions` union
      - object
        - `exportPattern` string, nullable
      - object
        - `exportPattern` string, nullable
        - `allowWordStyleOptimization` boolean: When checked, run properties in the exported document are minified against the style definitions instead of being kept verbatim.
        - `translateExcelExcludeColors` boolean: When checked, excludes colored text runs inside a spreadsheet cell from translation. __Note:__ Applied when the file is parsed, even though it is set through `exportOptions`
      - object
        - `escapeQuotes` integer, nullable
        - `escapeSpecialCharacters` integer, nullable
        - `exportPattern` string, nullable
      - object
        - `exportQuotes` string
        - `exportPattern` string, nullable
      - object
        - `exportPattern` string, nullable
        - `strongMarker` string
        - `emphasisMarker` string
        - `unorderedListBullet` string
        - `tableColumnWidth` string
        - `frontMatterQuotes` string
      - object
        - `exportPattern` string, nullable
        - `strongMarker` string
        - `emphasisMarker` string
        - `unorderedListBullet` string
        - `tableColumnWidth` string
      - object
        - `exportPattern` string, nullable
        - `strongMarker` string
        - `emphasisMarker` string
        - `unorderedListBullet` string
        - `tableColumnWidth` string
    - `excludedTargetLanguages` string[], nullable
    - `parserVersion` integer, nullable
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable
    - `fields` EnterpriseAdditionalFields: Fields. Keys get via [List Fields](#operation/api.fields.getMany)

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project, branch, directory, or storage with specified id was not found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Unprocessable Entity
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/revisions/dc68744c5384?raw)
