Skip to main content

Edit key and related data

PUT 

/v2/projects/:projectId/keys/:id/complex-update

Edits key name, translations, tags, screenshots, and other data

Request

Path Parameters

    id int64required
    projectId int64required

Body

required
    name stringrequired

    Name of the key

    namespace string
    translations object

    Translations to update

    property name* string

    Translations to update

    states object

    Translation states to update, if not provided states won't be modified

    property name* string

    Translation states to update, if not provided states won't be modified

    tags string[]

    Tags of the key. If not provided tags won't be modified

    screenshotIdsToDelete int64[]

    IDs of screenshots to delete

    screenshotUploadedImageIds int64[]

    Ids of screenshots uploaded with /v2/image-upload endpoint

    screenshotsToAdd object[]
  • Array [
  • text string
    uploadedImageId int64required

    Ids of screenshot uploaded with /v2/image-upload endpoint

    positions object[]
  • Array [
  • x int32required
    y int32required
    width int32required
    height int32required
  • ]
  • ]
  • relatedKeysInOrder object[]

    Keys in the document used as a context for machine translation. Keys in the same order as they appear in the document. The order is important! We are using it for graph distance calculation.

  • Array [
  • namespace string
    keyName stringrequired
  • ]
  • description string

    Possible values: <= 2000 characters

    Description of the key. It's also used as a context for Tolgee AI translator

    isPlural boolean

    If key is pluralized. If it will be reflected in the editor. If null, value won't be modified.

    pluralArgName string

    The argument name for the plural. If null, value won't be modified. If isPlural is false, this value will be ignored.

    warnOnDataLoss boolean

    If true, it will fail with 400 (with code plural_forms_data_loss) if plural is disabled and there are plural forms, which would be lost by the action. You can get rid of this warning by setting this value to false.

    custom object

    Custom values of the key. If not provided, custom values won't be modified

    property name* object

    Custom values of the key. If not provided, custom values won't be modified

Responses

OK

Schema
    id int64required

    Id of key record

    name stringrequired

    Name of key

    namespace string

    Namespace of key

    description string

    Description of key

    translations objectrequired

    Translations object containing values updated in this request

    property name* TranslationModel

    Translations object containing values updated in this request

    id int64required

    Id of translation record

    text string

    Translation text

    state stringrequired

    Possible values: [UNTRANSLATED, TRANSLATED, REVIEWED, DISABLED]

    State of translation

    outdated booleanrequired

    Whether base language translation was changed after this translation was updated

    auto booleanrequired

    Was translated using Translation Memory or Machine translation service?

    mtProvider string

    Possible values: [GOOGLE, AWS, DEEPL, AZURE, BAIDU, TOLGEE]

    Which machine translation service was used to auto translate this

    tags object[]required

    Tags of key

  • Array [
  • id int64required
    name stringrequired
  • ]
  • screenshots object[]required

    Screenshots of the key

  • Array [
  • id int64required
    filename stringrequired

    File name, which may be downloaded from the screenshot path.

    When images are secured. Encrypted timestamp is appended to the filename.

    thumbnail stringrequired

    Thumbnail file name, which may be downloaded from the screenshot path.

    When images are secured. Encrypted timestamp is appended to the filename.

    fileUrl stringrequired
    thumbnailUrl stringrequired
    createdAt date-time
    keyReferences object[]required
  • Array [
  • keyId int64required
    position object
    x int32required
    y int32required
    width int32required
    height int32required
    keyName stringrequired
    keyNamespace string
    originalText string
  • ]
  • location string
    width int32
    height int32
  • ]
  • isPlural booleanrequired

    If key is pluralized. If it will be reflected in the editor

    pluralArgName string

    The argument name for the plural

    custom objectrequired

    Custom values of the key

    property name* object

    Custom values of the key

Loading...