---
title: "Create upload batch"
method: POST
path: "/projects/{project_id}/upload_batches"
tags: ["Upload Batches"]
---

# Create upload batch

`POST /projects/{project_id}/upload_batches`

Groups multiple file uploads into a single batch. Optionally, launches the deletion of unmentioned translation keys
after all uploads in the batch are completed.

## Path parameters

- `project_id` string, required

## Headers

- `X-PhraseApp-OTP` string

## Request body

- object
  - `branch` string — specify the branch to use
  - `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.
  - `upload_ids` string[], required — Array of upload IDs to include in the batch

## Response `201`

Created

- object
  - `status` 'started' | 'done' — Processing state of the upload batch
  - `delete_unmentioned_keys` boolean — Indicates whether unmentioned keys will be deleted after processing all uploads in the batch
  - `uploads_count` integer — Number of uploads attached to this batch.
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `project` ProjectShort
    - `id` string
    - `name` string
    - `main_format` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `user` UserPreview
    - `id` string
    - `username` string
    - `name` string
    - `gravatar_uid` string
  - `uploads` Upload[]
    - `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.
    - `user` UserPreview
      - `id` string
      - `username` string
      - `name` string
      - `gravatar_uid` string
    - `summary` object
      - `locales_created` integer
      - `translation_keys_created` integer
      - `translation_keys_updated` integer
      - `translation_keys_unmentioned` integer — The number of translation keys in the project that were not mentioned in the upload. Note: this field is not calculated (and shows 0) if the upload contains more than 100,000 keys.
      - `translations_created` integer
      - `translations_updated` integer
      - `tags_created` integer
      - `translation_keys_ignored` integer
      - `processed_translations` integer
      - `upload_total_translations` integer
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry.
- `401` — Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry.
- `403` — Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions.
- `404` — Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry.
- `422` — Unprocessable entity. The request was well-formed but failed validation. The response body lists each offending field in the `errors` array, with its resource, field, and a human-readable message. Correct the listed fields and retry.
- `429` — Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying.

---

[API](https://skmtc.net/phrase/apis/control-hub-service.md) · [All operations](https://skmtc.net/phrase/apis/control-hub-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phrase/control-hub-service/revisions/98ecac7ba2bf/schema)
