curl "https://api.phrase.com/v2/projects/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-F name=My%20Android%20Project \
-F main_format=yml \
-F shares_translation_memory=truephrase projects update \
--id <id> \
--data '{"name": "My Android Project", "main_format":"yml", "shares_translation_memory":true}' \
--access_token <token>import requests
url = "https://api.phrase.com/v2/projects/{id}"
payload = {
"account_id": "abcd1234",
"name": "My Android Project",
"point_of_contact": "abcd1234",
"main_format": "yml",
"media": "Python",
"shares_translation_memory": True,
"tm_ids": ["abcd1234cdef1234abcd1234cdef1234"],
"term_base_ids": ["abcd1234cdef1234abcd1234cdef1234"],
"project_image": "/path/to/my/project-screenshot.png",
"remove_project_image": False,
"workflow": "review",
"machine_translation_enabled": True,
"enable_branching": True,
"protect_master_branch": True,
"enable_all_data_type_translation_keys_for_translators": True,
"enable_icu_message_format": True,
"zero_plural_form_enabled": True,
"autotranslate_enabled": True,
"autotranslate_check_new_translation_keys": True,
"autotranslate_check_new_uploads": True,
"autotranslate_check_new_locales": True,
"autotranslate_mark_as_unverified": True,
"autotranslate_use_machine_translation": True,
"autotranslate_use_translation_memory": True,
"autotranslate_overwrite_unverified_translations": True,
"fallback_for_unverified_translations": False,
"default_encoding": "UTF-8",
"placeholder_styles": ["rails_i18n", "java_properties"],
"autocomplete_job_enabled": False,
"job_locking_enabled": False,
"smart_suggest_enabled": True,
"smart_suggest_use_glossary": True,
"smart_suggest_use_machine_translation": True,
"translation_keys_sort_collation": "unicode_ci",
"cldr_version": "legacy"
}
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({
account_id: 'abcd1234',
name: 'My Android Project',
point_of_contact: 'abcd1234',
main_format: 'yml',
media: 'Python',
shares_translation_memory: true,
tm_ids: ['abcd1234cdef1234abcd1234cdef1234'],
term_base_ids: ['abcd1234cdef1234abcd1234cdef1234'],
project_image: '/path/to/my/project-screenshot.png',
remove_project_image: false,
workflow: 'review',
machine_translation_enabled: true,
enable_branching: true,
protect_master_branch: true,
enable_all_data_type_translation_keys_for_translators: true,
enable_icu_message_format: true,
zero_plural_form_enabled: true,
autotranslate_enabled: true,
autotranslate_check_new_translation_keys: true,
autotranslate_check_new_uploads: true,
autotranslate_check_new_locales: true,
autotranslate_mark_as_unverified: true,
autotranslate_use_machine_translation: true,
autotranslate_use_translation_memory: true,
autotranslate_overwrite_unverified_translations: true,
fallback_for_unverified_translations: false,
default_encoding: 'UTF-8',
placeholder_styles: ['rails_i18n', 'java_properties'],
autocomplete_job_enabled: false,
job_locking_enabled: false,
smart_suggest_enabled: true,
smart_suggest_use_glossary: true,
smart_suggest_use_machine_translation: true,
translation_keys_sort_collation: 'unicode_ci',
cldr_version: 'legacy'
})
};
fetch('https://api.phrase.com/v2/projects/{id}', 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/{id}",
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([
'account_id' => 'abcd1234',
'name' => 'My Android Project',
'point_of_contact' => 'abcd1234',
'main_format' => 'yml',
'media' => 'Python',
'shares_translation_memory' => true,
'tm_ids' => [
'abcd1234cdef1234abcd1234cdef1234'
],
'term_base_ids' => [
'abcd1234cdef1234abcd1234cdef1234'
],
'project_image' => '/path/to/my/project-screenshot.png',
'remove_project_image' => false,
'workflow' => 'review',
'machine_translation_enabled' => true,
'enable_branching' => true,
'protect_master_branch' => true,
'enable_all_data_type_translation_keys_for_translators' => true,
'enable_icu_message_format' => true,
'zero_plural_form_enabled' => true,
'autotranslate_enabled' => true,
'autotranslate_check_new_translation_keys' => true,
'autotranslate_check_new_uploads' => true,
'autotranslate_check_new_locales' => true,
'autotranslate_mark_as_unverified' => true,
'autotranslate_use_machine_translation' => true,
'autotranslate_use_translation_memory' => true,
'autotranslate_overwrite_unverified_translations' => true,
'fallback_for_unverified_translations' => false,
'default_encoding' => 'UTF-8',
'placeholder_styles' => [
'rails_i18n',
'java_properties'
],
'autocomplete_job_enabled' => false,
'job_locking_enabled' => false,
'smart_suggest_enabled' => true,
'smart_suggest_use_glossary' => true,
'smart_suggest_use_machine_translation' => true,
'translation_keys_sort_collation' => 'unicode_ci',
'cldr_version' => 'legacy'
]),
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/{id}"
payload := strings.NewReader("{\n \"account_id\": \"abcd1234\",\n \"name\": \"My Android Project\",\n \"point_of_contact\": \"abcd1234\",\n \"main_format\": \"yml\",\n \"media\": \"Python\",\n \"shares_translation_memory\": true,\n \"tm_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"term_base_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"project_image\": \"/path/to/my/project-screenshot.png\",\n \"remove_project_image\": false,\n \"workflow\": \"review\",\n \"machine_translation_enabled\": true,\n \"enable_branching\": true,\n \"protect_master_branch\": true,\n \"enable_all_data_type_translation_keys_for_translators\": true,\n \"enable_icu_message_format\": true,\n \"zero_plural_form_enabled\": true,\n \"autotranslate_enabled\": true,\n \"autotranslate_check_new_translation_keys\": true,\n \"autotranslate_check_new_uploads\": true,\n \"autotranslate_check_new_locales\": true,\n \"autotranslate_mark_as_unverified\": true,\n \"autotranslate_use_machine_translation\": true,\n \"autotranslate_use_translation_memory\": true,\n \"autotranslate_overwrite_unverified_translations\": true,\n \"fallback_for_unverified_translations\": false,\n \"default_encoding\": \"UTF-8\",\n \"placeholder_styles\": [\n \"rails_i18n\",\n \"java_properties\"\n ],\n \"autocomplete_job_enabled\": false,\n \"job_locking_enabled\": false,\n \"smart_suggest_enabled\": true,\n \"smart_suggest_use_glossary\": true,\n \"smart_suggest_use_machine_translation\": true,\n \"translation_keys_sort_collation\": \"unicode_ci\",\n \"cldr_version\": \"legacy\"\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/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"abcd1234\",\n \"name\": \"My Android Project\",\n \"point_of_contact\": \"abcd1234\",\n \"main_format\": \"yml\",\n \"media\": \"Python\",\n \"shares_translation_memory\": true,\n \"tm_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"term_base_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"project_image\": \"/path/to/my/project-screenshot.png\",\n \"remove_project_image\": false,\n \"workflow\": \"review\",\n \"machine_translation_enabled\": true,\n \"enable_branching\": true,\n \"protect_master_branch\": true,\n \"enable_all_data_type_translation_keys_for_translators\": true,\n \"enable_icu_message_format\": true,\n \"zero_plural_form_enabled\": true,\n \"autotranslate_enabled\": true,\n \"autotranslate_check_new_translation_keys\": true,\n \"autotranslate_check_new_uploads\": true,\n \"autotranslate_check_new_locales\": true,\n \"autotranslate_mark_as_unverified\": true,\n \"autotranslate_use_machine_translation\": true,\n \"autotranslate_use_translation_memory\": true,\n \"autotranslate_overwrite_unverified_translations\": true,\n \"fallback_for_unverified_translations\": false,\n \"default_encoding\": \"UTF-8\",\n \"placeholder_styles\": [\n \"rails_i18n\",\n \"java_properties\"\n ],\n \"autocomplete_job_enabled\": false,\n \"job_locking_enabled\": false,\n \"smart_suggest_enabled\": true,\n \"smart_suggest_use_glossary\": true,\n \"smart_suggest_use_machine_translation\": true,\n \"translation_keys_sort_collation\": \"unicode_ci\",\n \"cldr_version\": \"legacy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.phrase.com/v2/projects/{id}")
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 \"account_id\": \"abcd1234\",\n \"name\": \"My Android Project\",\n \"point_of_contact\": \"abcd1234\",\n \"main_format\": \"yml\",\n \"media\": \"Python\",\n \"shares_translation_memory\": true,\n \"tm_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"term_base_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"project_image\": \"/path/to/my/project-screenshot.png\",\n \"remove_project_image\": false,\n \"workflow\": \"review\",\n \"machine_translation_enabled\": true,\n \"enable_branching\": true,\n \"protect_master_branch\": true,\n \"enable_all_data_type_translation_keys_for_translators\": true,\n \"enable_icu_message_format\": true,\n \"zero_plural_form_enabled\": true,\n \"autotranslate_enabled\": true,\n \"autotranslate_check_new_translation_keys\": true,\n \"autotranslate_check_new_uploads\": true,\n \"autotranslate_check_new_locales\": true,\n \"autotranslate_mark_as_unverified\": true,\n \"autotranslate_use_machine_translation\": true,\n \"autotranslate_use_translation_memory\": true,\n \"autotranslate_overwrite_unverified_translations\": true,\n \"fallback_for_unverified_translations\": false,\n \"default_encoding\": \"UTF-8\",\n \"placeholder_styles\": [\n \"rails_i18n\",\n \"java_properties\"\n ],\n \"autocomplete_job_enabled\": false,\n \"job_locking_enabled\": false,\n \"smart_suggest_enabled\": true,\n \"smart_suggest_use_glossary\": true,\n \"smart_suggest_use_machine_translation\": true,\n \"translation_keys_sort_collation\": \"unicode_ci\",\n \"cldr_version\": \"legacy\"\n}"
response = http.request(request)
puts response.read_body{
"id": "abcd1234cdef1234abcd1234cdef1234",
"name": "My Android Project",
"slug": "my-android-project",
"main_format": "xml",
"project_image_url": "http://assets.example.com/project.png",
"account": "account",
"space": "space",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z",
"shares_translation_memory": true,
"machine_translation_enabled": true,
"zero_plural_form_enabled": true,
"enable_all_data_type_translation_keys_for_translators": false,
"enable_icu_message_format": false,
"enable_branching": false,
"protect_master_branch": false,
"autotranslate_enabled": false,
"autotranslate_check_new_translation_keys": false,
"autotranslate_check_new_uploads": false,
"autotranslate_check_new_locales": false,
"autotranslate_mark_as_unverified": false,
"autotranslate_use_machine_translation": false,
"autotranslate_use_translation_memory": true,
"autotranslate_overwrite_unverified_translations": false,
"fallback_for_unverified_translations": false,
"autocomplete_job_enabled": false,
"default_encoding": "UTF-8",
"cldr_version": "legacy",
"translation_keys_sort_collation": "unicode_ci",
"job_locking_enabled": false,
"placeholder_styles": [
"rails_i18n",
"java_properties"
]
}{
"message": "Validation Failed",
"errors": [
{
"resource": "Resource",
"field": "name",
"message": "can't be blank"
}
]
}Update a project
Update an existing project, including its review workflow, pre-translation/autotranslate rules, and machine-translation configuration (see workflow, machine_translation_enabled, and the autotranslate_* fields below).
curl "https://api.phrase.com/v2/projects/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-F name=My%20Android%20Project \
-F main_format=yml \
-F shares_translation_memory=truephrase projects update \
--id <id> \
--data '{"name": "My Android Project", "main_format":"yml", "shares_translation_memory":true}' \
--access_token <token>import requests
url = "https://api.phrase.com/v2/projects/{id}"
payload = {
"account_id": "abcd1234",
"name": "My Android Project",
"point_of_contact": "abcd1234",
"main_format": "yml",
"media": "Python",
"shares_translation_memory": True,
"tm_ids": ["abcd1234cdef1234abcd1234cdef1234"],
"term_base_ids": ["abcd1234cdef1234abcd1234cdef1234"],
"project_image": "/path/to/my/project-screenshot.png",
"remove_project_image": False,
"workflow": "review",
"machine_translation_enabled": True,
"enable_branching": True,
"protect_master_branch": True,
"enable_all_data_type_translation_keys_for_translators": True,
"enable_icu_message_format": True,
"zero_plural_form_enabled": True,
"autotranslate_enabled": True,
"autotranslate_check_new_translation_keys": True,
"autotranslate_check_new_uploads": True,
"autotranslate_check_new_locales": True,
"autotranslate_mark_as_unverified": True,
"autotranslate_use_machine_translation": True,
"autotranslate_use_translation_memory": True,
"autotranslate_overwrite_unverified_translations": True,
"fallback_for_unverified_translations": False,
"default_encoding": "UTF-8",
"placeholder_styles": ["rails_i18n", "java_properties"],
"autocomplete_job_enabled": False,
"job_locking_enabled": False,
"smart_suggest_enabled": True,
"smart_suggest_use_glossary": True,
"smart_suggest_use_machine_translation": True,
"translation_keys_sort_collation": "unicode_ci",
"cldr_version": "legacy"
}
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({
account_id: 'abcd1234',
name: 'My Android Project',
point_of_contact: 'abcd1234',
main_format: 'yml',
media: 'Python',
shares_translation_memory: true,
tm_ids: ['abcd1234cdef1234abcd1234cdef1234'],
term_base_ids: ['abcd1234cdef1234abcd1234cdef1234'],
project_image: '/path/to/my/project-screenshot.png',
remove_project_image: false,
workflow: 'review',
machine_translation_enabled: true,
enable_branching: true,
protect_master_branch: true,
enable_all_data_type_translation_keys_for_translators: true,
enable_icu_message_format: true,
zero_plural_form_enabled: true,
autotranslate_enabled: true,
autotranslate_check_new_translation_keys: true,
autotranslate_check_new_uploads: true,
autotranslate_check_new_locales: true,
autotranslate_mark_as_unverified: true,
autotranslate_use_machine_translation: true,
autotranslate_use_translation_memory: true,
autotranslate_overwrite_unverified_translations: true,
fallback_for_unverified_translations: false,
default_encoding: 'UTF-8',
placeholder_styles: ['rails_i18n', 'java_properties'],
autocomplete_job_enabled: false,
job_locking_enabled: false,
smart_suggest_enabled: true,
smart_suggest_use_glossary: true,
smart_suggest_use_machine_translation: true,
translation_keys_sort_collation: 'unicode_ci',
cldr_version: 'legacy'
})
};
fetch('https://api.phrase.com/v2/projects/{id}', 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/{id}",
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([
'account_id' => 'abcd1234',
'name' => 'My Android Project',
'point_of_contact' => 'abcd1234',
'main_format' => 'yml',
'media' => 'Python',
'shares_translation_memory' => true,
'tm_ids' => [
'abcd1234cdef1234abcd1234cdef1234'
],
'term_base_ids' => [
'abcd1234cdef1234abcd1234cdef1234'
],
'project_image' => '/path/to/my/project-screenshot.png',
'remove_project_image' => false,
'workflow' => 'review',
'machine_translation_enabled' => true,
'enable_branching' => true,
'protect_master_branch' => true,
'enable_all_data_type_translation_keys_for_translators' => true,
'enable_icu_message_format' => true,
'zero_plural_form_enabled' => true,
'autotranslate_enabled' => true,
'autotranslate_check_new_translation_keys' => true,
'autotranslate_check_new_uploads' => true,
'autotranslate_check_new_locales' => true,
'autotranslate_mark_as_unverified' => true,
'autotranslate_use_machine_translation' => true,
'autotranslate_use_translation_memory' => true,
'autotranslate_overwrite_unverified_translations' => true,
'fallback_for_unverified_translations' => false,
'default_encoding' => 'UTF-8',
'placeholder_styles' => [
'rails_i18n',
'java_properties'
],
'autocomplete_job_enabled' => false,
'job_locking_enabled' => false,
'smart_suggest_enabled' => true,
'smart_suggest_use_glossary' => true,
'smart_suggest_use_machine_translation' => true,
'translation_keys_sort_collation' => 'unicode_ci',
'cldr_version' => 'legacy'
]),
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/{id}"
payload := strings.NewReader("{\n \"account_id\": \"abcd1234\",\n \"name\": \"My Android Project\",\n \"point_of_contact\": \"abcd1234\",\n \"main_format\": \"yml\",\n \"media\": \"Python\",\n \"shares_translation_memory\": true,\n \"tm_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"term_base_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"project_image\": \"/path/to/my/project-screenshot.png\",\n \"remove_project_image\": false,\n \"workflow\": \"review\",\n \"machine_translation_enabled\": true,\n \"enable_branching\": true,\n \"protect_master_branch\": true,\n \"enable_all_data_type_translation_keys_for_translators\": true,\n \"enable_icu_message_format\": true,\n \"zero_plural_form_enabled\": true,\n \"autotranslate_enabled\": true,\n \"autotranslate_check_new_translation_keys\": true,\n \"autotranslate_check_new_uploads\": true,\n \"autotranslate_check_new_locales\": true,\n \"autotranslate_mark_as_unverified\": true,\n \"autotranslate_use_machine_translation\": true,\n \"autotranslate_use_translation_memory\": true,\n \"autotranslate_overwrite_unverified_translations\": true,\n \"fallback_for_unverified_translations\": false,\n \"default_encoding\": \"UTF-8\",\n \"placeholder_styles\": [\n \"rails_i18n\",\n \"java_properties\"\n ],\n \"autocomplete_job_enabled\": false,\n \"job_locking_enabled\": false,\n \"smart_suggest_enabled\": true,\n \"smart_suggest_use_glossary\": true,\n \"smart_suggest_use_machine_translation\": true,\n \"translation_keys_sort_collation\": \"unicode_ci\",\n \"cldr_version\": \"legacy\"\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/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"abcd1234\",\n \"name\": \"My Android Project\",\n \"point_of_contact\": \"abcd1234\",\n \"main_format\": \"yml\",\n \"media\": \"Python\",\n \"shares_translation_memory\": true,\n \"tm_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"term_base_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"project_image\": \"/path/to/my/project-screenshot.png\",\n \"remove_project_image\": false,\n \"workflow\": \"review\",\n \"machine_translation_enabled\": true,\n \"enable_branching\": true,\n \"protect_master_branch\": true,\n \"enable_all_data_type_translation_keys_for_translators\": true,\n \"enable_icu_message_format\": true,\n \"zero_plural_form_enabled\": true,\n \"autotranslate_enabled\": true,\n \"autotranslate_check_new_translation_keys\": true,\n \"autotranslate_check_new_uploads\": true,\n \"autotranslate_check_new_locales\": true,\n \"autotranslate_mark_as_unverified\": true,\n \"autotranslate_use_machine_translation\": true,\n \"autotranslate_use_translation_memory\": true,\n \"autotranslate_overwrite_unverified_translations\": true,\n \"fallback_for_unverified_translations\": false,\n \"default_encoding\": \"UTF-8\",\n \"placeholder_styles\": [\n \"rails_i18n\",\n \"java_properties\"\n ],\n \"autocomplete_job_enabled\": false,\n \"job_locking_enabled\": false,\n \"smart_suggest_enabled\": true,\n \"smart_suggest_use_glossary\": true,\n \"smart_suggest_use_machine_translation\": true,\n \"translation_keys_sort_collation\": \"unicode_ci\",\n \"cldr_version\": \"legacy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.phrase.com/v2/projects/{id}")
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 \"account_id\": \"abcd1234\",\n \"name\": \"My Android Project\",\n \"point_of_contact\": \"abcd1234\",\n \"main_format\": \"yml\",\n \"media\": \"Python\",\n \"shares_translation_memory\": true,\n \"tm_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"term_base_ids\": [\n \"abcd1234cdef1234abcd1234cdef1234\"\n ],\n \"project_image\": \"/path/to/my/project-screenshot.png\",\n \"remove_project_image\": false,\n \"workflow\": \"review\",\n \"machine_translation_enabled\": true,\n \"enable_branching\": true,\n \"protect_master_branch\": true,\n \"enable_all_data_type_translation_keys_for_translators\": true,\n \"enable_icu_message_format\": true,\n \"zero_plural_form_enabled\": true,\n \"autotranslate_enabled\": true,\n \"autotranslate_check_new_translation_keys\": true,\n \"autotranslate_check_new_uploads\": true,\n \"autotranslate_check_new_locales\": true,\n \"autotranslate_mark_as_unverified\": true,\n \"autotranslate_use_machine_translation\": true,\n \"autotranslate_use_translation_memory\": true,\n \"autotranslate_overwrite_unverified_translations\": true,\n \"fallback_for_unverified_translations\": false,\n \"default_encoding\": \"UTF-8\",\n \"placeholder_styles\": [\n \"rails_i18n\",\n \"java_properties\"\n ],\n \"autocomplete_job_enabled\": false,\n \"job_locking_enabled\": false,\n \"smart_suggest_enabled\": true,\n \"smart_suggest_use_glossary\": true,\n \"smart_suggest_use_machine_translation\": true,\n \"translation_keys_sort_collation\": \"unicode_ci\",\n \"cldr_version\": \"legacy\"\n}"
response = http.request(request)
puts response.read_body{
"id": "abcd1234cdef1234abcd1234cdef1234",
"name": "My Android Project",
"slug": "my-android-project",
"main_format": "xml",
"project_image_url": "http://assets.example.com/project.png",
"account": "account",
"space": "space",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z",
"shares_translation_memory": true,
"machine_translation_enabled": true,
"zero_plural_form_enabled": true,
"enable_all_data_type_translation_keys_for_translators": false,
"enable_icu_message_format": false,
"enable_branching": false,
"protect_master_branch": false,
"autotranslate_enabled": false,
"autotranslate_check_new_translation_keys": false,
"autotranslate_check_new_uploads": false,
"autotranslate_check_new_locales": false,
"autotranslate_mark_as_unverified": false,
"autotranslate_use_machine_translation": false,
"autotranslate_use_translation_memory": true,
"autotranslate_overwrite_unverified_translations": false,
"fallback_for_unverified_translations": false,
"autocomplete_job_enabled": false,
"default_encoding": "UTF-8",
"cldr_version": "legacy",
"translation_keys_sort_collation": "unicode_ci",
"job_locking_enabled": false,
"placeholder_styles": [
"rails_i18n",
"java_properties"
]
}{
"message": "Validation Failed",
"errors": [
{
"resource": "Resource",
"field": "name",
"message": "can't be blank"
}
]
}Authorizations
Enter your token in the format token TOKEN
Headers
Two-Factor-Authentication token (optional)
Path Parameters
ID
Body
(Optional) ID of an account the requesting user belongs to. Used only to disambiguate the request context; the project itself cannot be moved between accounts through this endpoint.
"abcd1234"
(Optional) Name of the project
"My Android Project"
(Optional) User ID of the point of contact for the project. Pass null to unset.
"abcd1234"
(Optional) Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see Format Guide or our Formats API Endpoint.
"yml"
(Optional) Main technology stack used in the project. It affects for example the suggested placeholder style. Predefined values include: Ruby, JavaScript, AngularJS, React, iOS, Android, Python, PHP, Java, Go, Windows Phone, Rails, Node.js, .NET, Django, Symfony, Yii Framework, Zend Framework, Apple App Store Description, Google Play Description, but it can also take any other value.
"Python"
(Optional) Indicates whether the project should share the account's translation memory
true
List of TMS translation memory IDs, used to provide reference translations for the AI translation agent.
["abcd1234cdef1234abcd1234cdef1234"]
List of TMS term base IDs, used to ensure consistent terminology for the AI translation agent.
["abcd1234cdef1234abcd1234cdef1234"]
(Optional) Image to identify the project
(Optional) Indicates whether the project image should be deleted.
false
(Optional) Enable machine translation support in the project. Required for Pre-Translation
true
(Optional) Enable branching in the project
true
(Optional) Protect the master branch in project where branching is enabled
true
(Optional) Otherwise, translators are not allowed to edit translations other than strings
true
(Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) Requires autotranslate_enabled to be true
true
(Optional) When enabled, the fallback locale's translation is used on export for unverified translations in addition to empty ones. Requires a fallback locale to be configured on the locale.
false
(Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the file_encoding parameter for Uploads.
UTF-8, UTF-16, UTF-16BE, UTF-16LE, ISO-8859-1 "UTF-8"
(Optional) List of placeholder styles enabled for the project.
Placeholder style supported for detecting and highlighting variable placeholders in translation keys. This list may grow over time as new styles are added.
["rails_i18n", "java_properties"]
(Optional) Enable autocomplete-job behavior so that newly created keys and locales are automatically added to in-progress jobs.
false
(Optional) When enabled, translations are locked once a job moves into review.
false
(Optional) Enable Smart Suggest for the project.
true
(Optional) Allow Smart Suggest to source suggestions from the project glossary.
true
(Optional) Allow Smart Suggest to source suggestions from machine translation.
true
(Optional) Collation used when sorting translation keys alphabetically.
general_ci, unicode_ci "unicode_ci"
(Optional) CLDR plural-rule version used by the project. Pass legacy for pre-CLDR pluralization behaviour, or a CLDR version string such as cldr48. Also used as the default version for the ICU skeleton endpoint (POST /icu/skeleton) when its own cldr_version parameter is omitted.
"legacy"
Response
OK
Show child attributes
Show child attributes
{
"id": "abcd1234",
"name": "Company Account",
"slug": "company_account",
"company": "My Awesome Company",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z",
"company_logo_url": "http://assets.example.com/company_logo.png"
}
Show child attributes
Show child attributes
{
"id": "2e7574e8f2372906a03110c2a7cfe671",
"name": "My first space",
"created_at": "2020-02-25T12:17:25Z",
"updated_at": "2020-03-13T14:46:57Z",
"projects_count": 2
}
Show child attributes
Show child attributes
{
"id": "abcd1234cdef1234abcd1234cdef1234",
"username": "johndoe",
"name": "John Doe",
"gravatar_uid": "205e460b479e2e5b48aec07710c08d50"
}
true
true
false
false
false
false
false
false
false
false
false
false
true
false
false
false
"UTF-8"
"legacy"
general_ci, unicode_ci "unicode_ci"
false
Placeholder style supported for detecting and highlighting variable placeholders in translation keys. This list may grow over time as new styles are added.
["rails_i18n", "java_properties"]
Show child attributes
Show child attributes
{
"name": "new-branch",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z",
"merged_at": "2015-01-28T09:52:53Z",
"merged_by": {
"id": "abcd1234cdef1234abcd1234cdef1234",
"username": "joe.doe",
"name": "Joe Doe"
},
"created_by": {
"id": "abcd1234cdef1234abcd1234cdef1234",
"username": "joe.doe",
"name": "Joe Doe"
},
"state": "success",
"child_branches": ["feature_2", "feature_3"]
}
Was this page helpful?