---
title: "Add Target File Version"
method: POST
path: "/tasks/{taskId}/target-files/{targetFileId}/versions"
tags: ["Target File"]
---

# Add Target File Version

`POST /tasks/{taskId}/target-files/{targetFileId}/versions`

Adds a new  version of the target file. Only the `native` and `bcm` file formats are accepted. For the `sdlxliff` files, you should use the [Import Target File endpoint](#/operations/ImportTargetFileVersion). More information about file formats can be found on the [File formats](../docs/File-formats.html) page. Additional details on BCM files can be found [here](../../BCM/BCM.NET_client_API.html).

The version is added on the task represented by `taskId`. To be able to execute the add operation the task should be assigned and accepted by user. If the task is automatic, it is possible to add a target file version only if the status is `inProgress`.

The added file versions need to respect the output file type declared by the task type of the enclosing task. On the [Rules for sequencing tasks correctly](https://docs.rws.com/791595/885137/trados-enterprise/rules-for-sequencing-tasks-correctly) page from the official RWS Documentation Center, you can find out what output file type is supported by each task.

For adding a target file version using an extension task, the configuration of the task type must declare the `scope`'s value as "file".

The multipart parameters in the body should respect and strictly follow the order specified in our documentation.

Consider the [file and project size limit](https://docs.rws.com/791595/815967/trados-enterprise---accelerate/file-and-project-size-limit) when uploading files.

## Query parameters

- `fields` string

## Headers

- `Authorization` string, required
- `X-LC-Tenant` string, required

## Response `201`

Created

- TargetFileVersionResponse
  - `id` string, required — The target file version identifier.
  - `type` 'native' | 'bcm' — <div style="display:inline; float:right; color:#008080; margin-top:-23px; font-size:11px">default</div><div style="display: inline;">The version type.</div>

## Other responses

- `400` — Error codes: * "invalid": invalid input in the query parameter mentioned in the “name” field on the error response. * "invalid": the provided document is not a valid BCM file. * "invalid": invalid file format * "multiPartOrder": the multipart order in the body is not correct. The `properties` must be first and then, file.
- `401` — The user could not be identified.
- `403` — Error codes: * "forbidden": the authenticated user is not allowed to add a version for the target file.
- `404` — Error codes: * "notFound": \ \- the specified task or the target file was not found.\ \- the request is performed in a task that doesn't have the input file type as target file and is used a source file identifier.
- `409` — Error codes: * "noOwner": the task has no owner. * "differentOwner": the authenticated user is not the owner of the task. * "differentServiceUserOwner": the authenticated service user is not the owner of the task. * "taskCompleted": adding target file version is not allowed when the task is completed. * "duplicate": a file with the same name already exists.

---

[API](https://skmtc.net/rws/apis/trados-cloud-platform-api.md) · [All operations](https://skmtc.net/rws/apis/trados-cloud-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rws/trados-cloud-platform-api/revisions/d42dac7c28a3/schema)
