Look up glossary terms
curl --request POST \
--url https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceTexts": [
"Sign in to continue",
"Reset your password"
],
"languageCodes": [
"fr",
"de"
]
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup"
payload = {
"sourceTexts": ["Sign in to continue", "Reset your password"],
"languageCodes": ["fr", "de"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceTexts: ['Sign in to continue', 'Reset your password'],
languageCodes: ['fr', 'de']
})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceTexts' => [
'Sign in to continue',
'Reset your password'
],
'languageCodes' => [
'fr',
'de'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup"
payload := strings.NewReader("{\n \"sourceTexts\": [\n \"Sign in to continue\",\n \"Reset your password\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceTexts\": [\n \"Sign in to continue\",\n \"Reset your password\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceTexts\": [\n \"Sign in to continue\",\n \"Reset your password\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"matches": {}
}
}Glossary
Look up glossary terms
Find the glossary terms that occur in one or more source strings, with their approved translations. Batched: pass every source string and every target language in one call.
Each match carries doNotTranslate, caseSensitive and usageStatus (preferred / deprecated / forbidden) so a translator — or an agent generating a translation — can honor terminology rules.
Constraints:
- Returns an empty object when the glossary feature is disabled for the org or the project.
- At most 100 source texts and 50 languages per request.
- Matching is whole-word where the term has word boundaries, substring otherwise (CJK/Thai).
POST
/
projects
/
{projectId}
/
glossary
/
lookup
Look up glossary terms
curl --request POST \
--url https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceTexts": [
"Sign in to continue",
"Reset your password"
],
"languageCodes": [
"fr",
"de"
]
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup"
payload = {
"sourceTexts": ["Sign in to continue", "Reset your password"],
"languageCodes": ["fr", "de"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceTexts: ['Sign in to continue', 'Reset your password'],
languageCodes: ['fr', 'de']
})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceTexts' => [
'Sign in to continue',
'Reset your password'
],
'languageCodes' => [
'fr',
'de'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup"
payload := strings.NewReader("{\n \"sourceTexts\": [\n \"Sign in to continue\",\n \"Reset your password\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceTexts\": [\n \"Sign in to continue\",\n \"Reset your password\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceTexts\": [\n \"Sign in to continue\",\n \"Reset your password\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"matches": {}
}
}Authorizations
API token: tsu_pat_… (PAT) or tsu_proj_… (project token). The token's granted RBAC permissions determine access; see each operation's x-permission.
Path Parameters
Project id (UUID) or id-embedded path slug.
Body
application/json
Source strings to scan for glossary terms (max 100 per call).
Required array length:
1 - 100 elementsExample:
[
"Sign in to continue",
"Reset your password"
]
Target language codes to return translations for (max 50 per call).
Required array length:
1 - 50 elementsMinimum string length:
1Example:
["fr", "de"]

