Update Files

Upload latest version of your localization file to Crowdin.


POST https://api.crowdin.com/api/project/{project-identifier}/update-file?key={project-key}


Name Value Description
filesrequired array Files array that should be updated.
Note! 20 files max are allowed to upload per one time file transfer.
titlesoptional array An arrays of strings that defines titles for uploaded files. Array keys should contain file names with path in Crowdin project.
export_patternsoptional array An arrays of strings that defines names of resulted files (translated files in resulted archive). Array keys should contain file names with path in Crowdin project.
new_namesoptional array An arrays of strings that defines new names for previously imported files. Array keys should contain file names with path in Crowdin project.
first_line_contains_headerCSV and XLS/XLSX files only
string Used when uploading CSV (or XLS/XLSX) files via API. Defines whether first line should be imported or it contains columns headers. May not contain value.
schemeCSV and XLS/XLSX files only
string Note: Used only when uploading CSV (or XLS/XLSX) file to define data columns mapping.
Acceptable value is the combination of the following constants:
  • "identifier" — Column contains string identifier.
  • "source_phrase" — Column contains only source string (in result string will contain same string).
  • "source_or_translation" — Column contains source string but when exporting same column should contain translation (also when uploading existing translations, the value from this column will be used as a translated string).
  • "translation" — Column contains translated string (when imported file already contains translations).
  • "context" — Column contains some comments on source string. Context information.
  • "max_length" — Column contains max. length of translation for this string.
  • "none" — Do not import column.
Example parameter you will have to add: &scheme=identifier,source_or_translation

Note: for exported file to contain translations to all the target languages, specify language codes in scheme (e.g. &scheme=identifier,source_phrase,uk,ru,fr).
update_optionoptional string Depending on the value, "update_option" is used to preserve translations and preserve/remove validations of changed strings during file update. The values are:
  • "update_as_unapproved" — Preserve translations of changed strings and remove validations of those translations if they exist.
  • "update_without_changes" — Preserve translations and validations of changed strings.
Note: If it is not set translations for changed strings will be lost after file update. Useful for typo fixes and minor changes in source strings.
branchoptional string The name of related version branch (Versions Management).
jsonoptional string May not contain value. Defines that response should be in JSON format.
jsonpoptional string Callback function name. Defines that response should be in JSONP format.
escape_quotesproperties files only
integer Defines whether single quote should be escaped by another single quote or backslash in exported translations. Acceptable values are: 0, 1, 2, 3. Default is 3.

0 — Do not escape single quote;
1 — Escape single quote by another single quote;
2 — Escape single quote by backslash;
3 — Escape single quote by another single quote only in strings containing variables ( {0} )
project-identifierrequired string Should contain the project identifier.
project-keyrequired string Project API key.


If successful, this method returns a XML structure, as it is shown below.
<?xml version="1.0" encoding="ISO-8859-1"?>

Unsuccessful response sample:
<?xml version="1.0" encoding="ISO-8859-1"?>
  API key is not valid


curl \
  -F "files[/directory/strings.xml]=@strings.xml" \

curl \
  -F "files[/directory/android.xml]=@strings.xml" \
  -F "new_names[/directory/android.xml]=strings.xml" \

curl \
  -F "files[directory/multilingual.csv]=@example.csv" \
  -F "export_patterns[directory/multilingual.csv]=/translations/%original_file_name%" \
  -F "titles[directory/multilingual.csv]=Title in Crowdin Project" \
  -F "scheme=identifier,source_phrase,translation" \
  -F "first_line_contains_header=true" \