Glossary API
Create Glossary
/v1/glossary/createCreate a new glossary with terms and translations.
Example
curl
1curl -X POST 'https://otranslator.com/api/v1/glossary/create' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "name": "Financial terminology",
6 "targetLang": "English",
7 "keys": "[\"储蓄分流\"]",
8 "translated": "{'储蓄分流':'Diversion of household deposits'}"
9}'Request Parameters
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| *name | String | - | Glossary name | Financial terminology |
| desc | String | - | Glossary description | - |
| *targetLang | String | - |
| English |
| *keys | String[] | - | List of source terms | ["储蓄分流"] |
| *translated | JSON | - | Map of terms to translations | {'储蓄分流':'Diversion of household deposits'} |
Response
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| glossaryId | String | - | Glossary ID | - |