Glossary Terms

Note: Glossary API is still in beta and might be subject to change. Glossaries are available in the Business plan and above.

GET /v2/accounts/:account_id/glossaries/:glossary_id/terms

List all glossary terms the current user has access to.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:glossary_id/terms" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp glossary_terms list <account_id> <glossary_id>

Response

Status: 200
[ { "id": "abcd1234cdef1234abcd1234cdef1233", "term": "Save", "description": "This term is used on the 'Save' buttons of our website", "translatable": true, "case_sensitive": true, "translations": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "locale_code": "fr-FR", "content": "Entasser", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1235", "locale_code": "de-DE", "content": "Speichern", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1233", "term": "Save", "description": "This term is used on the 'Save' buttons of our website", "translatable": true, "case_sensitive": true, "translations": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "locale_code": "fr-FR", "content": "Entasser", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1235", "locale_code": "de-DE", "content": "Speichern", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ]

GET /v2/accounts/:account_id/glossaries/:glossary_id/terms/:id

Get details on a single glossary term.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:glossary_id/terms/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp glossary_term show <account_id> <glossary_id> <id>

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1233", "term": "Save", "description": "This term is used on the 'Save' buttons of our website", "translatable": true, "case_sensitive": true, "translations": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "locale_code": "fr-FR", "content": "Entasser", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1235", "locale_code": "de-DE", "content": "Speichern", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

POST /v2/accounts/:account_id/glossaries/:glossary_id/terms

Create a new glossary term.

Parameters

Name Type Description
term string Glossary term
description
optional
string Description of term
Default:
translatable
optional
boolean Indicates whether the term should be used for all languages or can be translated
Default: false
case_sensitive
optional
boolean Indicates whether the term is case sensitive
Default: false

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:glossary_id/terms" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"term":"MyCompany","description":"Use this when refering to our company","translatable":true,"case_sensitive":true}' \
  -H 'Content-Type: application/json'
phraseapp glossary_term create <account_id> <glossary_id> \
--term MyCompany \
--description "Use this when refering to our company" \
--translatable true \
--case-sensitive true

Response

Status: 201
{ "id": "abcd1234cdef1234abcd1234cdef1233", "term": "Save", "description": "This term is used on the 'Save' buttons of our website", "translatable": true, "case_sensitive": true, "translations": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "locale_code": "fr-FR", "content": "Entasser", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1235", "locale_code": "de-DE", "content": "Speichern", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

PATCH /v2/accounts/:account_id/glossaries/:glossary_id/terms/:id

Update an existing glossary term.

Parameters

Name Type Description
term string Glossary term
description
optional
string Description of term
Default:
translatable
optional
boolean Indicates whether the term should be used for all languages or can be translated
Default: false
case_sensitive
optional
boolean Indicates whether the term is case sensitive
Default: false

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:glossary_id/terms/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"term":"MyCompany","description":"Use this when refering to our company","translatable":true,"case_sensitive":true}' \
  -H 'Content-Type: application/json'
phraseapp glossary_term update <account_id> <glossary_id> <id> \
--term MyCompany \
--description "Use this when refering to our company" \
--translatable true \
--case-sensitive true

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1233", "term": "Save", "description": "This term is used on the 'Save' buttons of our website", "translatable": true, "case_sensitive": true, "translations": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "locale_code": "fr-FR", "content": "Entasser", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1235", "locale_code": "de-DE", "content": "Speichern", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

DELETE /v2/accounts/:account_id/glossaries/:glossary_id/terms/:id

Delete an existing glossary term.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:glossary_id/terms/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp glossary_term delete <account_id> <glossary_id> <id>

Response

Status: 204