---
title: "Update translation key by ID"
method: PATCH
path: "/api/v1/translation-keys/{id}"
tags: ["Translation keys"]
---

# Update translation key by ID

`PATCH /api/v1/translation-keys/{id}`

## Request

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

Updates key, namespace, description and/or code description for a project by Translation Key ID. It throws an error if translation key does not exist or if the new key/namespace combination already exists.

Key, namespace, description and code description are optional fields, and they can be null or empty. Null and empty values are ignored, and they are not updated.

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.

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

## Path parameters

- `id` string, required

## 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`: 3 info
  - 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 info
  - endpoint added

[Operation history](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/changes/api/v1/translation-keys/:id/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)
