---
updatedAt: 2026-06-15T14:44:56.000Z
agentTools:
  projectIndex: https://developers.lokalise.com/llms.txt
---

# Update a key

Updates the properties of a key and it's associated objects. Requires *Manage keys* admin right.

Requires <code>write_keys</code> OAuth access scope.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Projects with branches",
    "version": "1.0.0",
    "description": "Describes the API for projects with branches.\\n\\n**Project Type Compatibility**: Branching is **only supported for Software projects** (localization_files). Documents and Marketing projects do not support branching. All endpoints in this documentation require Software projects with branching enabled."
  },
  "servers": [
    {
      "url": "https://api.lokalise.com/api2"
    }
  ],
  "paths": {
    "/projects/{project_id}:{branch}/keys/{key_id}": {
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "example": {
                  "project_id": "3002780358964f9bab5a92.87762498",
                  "key": {
                    "key_id": 331223,
                    "created_at": "2018-12-31 12:00:00 (Etc/UTC)",
                    "created_at_timestamp": 1546257600,
                    "key_name": {
                      "ios": "new.index.welcome",
                      "android": "index.welcome",
                      "web": "index.welcome",
                      "other": "index.welcome"
                    },
                    "filenames": {
                      "ios": "",
                      "android": "",
                      "web": "",
                      "other": ""
                    },
                    "description": "Index app welcome",
                    "platforms": [
                      "web",
                      "other"
                    ],
                    "tags": [],
                    "comments": {},
                    "screenshots": {},
                    "translations": [
                      {
                        "translation_id": 444921,
                        "key_id": 331223,
                        "language_iso": "en",
                        "translation": "",
                        "modified_by": 420,
                        "modified_by_email": "user@mycompany.com",
                        "modified_at": "2018-12-31 12:00:00 (Etc/UTC)",
                        "modified_at_timestamp": 1546257600,
                        "is_reviewed": false,
                        "reviewed_by": 0,
                        "words": 0,
                        "custom_translation_statuses": {},
                        "task_id": 121
                      },
                      {
                        "translation_id": 444929,
                        "key_id": 331223,
                        "language_iso": "ru",
                        "translation": "",
                        "modified_by": 420,
                        "modified_by_email": "user@mycompany.com",
                        "modified_at": "2018-12-31 12:00:00 (Etc/UTC)",
                        "modified_at_timestamp": 1546257600,
                        "is_reviewed": false,
                        "reviewed_by": 0,
                        "words": 0,
                        "custom_translation_statuses": {},
                        "task_id": null
                      }
                    ]
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "project_id": {
                      "type": "string"
                    },
                    "key": {
                      "$ref": "#/components/schemas/Keys"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a key",
        "operationId": "Update a key",
        "description": "Updates the properties of a key and it's associated objects. Requires *Manage keys* admin right.\n\nRequires <code>write_keys</code> OAuth access scope.",
        "tags": [
          "Keys"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "description": "A unique project identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "path",
            "description": "Branch name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "description": "A unique identifier of the key.",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "platforms": [
                  "web",
                  "other"
                ],
                "description": "Index app welcome"
              },
              "schema": {
                "type": "object",
                "properties": {
                  "key_name": {
                    "type": "string",
                    "description": "Key identifier. For projects with enabled Per-platform key names, pass JSON encoded string with included <code>ios</code>, <code>android</code>, <code>web</code> and <code>other</code> string attributes."
                  },
                  "description": {
                    "type": "string",
                    "description": "Description of the key."
                  },
                  "platforms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "android",
                        "ios",
                        "other",
                        "web"
                      ]
                    },
                    "description": "List of platforms, enabled for this key. Possible values are <code>ios</code>, <code>android</code>, <code>web</code> and <code>other</code>."
                  },
                  "filenames": {
                    "type": "object",
                    "properties": {
                      "ios": {
                        "type": "string",
                        "description": "\"iOS\" platform filename."
                      },
                      "android": {
                        "type": "string",
                        "description": "\"Android\" platform filename."
                      },
                      "web": {
                        "type": "string",
                        "description": "\"Web\" platform filename."
                      },
                      "other": {
                        "type": "string",
                        "description": "\"Other\" platform filename."
                      }
                    },
                    "description": "An object containing key filename attribute for each platform."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of tags for this keys."
                  },
                  "merge_tags": {
                    "type": "boolean",
                    "description": "Enable to merge specified tags with the current tags attached to the key."
                  },
                  "is_plural": {
                    "type": "boolean",
                    "description": "Whether this key is plural."
                  },
                  "plural_name": {
                    "type": "string",
                    "description": "Optional custom plural name (used in some formats)."
                  },
                  "is_hidden": {
                    "type": "boolean",
                    "description": "Whether this key is hidden from non-admins (translators)."
                  },
                  "is_archived": {
                    "type": "boolean",
                    "description": "Whether this key is archived."
                  },
                  "context": {
                    "type": "string",
                    "description": "Optional context of the key (used with some file formats)."
                  },
                  "char_limit": {
                    "type": "number",
                    "description": "Maximum allowed number of characters in translations for this key."
                  },
                  "custom_attributes": {
                    "type": "string",
                    "description": "JSON encoded string containing <a href=\"https://docs.lokalise.com/developer-docs/custom-key-attributes\">custom attributes</a> (if any)."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Keys": {
        "type": "object",
        "properties": {
          "key_id": {
            "type": "number",
            "description": "A unique identifier of the key."
          },
          "created_at": {
            "type": "string",
            "description": "Creation date of the key."
          },
          "created_at_timestamp": {
            "type": "number",
            "description": "Unix timestamp when the key was created."
          },
          "key_name": {
            "type": "object",
            "properties": {
              "ios": {
                "type": "string",
                "description": "\"iOS\" platform key name."
              },
              "android": {
                "type": "string",
                "description": "\"Android\" platform key name."
              },
              "web": {
                "type": "string",
                "description": "\"Web\" platform key name."
              },
              "other": {
                "type": "string",
                "description": "\"Other\" platform key name."
              }
            },
            "description": "An object containing key names for all platforms. You may need to enable \"Per-platform key names\" in project settings in order to alter key names for each platform individually. Note, when creating/updating keys, depending on your project settings (Per-platform key names) you may be required to pass either a string (if the setting is disabled) or an object (if the setting is enabled)."
          },
          "filenames": {
            "type": "object",
            "properties": {
              "ios": {
                "type": "string",
                "description": "\"iOS\" platform filename."
              },
              "android": {
                "type": "string",
                "description": "\"Android\" platform filename."
              },
              "web": {
                "type": "string",
                "description": "\"Web\" platform filename."
              },
              "other": {
                "type": "string",
                "description": "\"Other\" platform filename."
              }
            },
            "description": "An object containing key filename attribute for each platform."
          },
          "description": {
            "type": "string",
            "description": "Description of the key."
          },
          "platforms": {
            "type": "array",
            "items": {},
            "description": "List of platforms, enabled for this key."
          },
          "tags": {
            "type": "array",
            "items": {},
            "description": "List of tags for this key."
          },
          "comments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comment_id": {
                  "type": "number",
                  "description": "Unique identifier of the comment."
                },
                "comment": {
                  "type": "string",
                  "description": "The comment."
                },
                "added_by": {
                  "type": "number",
                  "description": "Unique identifier of a user, who has left the comment."
                },
                "added_by_email": {
                  "type": "string",
                  "description": "E-mail of a user, who has left the comment."
                },
                "added_at": {
                  "type": "string",
                  "description": "Date the comment has been added."
                },
                "added_at_timestamp": {
                  "type": "number",
                  "description": "Unix timestamp when the comment has been added."
                }
              }
            },
            "description": "Comments for this key."
          },
          "screenshots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "screenshot_id": {
                  "type": "number",
                  "description": "A unique identifier of the screenshot."
                },
                "key_ids": {
                  "type": "array",
                  "items": {},
                  "description": "List of key identifiers, the screenshot is attached to."
                },
                "url": {
                  "type": "string",
                  "description": "Link to the screenshot."
                },
                "title": {
                  "type": "string",
                  "description": "Screenshot title."
                },
                "description": {
                  "type": "string",
                  "description": "Description of the screenshot."
                },
                "screenshot_tags": {
                  "type": "array",
                  "items": {},
                  "description": "List of screenshot tags."
                },
                "width": {
                  "type": "number",
                  "description": "Width of the screenshot, in pixels."
                },
                "height": {
                  "type": "number",
                  "description": "Height of the screenshot, in pixels."
                },
                "created_at": {
                  "type": "string",
                  "description": "Creation date of the screenshot."
                },
                "created_at_timestamp": {
                  "type": "number",
                  "description": "Unix timestamp when the screenshot was created."
                }
              }
            },
            "description": "Screenshots, attached to this key."
          },
          "translations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "translation_id": {
                  "type": "number",
                  "description": "Unique identifier of translation entry."
                },
                "key_id": {
                  "type": "number",
                  "description": "A unique identifier of the key."
                },
                "language_iso": {
                  "type": "string",
                  "description": "Unique code of the language of the translation."
                },
                "translation": {
                  "type": "string",
                  "description": "The actual translation. Pass as an object, in case it includes plural forms and <code>is_plural</code> is <code>true</code>."
                },
                "modified_by": {
                  "type": "number",
                  "description": "Identifier of a user, who has updated the translation."
                },
                "modified_by_email": {
                  "type": "string",
                  "description": "E-mail of a user, who has updated the translation."
                },
                "modified_at": {
                  "type": "string",
                  "description": "Date of last modification of the translation."
                },
                "modified_at_timestamp": {
                  "type": "number",
                  "description": "Unix timestamp of last modification of the translation."
                },
                "is_reviewed": {
                  "type": "boolean",
                  "description": "Whether the translation is marked as Reviewed."
                },
                "is_unverified": {
                  "type": "boolean",
                  "description": "Whether the translation is marked as Unverified."
                },
                "reviewed_by": {
                  "type": "number",
                  "description": "Identifier of the user, who has reviewed the translation (if reviewed)."
                },
                "words": {
                  "type": "number",
                  "description": "Number of words in the translation."
                },
                "custom_translation_statuses": {
                  "type": "array",
                  "items": {},
                  "description": "Array consisting of <a href=\"#object-translation-statuses\">Custom Translation Status</a> objects."
                },
                "task_id": {
                  "type": "number",
                  "description": "Identifier of the task, if the key is a part of one, or <code>null</code> if it's not."
                }
              }
            },
            "description": "Translations for all languages."
          },
          "is_plural": {
            "type": "boolean",
            "description": "Whether this key is plural."
          },
          "plural_name": {
            "type": "string",
            "description": "Optional custom plural name (used in some formats)."
          },
          "is_hidden": {
            "type": "boolean",
            "description": "Whether this key is hidden from non-admins (translators)."
          },
          "is_archived": {
            "type": "boolean",
            "description": "Whether this key is archived."
          },
          "context": {
            "type": "string",
            "description": "Optional context of the key (used with some file formats)."
          },
          "base_words": {
            "type": "number",
            "description": "Number of words in base language."
          },
          "char_limit": {
            "type": "number",
            "description": "Maximum allowed number of characters in translations for this key."
          },
          "custom_attributes": {
            "type": "array",
            "items": {},
            "description": "JSON containing <a href=\"https://docs.lokalise.com/developer-docs/custom-key-attributes\">custom attributes</a> (if any)."
          },
          "modified_at": {
            "type": "string",
            "description": "Date of the latest key update (including screenshots and comments)."
          },
          "modified_at_timestamp": {
            "type": "number",
            "description": "Unix timestamp of the latest key update (including screenshots and comments)."
          },
          "translations_modified_at": {
            "type": "string",
            "description": "Date of the latest key translation update."
          },
          "translations_modified_at_timestamp": {
            "type": "number",
            "description": "Unix timestamp of the latest key translation update."
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Token"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
```