POST/v2/projects/{projectId}/glossary-highlights

Get glossary term highlights for text

Retrieves glossary term highlights for supplied text in a project and language. Supply languageTag and text in the request body; the language tag must follow BCP 47 and the text can contain up to 65,536 characters. The response contains the matching highlights in an embedded collection.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 2 body fields
projectIdintegerrequired
The integer identifier of the project to search for glossary term highlights.

Text and language information used to retrieve glossary term highlights.

languageTagstringrequired
Language tag according to BCP 47 definition
textstringrequired
The text to check for glossary terms. Must not exceed 65,536 characters.

5 status codes
200Returns an embedded collection of glossary term highlights for the supplied text.
_embeddedobjectoptional
400Returned when the request is invalid, including when a body field fails validation.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when authentication is missing or invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user lacks permission to access the project.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request is invalid. A 401 is returned when authentication is missing or invalid. A 403 is returned when the authenticated user lacks permission to access the project, and a 404 is returned when the project cannot be found. The languageTag and text body fields are required; languageTag must be a BCP 47 tag of no more than 20 characters without commas, and text must not exceed 65,536 characters. The projectId path parameter must identify the project.