Update a native project's settings
curl --request PATCH \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"translationContext": "<string>",
"targetLocales": [
"<string>"
],
"active": true
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
translationContext: '<string>',
targetLocales: ['<string>'],
active: true
})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}"
payload = {
"name": "<string>",
"description": "<string>",
"translationContext": "<string>",
"targetLocales": ["<string>"],
"active": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"translationContext\": \"<string>\",\n \"targetLocales\": [\n \"<string>\"\n ],\n \"active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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))
}{
"project": {
"id": "<string>",
"name": "<string>",
"identifier": "<string>",
"description": "<string>",
"source": "native",
"targetLocales": [
"<string>"
],
"active": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalProviderKind": "crowdin",
"externalProjectId": "<string>",
"sourceLocale": "<string>",
"externalProjectUrl": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Projects
Update a native project's settings
Requires projects:write, which files:write grants to admins, localization managers, and developers. Native projects only. targetLocales replaces the target list: tags are canonicalized (pt-br becomes pt-BR), duplicates are dropped, at most 50 are kept, and the source locale is rejected. active: false archives the project. Archived projects don’t count toward the workspace’s project limit and are hidden from the app’s project list. Only the API can restore them, with active: true, which needs a free project slot (403 workspace_resource_limit_reached otherwise).
PATCH
https://public-api.hyperlocalise.com
/
v1
/
projects
/
{projectId}
Update a native project's settings
curl --request PATCH \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"translationContext": "<string>",
"targetLocales": [
"<string>"
],
"active": true
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
translationContext: '<string>',
targetLocales: ['<string>'],
active: true
})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}"
payload = {
"name": "<string>",
"description": "<string>",
"translationContext": "<string>",
"targetLocales": ["<string>"],
"active": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"translationContext\": \"<string>\",\n \"targetLocales\": [\n \"<string>\"\n ],\n \"active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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))
}{
"project": {
"id": "<string>",
"name": "<string>",
"identifier": "<string>",
"description": "<string>",
"source": "native",
"targetLocales": [
"<string>"
],
"active": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalProviderKind": "crowdin",
"externalProjectId": "<string>",
"sourceLocale": "<string>",
"externalProjectUrl": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Body
application/json
Was this page helpful?

