Glossary

Create a glossary term

Create an active term.

POST
/v1/glossary

Create an active term. If an active term with the same source already exists, the request is refused with 422 glossary-term-exists; update that term instead. If a pending or rejected candidate holds the same source, it becomes this active term.

Authorization

deployToken
headerAuthorizationBearer <token>

A project deploy token, minted in the console under Settings, Developer, API tokens. Send the whole value, including the numeric prefix before the |. A token carries a set of abilities (push, pull, manage, read, write) and each operation requires one of them. Tokens do not inherit from each other: a manage token cannot read the glossary unless it also has read.

Request Body

application/json
  1. body

A whole term. On update, an optional field you omit is reset to its default, so send every field you want to keep. A do_not_translate or forbidden term carries no translations; any you send are dropped.

source_term*string
Lengthlength <= 255
part_of_speech?|
Lengthlength <= 30
notes?|
Lengthlength <= 2000
case_sensitive?boolean
Defaultfalse
do_not_translate?boolean
Defaultfalse
forbidden?boolean
Defaultfalse
translations?

Translations by locale. Empty values are ignored.

Response Body

The term.

application/json
  1. response
id?integer
source_term?string
source_normalized?string

The source term as it is matched; lowercased unless case_sensitive.

part_of_speech?string|null
notes?string|null
case_sensitive?boolean
do_not_translate?boolean

The term stays in the source language in every translation.

forbidden?boolean

The term must not appear in translations.

status?string

active terms apply to translation. pending terms are candidates proposed by glossary extraction. rejected candidates are kept so they are not proposed again.

Value in"active""pending""rejected"
confidence?|

Set on candidates proposed by extraction; null on terms written by hand.

translations?

Approved translations of the term, by locale.

created_by?|

What created the term; api for a term created through this API.

created_at?|
Formatdate-time
updated_at?|
Formatdate-time
curl -X POST 'https://api.transglot.ai/v1/glossary' \  -H 'Content-Type: application/json' \  -d '{  "source_term": "Checkout",  "part_of_speech": "noun",  "notes": "The page, not the verb.",  "case_sensitive": false,  "translations": {    "fr": "Paiement",    "de": "Kasse"  }}'
{  "id": 0,  "source_term": "string",  "source_normalized": "string",  "part_of_speech": "string",  "notes": "string",  "case_sensitive": true,  "do_not_translate": true,  "forbidden": true,  "status": "active",  "confidence": 0,  "translations": {    "property1": "string",    "property2": "string"  },  "created_by": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}