---
title: "Request File Analysis"
method: POST
path: "/files/analysis"
tags: ["File"]
---

# Request File Analysis

`POST /files/analysis`

This endpoint allows you to request the word count and an estimated cost for your files. 

Use the [Upload Zip File](#/operations/UploadZipFile) / [Poll Upload Zip File](#/operations/PollUploadZipFile) endpoints to upload your files and get the `fileIds`. Send these `fileIds` together with the `languageProcessingRuleId` and `sourceLanguage` to receive the word count.

Optionally, send the `quotingOptions` object to receive the `estimatedCosts`.

Use the [Poll File Analysis](#/operations/PollFileAnalysis) endpoint to monitor the operation and receive the analysis results.

> File analysis results will be available for 24 hours after generation.

## Headers

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

## Request body

- object
  - `fileIds` string[], required — The file identifiers for which the analysis will be performed.
  - `sourceLanguage` SourceLanguageRequest, required
    - `languageCode` string, required — The language code.
  - `languageProcessingRuleId` string, required — The identifier of the Language Processing Rule to be used when determining word count.
  - `fileProcessingConfigurationId` string — The identifier of the File Processing Configuration to be used when converting a file for analysis.<br> A default configuration will be used if not specified.
  - `quotingOptions` object — Set these resources to calculate an estimated translation cost.
    - `pricingModelId` string, required — The identifier of the Pricing Model to be used when calculating the cost.
    - `targetLanguages` TargetLanguageRequest[], required — The target languages for which the cost will be calculated.
      - `languageCode` string, required — The language code.

## Response `202`

- FileAnalysisOperationResponse
  - `id` string, required — The analysis operation id. Use this to poll it's status.

## Other responses

- `400` — Error codes: * “invalid”: Invalid input in the request body parameter mentioned in the “name” field on the error response.
- `401` — The user could not be identified.
- `403` — Error codes: * "forbidden": the authenticated user is not allowed to read resource.
- `404` — Error codes: * "notFound": the resource could not be found.

---

[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)
