Add Key
Adds key to project.
Request type: POST
API Endpoint
https://api.translized.com/term/add
Parameters
Param | Type | Required | Description |
---|---|---|---|
projectId | String | True | Id of your project |
termKey | String | True | Key of key to add |
context | String | False | Context of key |
Example requests
- cURL
- Javascript Fetch
- Javascript Axios
curl -X POST -H "Content-Type: application/json" \
-H "api-token: 42cf5fec-a74c-4a53-8ebc-86a4e52b7ce6" \
-d "{"projectId":"A3KJtLw4mt", "termKey":"Api.test"}" \
https://api.translized.com/term/add
fetch('https://api.translized.com/term/add', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'api-token': '42cf5fec-a74c-4a53-8ebc-86a4e52b7ce6',
},
body: JSON.stringify({
projectId: 'A3KJtLw4mt',
termKey: 'Api.test',
}),
})
.then((res) => res.json())
.then((data) => console.log(data))
.catch((err) => console.log(err));
const response = await axios.post('https://api.translized.com/term/add', {
projectId: 'A3KJtLw4mt',
termKey: 'Api.test',
});
const data = response.result;
info
- projectId can be found inside your project's settings. (Translized App > Your Project > Settings )
Example response
{
"result": {
"objectId": "oNN342JCu0",
"projectId": "A3KJtLw4mt",
"key": "Api.test",
"value": [],
"createdAt": "2021-09-08T14:02:44.495Z"
}
}