# General Translation Platform: 提交翻译差异 URL: https://generaltranslation.com/zh/docs/platform/openapi/reference/files/submit-diffs.mdx --- title: "提交翻译差异" description: "用用户提供的本地化内容覆盖现有翻译。提交翻译差异的 API 参考。" method: POST full: true _openapi: method: POST route: /v2/project/files/diffs toc: [] structuredData: headings: [] contents: - content: 用用户提供的本地化内容覆盖现有翻译。 --- ## `POST https://api.gtx.dev/v2/project/files/diffs` Overwrite translations with user-provided localized content. Authentication: send an API key as a bearer token in the `Authorization: Bearer ` header. ### Parameters - `gt-api-version` (header, "2025-01-01.v0" | "2025-11-03.v1" | "2026-02-18.v1" | "2026-03-06.v1", optional): API version. Defaults to the earliest supported version. Latest is `2026-03-06.v1`. - `gt-project-id` (header, string, optional): Target project ID. Required when authenticating with an organization API key. ### Request body Body (`application/json`, object): - `projectId` (string): Ignored. The project ID comes from the authenticated API key. - `diffs` (object[], required) - `locale` (string, required) - `diff` (string, required): Diff content. - `branchId` (string) - `versionId` (string, required) - `fileId` (string, required) - `localContent` (string, required): Localized file content that overwrites the stored translation. ### Responses **200**: Diffs processed. Response body (`application/json`, object): - `filesProcessed` (integer) - `entriesReceived` (integer) - `message` (string) **400**: The request was invalid. Response body (`application/json`, object): - `error` (string): Human-readable error message. **401**: Missing or invalid API key. Response body (`application/json`, object): - `error` (string): Human-readable error message. **403**: The API key lacks the required permission, or the action is not allowed on the current plan. Response body (`application/json`, object): - `error` (string): Human-readable error message. **429**: Rate limit or quota exceeded. Response body (`application/json`, object): - `error` (string): Human-readable error message. The complete OpenAPI 3.1 spec is available at https://generaltranslation.com/openapi.yaml.