Files

Upload source files

Changed on

Upload 1–100 source files to the project. Requires project:files:write.

post/v2/projects/{projectId}/files

Request

  • Base URL
    https://api.gtx.dev
  • Auth
    HTTP 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

sourceLocalestring

Default locale for files in this request; each file's own locale takes precedence. Defaults to the project's default locale, which the upload does not change.

Example request

{
  "data": [
    {
      "source": {
        "fileName": "locales/en/common.json",
        "locale": "en",
        "content": "eyJncmVldGluZyI6IkhlbGxvIn0="
      }
    }
  ]
}

Response

Upload result for each source file, in request order, even when every file fails to save: a failed file has status: "failed" and an error while the other files are saved. Retrying with the same content and identifiers is safe.

Changes

    • warning

      added the new MESSAGE_TREE enum value to the // response property for the response status

    • breaking

      the //// request property type changed from object to no type

    • info

      added subschema #1 subschema #2 to the //// request property oneOf list