Skip to main content

Import keys (resolvable)

POST 

https://app.tolgee.io/v2/projects/:projectId/keys/import-resolvable

Import's new keys with translations. Translations can be updated, when specified.

Request

Path Parameters

    projectId int64required

Bodyrequired

    keys object[]required
  • Array [
  • namestringrequired

    Key name to set translations for

    Example: what_a_key_to_translate
    namespacestring

    The namespace of the key. (When empty or null default namespace will be used)

    screenshots object[]
  • Array [
  • positions object[]
  • Array [
  • heightint32required
    widthint32required
    xint32required
    yint32required
  • ]
  • textstring
    uploadedImageIdint64required

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

  • ]
  • translations objectrequired

    Object mapping language tag to translation

    property name* ImportTranslationResolvableDto

    Object mapping language tag to translation

    resolutionstringrequired

    Determines, how conflict is resolved.

    • KEEP: Translation is not changed
    • OVERRIDE: Translation is overridden
    • NEW: New translation is created
    • FORCE_OVERRIDE: Translation is updated, created or kept.

    Possible values: [KEEP, OVERRIDE, NEW, FORCE_OVERRIDE]

    Example: OVERRIDE
    textstringrequired

    Translation text

    Example: Hello! I am a translation!
  • ]

Responses

OK

Schema
    keys object[]required

    List of keys

  • Array [
  • custom object

    Custom values of the key

    property name*object

    Custom values of the key

    descriptionstring

    Description of key

    Example: This key is used on homepage. It's a label of sign up button.
    idint64required

    Id of key record

    namestringrequired

    Name of key

    Example: this_is_super_key
    namespacestring

    Namespace of key

    Example: homepage
  • ]
  • screenshots objectrequired

    Map uploadedImageId to screenshot

    property name* ScreenshotModel

    Screenshots of the key

    createdAtdate-time
    fileUrlstringrequired
    filenamestringrequired

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

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

    heightint32
    idint64required
    keyReferences object[]required
  • Array [
  • keyIdint64required
    keyNamestringrequired
    keyNamespacestring
    originalTextstring
    position object
    heightint32required
    widthint32required
    xint32required
    yint32required
  • ]
  • locationstring
    middleSizedstring
    middleSizedUrlstring
    thumbnailstringrequired

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

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

    thumbnailUrlstringrequired
    widthint32

Authorization: X-API-Key

name: X-API-Keytype: apiKeyin: header

Request Collapse all
Base URL
https://app.tolgee.io
Auth
Parameters
— pathrequired
Body required
{
  "keys": [
    {
      "name": "what_a_key_to_translate",
      "namespace": "string",
      "screenshots": [
        {
          "positions": [
            {
              "height": 0,
              "width": 0,
              "x": 0,
              "y": 0
            }
          ],
          "text": "string",
          "uploadedImageId": 0
        }
      ],
      "translations": {}
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!