# Glossary

Define terms and specify their translations for different languages to ensure consistent wording.

## The GlossaryEntry object

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"components":{"schemas":{"GlossaryEntry":{"type":"object","properties":{"object":{"type":"string","enum":["glossary-entry"]},"id":{"type":"string","description":"Unique identifier of the glossary entry"},"translations":{"$ref":"#/components/schemas/GlossaryTranslations"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"urls":{"type":"object","properties":{"location":{"type":"string","format":"uri","description":"URL of the glossary entry in the API"}},"required":["location"]}},"required":["object","id","translations","createdAt","updatedAt","urls"]},"GlossaryTranslations":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\n\\r]*$"},"description":"Mapping of language codes to translated terms"}}}}
```

## GET /orgs/{organizationId}/translations-glossary

> List glossary entries

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"glossary","description":"Define terms and specify their translations for different languages to ensure consistent wording.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"GlossaryEntry\" grouped=\"false\" %}\n    The GlossaryEntry object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"GlossaryEntry":{"type":"object","properties":{"object":{"type":"string","enum":["glossary-entry"]},"id":{"type":"string","description":"Unique identifier of the glossary entry"},"translations":{"$ref":"#/components/schemas/GlossaryTranslations"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"urls":{"type":"object","properties":{"location":{"type":"string","format":"uri","description":"URL of the glossary entry in the API"}},"required":["location"]}},"required":["object","id","translations","createdAt","updatedAt","urls"]},"GlossaryTranslations":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\n\\r]*$"},"description":"Mapping of language codes to translated terms"}}},"paths":{"/orgs/{organizationId}/translations-glossary":{"get":{"operationId":"listGlossaryEntries","summary":"List glossary entries","tags":["glossary"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"orderBy","in":"query","description":"Sort results by language key","schema":{"$ref":"#/components/schemas/TranslationLanguage"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GlossaryEntry"}}}}]}}}}}}}}}
```

## PUT /orgs/{organizationId}/translations-glossary

> Update glossary entries

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"glossary","description":"Define terms and specify their translations for different languages to ensure consistent wording.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"GlossaryEntry\" grouped=\"false\" %}\n    The GlossaryEntry object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"GlossaryBatchOperation":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["insert"]},"translations":{"$ref":"#/components/schemas/GlossaryTranslations"}},"required":["type","translations"]},{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"id":{"type":"string"},"translations":{"$ref":"#/components/schemas/GlossaryTranslations"}},"required":["type","id","translations"]},{"type":"object","properties":{"type":{"type":"string","enum":["delete"]},"id":{"type":"string"}},"required":["type","id"]}]},"GlossaryTranslations":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\n\\r]*$"},"description":"Mapping of language codes to translated terms"}},"responses":{"BadRequestError":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[400]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/translations-glossary":{"put":{"operationId":"updateGlossaryEntries","summary":"Update glossary entries","tags":["glossary"],"parameters":[{"$ref":"#/components/parameters/organizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/GlossaryBatchOperation"}}},"required":["operations"]}}}},"responses":{"204":{"description":"Glossary entries updated"},"400":{"$ref":"#/components/responses/BadRequestError"}}}}}}
```

## GET /orgs/{organizationId}/translations-glossary/{glossaryEntryId}

> Get a glossary entry by its ID

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"glossary","description":"Define terms and specify their translations for different languages to ensure consistent wording.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"GlossaryEntry\" grouped=\"false\" %}\n    The GlossaryEntry object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"glossaryEntryId":{"name":"glossaryEntryId","in":"path","required":true,"description":"The unique id of the glossary entry","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"GlossaryEntry":{"type":"object","properties":{"object":{"type":"string","enum":["glossary-entry"]},"id":{"type":"string","description":"Unique identifier of the glossary entry"},"translations":{"$ref":"#/components/schemas/GlossaryTranslations"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"urls":{"type":"object","properties":{"location":{"type":"string","format":"uri","description":"URL of the glossary entry in the API"}},"required":["location"]}},"required":["object","id","translations","createdAt","updatedAt","urls"]},"GlossaryTranslations":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\n\\r]*$"},"description":"Mapping of language codes to translated terms"}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/translations-glossary/{glossaryEntryId}":{"get":{"operationId":"getGlossaryEntry","summary":"Get a glossary entry by its ID","tags":["glossary"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/glossaryEntryId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlossaryEntry"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```
