Add Glossary Item
curl --request PUT \
--url https://api.lingopal.ai/v1/glossary/ \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'X-API-Key: <api-key>' \
--data 'items=<string>'import requests
url = "https://api.lingopal.ai/v1/glossary/"
payload = { "items": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({items: '<string>'})
};
fetch('https://api.lingopal.ai/v1/glossary/', 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.lingopal.ai/v1/glossary/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "items=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"X-API-Key: <api-key>"
],
]);
$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.lingopal.ai/v1/glossary/"
payload := strings.NewReader("items=%3Cstring%3E")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lingopal.ai/v1/glossary/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("items=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lingopal.ai/v1/glossary/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "items=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Glossary
Add Glossary Item
PUT
/
v1
/
glossary
/
Add Glossary Item
curl --request PUT \
--url https://api.lingopal.ai/v1/glossary/ \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'X-API-Key: <api-key>' \
--data 'items=<string>'import requests
url = "https://api.lingopal.ai/v1/glossary/"
payload = { "items": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({items: '<string>'})
};
fetch('https://api.lingopal.ai/v1/glossary/', 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.lingopal.ai/v1/glossary/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "items=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"X-API-Key: <api-key>"
],
]);
$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.lingopal.ai/v1/glossary/"
payload := strings.NewReader("items=%3Cstring%3E")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lingopal.ai/v1/glossary/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("items=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lingopal.ai/v1/glossary/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "items=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Description
This endpoint allows you to add a new glossary item for a specific language. The glossary item will be associated with the authenticated user and their organization. Resolvelanguage_id using the Get Languages endpoint (GET /v2/languages/) โ each language includes a language_id field.โI