cURL
curl "https://api.phrase.com/v2/projects/:project_id/translations/unreview" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch","q":"PhraseApp*%reviewed:false%20tags:feature,center"}' \
-H 'Content-Type: application/json'phrase translations unreview-collection \
--project_id <project_id> \
--data '{"branch":"my-feature-branch", "q":"'PhraseApp*%reviewed:false%20tags:feature,center'"}' \
--access_token <token>import requests
url = "https://api.phrase.com/v2/projects/{project_id}/translations/unreview"
payload = {
"branch": "my-feature-branch",
"q": "PhraseApp*%reviewed:true%20tags:feature,center"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
branch: 'my-feature-branch',
q: 'PhraseApp*%reviewed:true%20tags:feature,center'
})
};
fetch('https://api.phrase.com/v2/projects/{project_id}/translations/unreview', 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.phrase.com/v2/projects/{project_id}/translations/unreview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'branch' => 'my-feature-branch',
'q' => 'PhraseApp*%reviewed:true%20tags:feature,center'
]),
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.phrase.com/v2/projects/{project_id}/translations/unreview"
payload := strings.NewReader("{\n \"branch\": \"my-feature-branch\",\n \"q\": \"PhraseApp*%reviewed:true%20tags:feature,center\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.phrase.com/v2/projects/{project_id}/translations/unreview")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branch\": \"my-feature-branch\",\n \"q\": \"PhraseApp*%reviewed:true%20tags:feature,center\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.phrase.com/v2/projects/{project_id}/translations/unreview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch\": \"my-feature-branch\",\n \"q\": \"PhraseApp*%reviewed:true%20tags:feature,center\"\n}"
response = http.request(request)
puts response.read_body{
"records_affected": 96
}{
"message": "Validation Failed",
"errors": [
{
"resource": "Resource",
"field": "name",
"message": "can't be blank"
}
]
}Translations
Unreview translations selected by query
Unreview translations matching query.
PATCH
/
projects
/
{project_id}
/
translations
/
unreview
cURL
curl "https://api.phrase.com/v2/projects/:project_id/translations/unreview" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch","q":"PhraseApp*%reviewed:false%20tags:feature,center"}' \
-H 'Content-Type: application/json'phrase translations unreview-collection \
--project_id <project_id> \
--data '{"branch":"my-feature-branch", "q":"'PhraseApp*%reviewed:false%20tags:feature,center'"}' \
--access_token <token>import requests
url = "https://api.phrase.com/v2/projects/{project_id}/translations/unreview"
payload = {
"branch": "my-feature-branch",
"q": "PhraseApp*%reviewed:true%20tags:feature,center"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
branch: 'my-feature-branch',
q: 'PhraseApp*%reviewed:true%20tags:feature,center'
})
};
fetch('https://api.phrase.com/v2/projects/{project_id}/translations/unreview', 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.phrase.com/v2/projects/{project_id}/translations/unreview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'branch' => 'my-feature-branch',
'q' => 'PhraseApp*%reviewed:true%20tags:feature,center'
]),
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.phrase.com/v2/projects/{project_id}/translations/unreview"
payload := strings.NewReader("{\n \"branch\": \"my-feature-branch\",\n \"q\": \"PhraseApp*%reviewed:true%20tags:feature,center\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.phrase.com/v2/projects/{project_id}/translations/unreview")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branch\": \"my-feature-branch\",\n \"q\": \"PhraseApp*%reviewed:true%20tags:feature,center\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.phrase.com/v2/projects/{project_id}/translations/unreview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch\": \"my-feature-branch\",\n \"q\": \"PhraseApp*%reviewed:true%20tags:feature,center\"\n}"
response = http.request(request)
puts response.read_body{
"records_affected": 96
}{
"message": "Validation Failed",
"errors": [
{
"resource": "Resource",
"field": "name",
"message": "can't be blank"
}
]
}Authorizations
TokenBasic
Enter your token in the format token TOKEN
Headers
Two-Factor-Authentication token (optional)
Path Parameters
Project ID
Body
application/json
specify the branch to use
Example:
"my-feature-branch"
Specify a query to find translations by content (including wildcards).
Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).
The following qualifiers are supported in the query:
id:translation_id,...for queries on a comma-separated list of idstags:XYZfor tags on the translationunverified:{true|false}for verification statusexcluded:{true|false}for exclusion statusupdated_at:{>=|<=}2013-02-21T00:00:00Zfor date range queries
Find more examples here.
Example:
"PhraseApp*%reviewed:true%20tags:feature,center"
Response
OK
Was this page helpful?
⌘I