Get fuzzy TM matches
curl --request POST \
--url https://api.textsetu.com/api/v1/projects/{projectId}/tm/matches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceTexts": [
"Welcome",
"Sign in"
],
"languageCodes": [
"fr",
"de"
]
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/tm/matches"
payload = {
"sourceTexts": ["Welcome", "Sign in"],
"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: ['Welcome', 'Sign in'], languageCodes: ['fr', 'de']})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/tm/matches', 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}/tm/matches",
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' => [
'Welcome',
'Sign in'
],
'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}/tm/matches"
payload := strings.NewReader("{\n \"sourceTexts\": [\n \"Welcome\",\n \"Sign in\"\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}/tm/matches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceTexts\": [\n \"Welcome\",\n \"Sign in\"\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}/tm/matches")
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 \"Welcome\",\n \"Sign in\"\n ],\n \"languageCodes\": [\n \"fr\",\n \"de\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"matches": {}
}
}Translation Memory
Get fuzzy TM matches
Fuzzy-match source strings against the translation memories that apply to this project, returning scored suggestions. Batched: pass every source string and every target language in one call.
Each TM’s own minMatchPercentage and penalty settings (case / whitespace / trailing punctuation) are applied, so matchPercentage is the net score after penalties. See the translation memory guide.
Constraints:
- Returns an empty object when translation memory is disabled for the org or the project.
- At most 100 source texts and 50 languages per request; up to 10 matches per language.
POST
/
projects
/
{projectId}
/
tm
/
matches
Get fuzzy TM matches
curl --request POST \
--url https://api.textsetu.com/api/v1/projects/{projectId}/tm/matches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceTexts": [
"Welcome",
"Sign in"
],
"languageCodes": [
"fr",
"de"
]
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/tm/matches"
payload = {
"sourceTexts": ["Welcome", "Sign in"],
"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: ['Welcome', 'Sign in'], languageCodes: ['fr', 'de']})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/tm/matches', 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}/tm/matches",
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' => [
'Welcome',
'Sign in'
],
'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}/tm/matches"
payload := strings.NewReader("{\n \"sourceTexts\": [\n \"Welcome\",\n \"Sign in\"\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}/tm/matches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceTexts\": [\n \"Welcome\",\n \"Sign in\"\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}/tm/matches")
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 \"Welcome\",\n \"Sign in\"\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 fuzzy-match against the applicable TMs (1–100 per call).
Required array length:
1 - 100 elementsExample:
["Welcome", "Sign in"]
Target language codes to return suggestions for (1–50 per call).
Required array length:
1 - 50 elementsMinimum string length:
1Example:
["fr", "de"]

