Skip to main content
POST
/
api
/
public
/
prismy-hosted
/
{repo_id}
/
{language}
/
{bundleName}
Update translation file
curl --request POST \
  --url https://app.prismy.io/api/public/prismy-hosted/{repo_id}/{language}/{bundleName} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "json": {
    "key1": "value1",
    "key2": "value2"
  }
}'
{
  "success": true,
  "message": "Translation file updated successfully",
  "branch": "main",
  "keys": [
    {
      "key": "<string>",
      "value": "<string>",
      "updated": true
    }
  ],
  "total_keys": 2,
  "override": false,
  "auto_translate": true,
  "wait_for_translations": false,
  "other_translations": {
    "success": true,
    "filesUpdated": 3,
    "keysAdded": 2
  }
}

Authorizations

Authorization
string
header
required

API token from your organization settings

Path Parameters

repo_id
string
required

Repository identifier

language
string
required

Language code (e.g., en-US, fr-FR, es-ES)

bundleName
string
required

Bundle name or ID

Query Parameters

override
boolean
default:false

If true, completely replaces the file. If false, merges new keys only

auto-translate
boolean
default:true

If true, automatically translates new keys to other languages in the bundle

wait-for-translations
boolean
default:false

If true, waits for translations to complete before responding

branch
string

Target branch name. Defaults to the repository's main branch. If the branch does not exist, it will be created, by copying the main branch and applying the changes.

Body

application/json
  • Option 1
  • Option 2

Request body supports two formats: JSON object or file content

json
object
required
Example:
{ "key1": "value1", "key2": "value2" }

Response

Translation file updated successfully

success
boolean
Example:

true

message
string
Example:

"Translation file updated successfully"

branch
string
Example:

"main"

keys
object[]
total_keys
integer
Example:

2

override
boolean
Example:

false

auto_translate
boolean
Example:

true

wait_for_translations
boolean
Example:

false

other_translations
object

Results of translation generation for other languages

I