Translation keys

Create translation key

Changed on

Creates translation key for a project. It throws an error if translation key already exists.

key is a required field, and it cannot be null or empty. The endpoint throws an error if key is null or empty.

namespace, description and codeDescription are optional fields, and they can be null or empty. Null and empty values are ignored.

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

If namespace is not provided, the default namespace is used.

If description is not provided, the empty string is used. Description is used for translation key comments that are visible in the editor, and they be edited in the editor.

If codeDescription is not provided, the empty string is used. Code description is used for code comments that are visible in the editor, but they cannot be edited in the editor.

If charactersLimit is not provided (or -1), then no limit is set.

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

Set deprecated: true to mark the translation key as deprecated in the Web UI.

post/api/v1/translation-keys

Request

Request body

keystring required
namespacestring
descriptionstring
codeDescriptionstring
charactersLimitinteger
lockboolean
deprecatedboolean
tagsstring[]
attributesobject

Response

OK

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • warning

      deleted the header request parameter X-SimpleLocalize-Token

    • info

      the endpoint scheme security Project API Key was added to the API

    • info

      the endpoint scheme security apiKey was removed from the API

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status