# General Translation Platform: Publicar o dejar de publicar archivos
URL: https://generaltranslation.com/es/docs/platform/openapi/reference/files/publish-files.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Publica o deja de publicar en la CDN las traducciones de entre 1 y 100 versiones de archivos. Requiere project:files:write y que la entrega por CDN esté habilitada para el proyecto.

{/* Este archivo fue generado por Fumadocs. No edites este archivo directamente. Cualquier cambio debe realizarse volviendo a ejecutar el comando de generación. */}

## Endpoint

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

**Operation ID:** `publishFiles`

**Tags:** `Files`

**Summary:** Publish or unpublish files

Publish or unpublish the translations of 1–100 file versions on the CDN. Requires `project:files:write` and CDN delivery enabled for the project.

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): 1–100 file versions; each branch, file and version may appear once.
  - `fileId` (string, required)
  - `versionId` (string, required)
  - `branchId` (string)
  - `publish` (boolean, required)

### Responses

**200**: Publish result for each file version, in request order, with a result for each of its completed translations, even when every version fails; a version fails when it does not exist or any of its translations fails.
Response body (`application/json`, object):
- `summary` (object, required): Number of `results` in total and by `status`.
  - `total` (integer, required)
  - `succeeded` (integer, required)
  - `failed` (integer, required)
- `results` (object[], required): One result per file version, in request order.
  - `branchId` (string, required)
  - `fileId` (string, required)
  - `versionId` (string, required)
  - `status` ("succeeded" | "failed", required)
  - `error` (string): Why the item failed.
  - `code` ("invalid_request" | "unauthenticated" | "payment_required" | "permission_denied" | "not_found" | "conflict" | "route_retired" | "payload_too_large" | "unsupported_media_type" | "locked" | "not_ready" | "rate_limited" | "internal_error" | "upstream_error" | "unavailable" | "already_exists" | "api_key_invalid" | "api_version_too_old" | "api_version_unsupported" | "branch_not_found" | "cdn_not_enabled" | "content_empty" | "credits_insufficient" | "cursor_invalid" | "default_branch_conflict" | "drive_access_insufficient" | "drive_account_not_connected" | "file_too_large" | "google_account_not_linked" | "integration_not_connected" | "ip_not_allowed" | "layout_not_supported" | "locale_not_allowed" | "org_integration_required" | "permission_missing" | "permission_not_grantable" | "plan_feature_unavailable" | "project_limit_reached" | "response_too_large" | "source_file_not_found" | "spend_limit_reached" | "sync_required" | "target_inaccessible" | "target_locales_missing" | "translation_not_ready" | "upload_incomplete" | "usage_limit_reached" & object)
  - `translations` (object[], required): Result for each completed translation of the version.
    - `locale` (string, required)
    - `status` ("succeeded" | "failed", required)
    - `error` (string): Why the item failed.
    - `code` ("invalid_request" | "unauthenticated" | "payment_required" | "permission_denied" | "not_found" | "conflict" | "route_retired" | "payload_too_large" | "unsupported_media_type" | "locked" | "not_ready" | "rate_limited" | "internal_error" | "upstream_error" | "unavailable" | "already_exists" | "api_key_invalid" | "api_version_too_old" | "api_version_unsupported" | "branch_not_found" | "cdn_not_enabled" | "content_empty" | "credits_insufficient" | "cursor_invalid" | "default_branch_conflict" | "drive_access_insufficient" | "drive_account_not_connected" | "file_too_large" | "google_account_not_linked" | "integration_not_connected" | "ip_not_allowed" | "layout_not_supported" | "locale_not_allowed" | "org_integration_required" | "permission_missing" | "permission_not_grantable" | "plan_feature_unavailable" | "project_limit_reached" | "response_too_large" | "source_file_not_found" | "spend_limit_reached" | "sync_required" | "target_inaccessible" | "target_locales_missing" | "translation_not_ready" | "upload_incomplete" | "usage_limit_reached" & object)

**400**: The request is malformed or failed validation.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("invalid_request" | "api_version_unsupported" | "api_version_too_old" | "cdn_not_enabled", required)

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

**401**: Authentication is missing or invalid.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("unauthenticated" | "api_key_invalid", 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)
- `code` ("permission_denied" | "permission_missing" | "target_inaccessible" | "ip_not_allowed", required)

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

**404**: The requested resource was not found.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("not_found", 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)
- `code` ("payload_too_large", 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)
- `code` ("unsupported_media_type", required)

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

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

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

**500**: An unexpected server error occurred.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("internal_error", 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.
