---
title: "Upload Strings"
method: POST
path: "/projects/{projectId}/strings/uploads"
tags: ["Source Strings"]
---

# Upload Strings

`POST /projects/{projectId}/strings/uploads`

## Request

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

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

## Path parameters

- `projectId` integer, required

## Request body

- StringBasedStringUploadForm
  - `storageId` integer, required: Storage Identifier. Get via [List Storages](#operation/api.storages.getMany)
  - `branchId` integer, required: Branch Identifier — defines branch to which file will be added. Get via [List Branches](#operation/api.projects.branches.getMany)
  - `type` 'auto' | 'android' | 'macosx' | 'arb' | 'csv' | 'json' | 'xlsx' | 'xliff' | 'xliff_two' | 'resx' | 'gettext' | 'i18next_json' | 'properties' | 'properties_xml' | 'properties_play' | 'yaml' | 'string_catalog' | 'nestjs_i18n' | 'stringsdict': 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) * 'arb' — Application Resource Bundle (*.arb) * 'csv' — Comma Separated Values (*.csv) * 'json' — Generic JSON (*.json) * 'xliff' — XLIFF (*.xliff, *.xlf) * 'xliff_two' — XLIFF 2.0 (*.xliff, *.xlf) * 'xlsx' — Microsoft Excel (*.xlsx) * 'resx' — .NET, Windows Phone (*.resx) * 'gettext' — GNU GetText (*.po, *.pot) * 'i18next_json' — i18next (*.json) * 'properties' — Java (*.properties) * 'properties_xml' — Java Application (*.xml) * 'properties_play' — Play Framework * 'yaml' — Ruby On Rails (*.yaml, *.yml) * 'string_catalog' — String Catalog (*.xcstrings) * 'nestjs_i18n' — NestJS i18n (*.json) * 'stringsdict' — iOS (*.stringsdict)
  - `parserVersion` integer: Using latest parser version by default. __Note:__ Must be used together with `type`
  - `labelIds` integer[]: Attach labels to strings. Get via [List Labels](#operation/api.projects.labels.getMany)
  - `updateStrings` boolean: Update strings that have the same keys
  - `cleanupMode` boolean: If `true`, all strings with a system label that do not exist in the file will be deleted.
  - `importOptions` union
    - object
      - `scheme` StringBasedSpreadsheetFileUploadSchema: 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
        - `translatable` integer: Defines visible status `yes` as show and `no` as hidden
    - 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
      - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. Only for __android__, __arb__, __macosx__, __json__, __xlsx__, __csv__, __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).
  - `updateOption` 'clear_translations_and_approvals' | 'keep_translations' | 'keep_translations_and_approvals': Defines whether to keep existing translations and approvals for updated strings. __Note:__ Must be used together with `updateStrings = true`

## Response `202`

Upload strings was successfully started

- StringBasedStringUploadResource: 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` StringUploadResponseModel, required
    - `identifier` string
    - `status` string
    - `progress` integer: in percentages
    - `attributes` object
      - `branchId` integer
      - `storageId` integer
      - `fileType` string
      - `parserVersion` integer
      - `labelIds` integer[]
      - `updateStrings` boolean
      - `cleanupMode` boolean
      - `importOptions` union
        - object
          - `scheme` StringBasedSpreadsheetFileUploadSchema: 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
            - `translatable` integer: Defines visible status `yes` as show and `no` as hidden
        - 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
          - `contentSegmentation` boolean: Defines whether to split long texts into smaller text segments. Only for __android__, __arb__, __macosx__, __json__, __xlsx__, __csv__, __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).
      - `updateOption` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `startedAt` string, date-time
    - `finishedAt` string, date-time

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project, language, storage, or file with specified id was not found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

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