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"
  },
  "tags": [
    "urgent",
    "review-needed"
  ]
}
'
{
  "success": true,
  "message": "Translation file updated successfully",
  "branch": "main",
  "keys": [
    {
      "key": "<string>",
      "value": "<string>",
      "updated": true
    }
  ],
  "total_keys": 2,
  "override": false,
  "delete_removed_keys": false,
  "auto_translate": true,
  "wait_for_translations": false,
  "other_translations": {
    "success": true,
    "filesUpdated": 3,
    "keysAdded": 2
  },
  "tags": {
    "success": true,
    "tags_added": 123,
    "keys_tagged": 123,
    "added_count": 123,
    "message": "<string>",
    "error": "<string>"
  }
}

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.

user
string

Username or email to use as author when creating versions. If not provided, defaults to 'Prismy API'

delete-removed-keys-from-all-files
boolean
default:false

Use with override=true to synchronize key removal across the bundle. When true, any key that exists in the bundle but is missing from your upload is removed from all language files (e.g. en, fr, es) in that bundle. Useful after cleaning unused keys (e.g. with i18n-unused): upload the cleaned source file with override=true and this flag to have the same keys removed from every language. Deletions are preserved when you merge your branch into main.

Body

application/json

Request body supports two formats: JSON object or file content. Optionally include tags to add static tags to newly added or edited keys (requires Tags feature enabled at https://app.prismy.io/tags). Existing tags are reused by name; new tags are created with auto-assigned colors.

json
object
required
Example:
{ "key1": "value1", "key2": "value2" }
tags
string[]

Optional. Static tag names to add to newly added or edited keys. Tags are created if they do not exist. Requires Tags feature enabled.

Example:
["urgent", "review-needed"]

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

delete_removed_keys
boolean

True when you used delete-removed-keys-from-all-files and keys were actually removed from the bundle. Confirms that unused-key cleanup was applied across all language files.

Example:

false

auto_translate
boolean
Example:

true

wait_for_translations
boolean
Example:

false

other_translations
object

Results of translation generation for other languages

tags
object

Present when tags array was provided. Results of applying static tags to newly added or edited keys.