Update phrase replacement config
{
"phraseReplacements": [
{
"phrase": "سیونگز اکاؤنٹ",
"replacement": "savings account"
},
{
"phrase": "Isabion",
"replacement": "ایزابیان"
},
{
"phrase": "Meezan bank",
"replacement": "میزان بینک"
}
]
}curl --request POST \
--url https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"phraseReplacements": [
{
"phrase": "<string>",
"replacement": "<string>"
}
]
}
'import requests
url = "https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}"
payload = { "phraseReplacements": [
{
"phrase": "<string>",
"replacement": "<string>"
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}",
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([
'phraseReplacements' => [
[
'phrase' => '<string>',
'replacement' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}"
payload := strings.NewReader("{\n \"phraseReplacements\": [\n {\n \"phrase\": \"<string>\",\n \"replacement\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phraseReplacements\": [\n {\n \"phrase\": \"<string>\",\n \"replacement\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phraseReplacements\": [\n {\n \"phrase\": \"<string>\",\n \"replacement\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"configId": "<string>",
"phraseReplacements": [
{
"phrase": "<string>",
"replacement": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "Rate limit exceeded, please try again later"
}Orator REST API
Update Phrase Replacement Config
Update an existing phrase replacement configuration
Updates an existing phrase replacement configuration with new phrase replacements.
POST
/
synthesis
/
phrase-replacement-config
/
{configId}
Update phrase replacement config
{
"phraseReplacements": [
{
"phrase": "سیونگز اکاؤنٹ",
"replacement": "savings account"
},
{
"phrase": "Isabion",
"replacement": "ایزابیان"
},
{
"phrase": "Meezan bank",
"replacement": "میزان بینک"
}
]
}curl --request POST \
--url https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"phraseReplacements": [
{
"phrase": "<string>",
"replacement": "<string>"
}
]
}
'import requests
url = "https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}"
payload = { "phraseReplacements": [
{
"phrase": "<string>",
"replacement": "<string>"
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}",
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([
'phraseReplacements' => [
[
'phrase' => '<string>',
'replacement' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}"
payload := strings.NewReader("{\n \"phraseReplacements\": [\n {\n \"phrase\": \"<string>\",\n \"replacement\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phraseReplacements\": [\n {\n \"phrase\": \"<string>\",\n \"replacement\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftai.org/v1/synthesis/phrase-replacement-config/{configId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phraseReplacements\": [\n {\n \"phrase\": \"<string>\",\n \"replacement\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"configId": "<string>",
"phraseReplacements": [
{
"phrase": "<string>",
"replacement": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "Rate limit exceeded, please try again later"
}Authorizations
API key with format "Bearer sk_api_..."
Path Parameters
ID of the configuration to update
Body
application/json
Request to create or update phrase replacement configuration
Array of phrase replacement rules
Maximum array length:
1000Show child attributes
Show child attributes
⌘I
