Create new key
POST/v2/projects/:projectId/keys
Create new key
Request
Path Parameters
- application/json
Body
required
- Array [
- Array [
- ]
- ]
- Array [
- ]
Name of the key
translations object
states object
Translation states to update, if not provided states won't be modified
Translation states to update, if not provided states won't be modified
Ids of screenshots uploaded with /v2/image-upload endpoint
screenshots object[]
Ids of screenshot uploaded with /v2/image-upload endpoint
positions object[]
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.
Possible values: <= 2000 characters
Description of the key
If key is pluralized. If it will be reflected in the editor
The argument name for the plural. If null, value will be guessed from the values provided in translations.
Responses
- 201
- 400
- 401
- 403
- 404
Created
- */*
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- Array [
- ]
- ]
Id of key record
Name of key
Namespace of key
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 of translation record
Translation text
Possible values: [UNTRANSLATED
, TRANSLATED
, REVIEWED
, DISABLED
]
State of translation
Whether base language translation was changed after this translation was updated
Was translated using Translation Memory or Machine translation service?
Possible values: [GOOGLE
, AWS
, DEEPL
, AZURE
, BAIDU
, TOLGEE
]
Which machine translation service was used to auto translate this
tags object[]required
Tags of key
screenshots object[]required
Screenshots of the key
File name, which may be downloaded from the screenshot path.
When images are secured. Encrypted timestamp is appended to the filename.
Thumbnail file name, which may be downloaded from the screenshot path.
When images are secured. Encrypted timestamp is appended to the filename.
keyReferences object[]required
position object
If key is pluralized. If it will be reflected in the editor
The argument name for the plural
custom objectrequired
Custom values of the key
Custom values of the key
{
"id": 0,
"name": "this_is_super_key",
"namespace": "homepage",
"description": "This key is used on homepage. It's a label of sign up button.",
"translations": {
"en": {
"id": 100000003,
"text": "This is super translation!"
}
},
"tags": [
{
"id": 0,
"name": "string"
}
],
"screenshots": [
{
"id": 0,
"filename": "string",
"thumbnail": "string",
"fileUrl": "string",
"thumbnailUrl": "string",
"createdAt": "2024-04-27T10:07:49.530Z",
"keyReferences": [
{
"keyId": 0,
"position": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
"keyName": "string",
"keyNamespace": "string",
"originalText": "string"
}
],
"location": "string",
"width": 0,
"height": 0
}
],
"isPlural": true,
"pluralArgName": "string",
"custom": {}
}
Bad Request
- */*
- Schema
Schema
string
Unauthorized
- */*
- Schema
Schema
string
Forbidden
- */*
- Schema
Schema
string
Not Found
- */*
- Schema
Schema
string