Skip to main content

Create new key

POST 

/v2/projects/:projectId/keys

Create new key

Request

Path Parameters

    projectId int64required

Body

required
    name stringrequired

    Name of the key

    namespace string
    translations object
    property name* string
    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[]
    screenshotUploadedImageIds int64[]

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

    screenshots 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

    isPlural booleanrequired

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

    pluralArgName string

    The argument name for the plural. If null, value will be guessed from the values provided in translations.

Responses

Created

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...