Adds a term. It starts with the status review.
HTTP
POST /glossaryAccess: Session token only. API keys get 403 with insufficient_scope.
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The term. At most 120 characters. |
pos | string | no | Part of speech. At most 40 characters. Default Noun. |
definition | string | no | At most 2000 characters. |
projectIds | list of string | no | Projects the term applies to. Ids of projects you cannot see are ignored. |
JSON
{ "name": "checkout", "definition": "The step where a customer pays." }Response 201 #
The term.
JSON
{
"id": "0197a3cc-a3b9-7aaa-9d00-5b9ebc6a832a",
"name": "checkout",
"pos": "Noun",
"status": "approved",
"definition": "The step where a customer pays.",
"example": "Go to checkout.",
"forbidden": ["cash register"],
"related": ["cart"],
"translations": [
{ "code": "de-de", "value": "Kasse", "state": "approved", "annotation": null, "conflict": null }
],
"projectIds": ["0197a3c6-4d53-7a44-87fb-9b3e5c0a2d64"],
"addedBy": "Ada Lovelace",
"addedMinutes": 4320,
"editedBy": "Ada Lovelace",
"editedMinutes": 60
}Response fields #
| Field | Type | Description |
|---|---|---|
id | string | The id of the term. |
name | string | The term. |
pos | string | Part of speech, free text. Default Noun. |
status | string | approved, review (default for a new term) or notranslate. |
definition | string | The definition. |
example | string | An example. |
forbidden | list of string | Words that must not be used. |
related | list of string | Related terms. |
translations | list of object | One per language: code, value, state (approved, pending, missing, conflict or unchanged), annotation and conflict. |
projectIds | list of string | Projects the term applies to. |
addedBy | string or null | Who added it. |
addedMinutes | integer or null | Minutes since it was added. |
editedBy | string or null | Who last changed it. |
editedMinutes | integer or null | Minutes since it changed. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 409 | conflict | The glossary already has this term. |
| 422 | invalid_request | name is empty or too long, or another text is too long. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.