Skip to main content
POST
/
projects
/
{project_id}
/
upload_batches
cURL
curl "https://api.phrase.com/v2/projects/:project_id/upload_batches" \
-X POST \
-H "Content-Type: application/json" \
-d '{
  "branch": "my-feature-branch",
  "delete_unmentioned_keys": true,
  "upload_ids": [
    "abcd1234cdef1234abcd1234cdef1234",
    "bcde2345defg2345bcde2345defg2345"
  ]
}' \
-u <token>:
{
  "state": "started",
  "delete_unmentioned_keys": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "project": {
    "id": "abcd1234cdef1234abcd1234cdef1234",
    "name": "My Android Project",
    "main_format": "xml",
    "created_at": "2015-01-28T09:52:53Z",
    "updated_at": "2015-01-28T09:52:53Z"
  },
  "user": {
    "id": "abcd1234cdef1234abcd1234cdef1234",
    "username": "johndoe",
    "name": "John Doe",
    "gravatar_uid": "205e460b479e2e5b48aec07710c08d50"
  },
  "uploads": [
    {
      "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

application/json
upload_ids
string[]
required

Array of upload IDs to include in the batch

Example:
[
"abcd1234cdef1234abcd1234cdef1234",
"bcde2345defg2345bcde2345defg2345"
]
branch
string

specify the branch to use

Example:

"my-feature-branch"

delete_unmentioned_keys
boolean

If set to true, after all uploads in the batch are completed, translation keys that were not mentioned in any of the uploaded files will be deleted.

Example:

true

Response

Created

state
enum<string>

Processing state of the upload batch

Available options:
started,
done
delete_unmentioned_keys
boolean

Indicates whether unmentioned keys will be deleted after processing all uploads in the batch

created_at
string<date-time>
updated_at
string<date-time>
project
project_short · object
Example:
{
"id": "abcd1234cdef1234abcd1234cdef1234",
"name": "My Android Project",
"main_format": "xml",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z"
}
user
user_preview · object
Example:
{
"id": "abcd1234cdef1234abcd1234cdef1234",
"username": "johndoe",
"name": "John Doe",
"gravatar_uid": "205e460b479e2e5b48aec07710c08d50"
}
uploads
upload · object[]