Files
Upload translations
Changed onUpload translations of 1–100 existing source files. Requires project:files:write.
post/v2/projects/{projectId}/files/translations
Request
- Base URLhttps://api.gtx.dev
- AuthHTTP bearer
Path parameters
projectIdstring required
Headers
gt-api-version'2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1' | '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
Example request
{
"data": [
{
"source": {
"fileName": "locales/en/common.json",
"locale": "en",
"content": "eyJncmVldGluZyI6IkhlbGxvIn0="
},
"translations": [
{
"fileName": "locales/es/common.json",
"locale": "es",
"content": "eyJncmVldGluZyI6IkhvbGEifQ=="
}
]
}
]
}Response
Upload result for each translation, in request order, even when every translation fails to save: a failed translation has status: "failed" and an error while the others are saved. Retrying with the same content is safe; translations that were already saved are saved again, which can repeat completed webhooks and revisions.
Changes
- warning
added the new
MESSAGE_TREEenum value to the//response property for the response status
- warning
- warning
removed the request property
////
- warning