---
title: "Update translation key"
method: PATCH
path: "/api/v1/translation-keys"
tags: ["Translation keys"]
---

# Update translation key

`PATCH /api/v1/translation-keys`

## Request

- Base URL: `https://api.simplelocalize.io`
- URL: `https://api.simplelocalize.io/api/v1/translation-keys`
- Auth: API key in header `X-SimpleLocalize-Token`
- TypeScript: <https://skmtc.dev/simplelocalize/apis/simplelocalize-api/docs/api/v1/translation-keys/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates key, namespace, and/or it's metadata. It throws an error if translation key does not exist or if the new key/namespace combination already exists.

Use query `key` and `namespace` parameters to identify the translation key, and update it with the provided values in the request body.

The last seen date is updated automatically even if there is no changes.

Max size of description and code description is 500 characters, otherwise, the endpoint throws an error.

Set `lock: true` to prevent the translation key from being modified.

To clear the characters limit, set it to -1.

## Query parameters

- `key` string, required
- `namespace` string

## Request body

- UpdateTranslationKeyRequestV2
  - `key` string
  - `namespace` string
  - `description` string
  - `codeDescription` string
  - `charactersLimit` integer
  - `deprecated` boolean
  - `lock` boolean
  - `tags` string[]
  - `attributes` object

## Response `200`

OK

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests
- `500`: Internal Server Error

## Changes

- **2026-11-07** `67a25a25863a`: 1 warning, 3 info
  - deleted the `header` request parameter `x-simplelocalize-client`
  - added the new optional request property `attributes`
  - added the new optional request property `deprecated`
  - added the new optional request property `lock`
- **2025-11-12** `0329534cd557`: 1 warning, 17 info
  - deleted the `header` request parameter `X-SimpleLocalize-Token`
  - the endpoint scheme security `Project API Key` was added to the API
  - the endpoint scheme security `apiKey` was removed from the API
  - added the new optional `header` request parameter `x-simplelocalize-client`
  - …14 more
- **2025-04-19** `5475c7163be9`: 9 info
  - added the new optional request property `charactersLimit`
  - added the new optional request property `tags`
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `402` status
  - …5 more
- **2023-11-30** `18bfbf87af44`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/changes/api/v1/translation-keys/patch.md)

---

[API](https://skmtc.dev/simplelocalize/apis/simplelocalize-api.md) - [All operations](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/llms.txt) - [OpenAPI document](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/revisions/67a25a25863a?raw)
