# General Translation Platform: Consultar contenido de archivos
URL: https://generaltranslation.com/es/docs/platform/openapi/reference/files/query-files-content.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Descarga hasta 100 archivos de origen y traducciones en base64. Requiere project:files:read.

{/* Este archivo se ha generado con Fumadocs. No lo edites directamente. Para realizar cualquier cambio, vuelve a ejecutar el comando de generación. */}

## Endpoint

`POST https://api.gtx.dev/v2/projects/{projectId}/files/content/query`

**Operation ID:** `queryFilesContent`

**Tags:** `Files`

**Summary:** Query file content

Download up to 100 source files and translations as base64. Requires `project:files:read`.

Authentication: required. Send an API key in the `Authorization: Bearer <key>` header when authenticating.

### Parameters

- `projectId` (path, string, required)
- `gt-api-version` (header, "2026-10-08.v1", required): API contract version. Must be `2026-10-08.v1` or later; requests without it or with an older version return 400.

### Request body (required)

Body (`application/json`, object):
- `files` (object[], required): Files to download, at most 100. Each selector is a source file, or with `locale` one translation; a selector repeated field for field is rejected.
  - `fileId` (string, required)
  - `branchId` (string): Branch ID. Defaults to the project default branch.
  - `versionId` (string): Source version ID. Defaults to the branch head.
  - `locale` (string): Translation locale. Omit to download the source file.

### Responses

**200**: One result per selector, in selector order. The request is a read: it creates and changes nothing and is safe to retry, and uses POST only to carry the selectors in the body. A translation is not found while its translation job has not stored the translation yet, so wait for the job with `GET /v2/projects/{projectId}/jobs/{jobId}` or `POST /v2/projects/{projectId}/jobs/query` before reading it. Without `versionId`, a translation is the newest completed version on the branch, and `pending` only while none is completed; to wait for a specific version, pass its `versionId`.
Response body (`application/json`, object):
- `results` (object[], required): One result per selector, in selector order.
  - `status` ("ready" | "pending" | "not_found", required): `ready` with the content; `pending` when the translation is stored but not completed yet, for example during a layout pass (request it again later); `not_found` when there is neither, including while its translation job has not stored the translation yet.
  - `branchId` (string): Branch ID. Absent only when `status` is `not_found` and no branch resolves: the selector names no branch and the project has no default branch.
  - `fileId` (string, required)
  - `versionId` (string): Present when `status` is `ready` or `pending`.
  - `locale` (string): The selector's locale, as requested; present only for translations.
  - `fileName` (string): Present when `status` is `ready`. For a translation, its source file's name.
  - `data` (string | null): Base64 file content when `status` is `ready`; `null` when `pending`; absent when `not_found`.
  - `metadata` (object): Present when `status` is `ready`.
    - `<key>` (string | number | boolean | null | string | number | boolean | null | object[] | object | null[] | object, dynamic key)
  - `fileFormat` ("GTJSON" | "MDX" | "JSON" | "YAML" | "MD" | "TS" | "JS" | "HTML" | "TXT" | "PO" | "POT" | "TWILIO_CONTENT_JSON" | "LOTTIE" | "SVG" | "XCSTRINGS" | "DOT_STRINGS" | "DOT_STRINGSDICT" | "ANDROID_STRINGS" | "SRT" | "RESX" & object)

**400**: The request is malformed or failed validation, including a selector repeated field for field or more than 100 selectors. No file is read.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**401**: Authentication is missing or invalid.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**403**: The caller is authenticated but not allowed to perform this operation or access the requested resource.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**413**: The request, or the data it would return, exceeds a size or item limit.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**415**: The request body's Content-Type is missing or not supported. Send the body as application/json.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**429**: Too many requests. The rate limit was exceeded.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**500**: An unexpected server error occurred.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

Complete OpenAPI 3.1 specification: https://generaltranslation.com/openapi.yaml

OpenAPI schema: [openapi.json](https://generaltranslation.com/openapi.json)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
