Skip to main content
POST
/
projects
/
{project_id}
/
uploads
cURL
curl "https://api.phrase.com/v2/projects/:project_id/uploads" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -F branch=my-feature-branch \
  -F file=@/path/to/my/file.json \
  -F file_format=json \
  -F locale_id=abcd1234cdef1234abcd1234cdef1234 \
  -F tags=awesome-feature,needs-proofreading \
  -F locale_mapping[en]=2 \
  -F format_options[foo]=bar
{
  "id": "abcd1234cdef1234abcd1234cdef1234",
  "filename": "example.json",
  "format": "json",
  "state": "success",
  "tag": "tag",
  "summary": {
    "locales_created": 2,
    "translation_keys_created": 162,
    "translation_keys_updated": 10,
    "translation_keys_unmentioned": 0,
    "translations_created": 291,
    "translations_updated": 3,
    "tags_created": 2,
    "translation_keys_ignored": 0
  },
  "created_at": "2015-01-28T09:52:53Z",
  "updated_at": "2015-01-28T09:52:53Z"
}

Authorizations

Authorization
string
header
required

Enter your token in the format token TOKEN

Headers

X-PhraseApp-OTP
string

Two-Factor-Authentication token (optional)

Path Parameters

project_id
string
required

Project ID

Body

multipart/form-data
file
file
required

File to be imported

Example:

"/path/to/my/file.json"

file_format
string
required

File format. Auto-detected when possible and not specified.

Example:

"json"

locale_id
string
required

Locale of the file's content. Can be the name or id of the locale. Preferred is id.

Example:

"abcd1234cdef1234abcd1234cdef1234"

branch
string

specify the branch to use

Example:

"my-feature-branch"

tags
string

List of tags separated by comma to be associated with the new keys contained in the upload.

Example:

"awesome-feature,needs-proofreading"

update_translations
boolean

Indicates whether existing translations should be updated with the file content.

Example:

true

update_custom_metadata
boolean
default:true

Determines whether to update custom metadata values when uploading a file. If set to true, existing metadata can be changed or removed. Passing an empty value deletes the corresponding metadata property.

Example:

true

update_translation_keys
boolean
default:true

Pass false here to prevent new keys from being created and existing keys updated.

Example:

true

update_translations_on_source_match
boolean
default:false

Update target translations only if the source translations of the uploaded multilingual file match the stored translations.

Example:

true

source_locale_id
string

Specifies the source locale for multilingual files. Can be the name or id of the locale. Preferred is id.

Example:

"abcd1234cdef1234abcd1234cdef1234"

update_descriptions
boolean

Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.

Example:

true

convert_emoji
boolean
deprecated

This option is obsolete. Providing the option will cause a bad request error.

Example:

true

skip_upload_tags
boolean

Indicates whether the upload should not create upload tags.

Example:

true

skip_unverification
boolean

Indicates whether the upload should unverify updated translations.

Example:

true

file_encoding
string

Enforces a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".

Example:

"UTF-8"

locale_mapping
object

Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.

Example:

"{\"en\": \"2\"}"

format_options
object

Additional options available for specific formats. See our format guide for the complete list.

Example:

"{\"foo\": \"bar\"}"

autotranslate
boolean

If set, translations for the uploaded language will be fetched automatically.

Example:

true

verify_mentioned_translations
boolean
default:false

Indicates whether all translations mentioned in the upload should be verified.

Example:

true

mark_reviewed
boolean

Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.

Example:

true

tag_only_affected_keys
boolean
default:false

Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is false

Example:

true

translation_key_prefix
string

This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.

Example:

"prefix_"

Response

Created

id
string
filename
string
format
string
state
string
tag
string

Unique tag of the upload

tags
string[]

List of tags that were assigned to the uploaded keys

url
string

The URL to the upload in Phrase Strings app.

summary
object
created_at
string<date-time>
updated_at
string<date-time>