Replace release languages
PUT
/api/organization/release-languagesAdministrator
By default every note is written in the Organization's output language. An administrator can choose up to five release note languages at the top of the Audiences page, or with PUT /api/organization/release-languages and {"targetLanguages": ["en", "vi"]}; every member can read them with GET. Tags are canonicalized and repeats dropped; an empty list, more than five, or an invalid tag returns 400 invalid_release_languages. Approving a release then writes one note per audience and language, so four audiences in English and Vietnamese make eight notes.
Request body
application/json
| Field | Type | Required | Notes |
|---|---|---|---|
targetLanguages | array of string | Required |
Response
Success: 200
| Field | Type | Required | Notes |
|---|---|---|---|
targetLanguages | array of string | Optional | |
outputLanguage | string | Optional | |
translationEnabled | boolean | Optional | |
updatedBy | string | Optional | |
updatedAt | string (date-time) | Optional | |
suggestions | array of OutputLanguageSettings.Option | Optional | |
suggestions[].tag | string | Optional | |
suggestions[].displayName | string | Optional |
Errors
| Status | Code | Applies to |
|---|---|---|
400 | validation_faileda field is missing or out of range | Any endpoint |
400 | malformed_requestthe body cannot be read | Any endpoint |
400 | invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUID | Any endpoint |
401 | authentication_requiredno session | Any endpoint |
403 | access_deniedan administrator endpoint, or a missing or stale CSRF token | Any endpoint |
404 | not_foundno such address | Any endpoint |
405 | method_not_allowedthe address does not take that method | Any endpoint |
415 | unsupported_media_typethe address does not read a body of that type | Any endpoint |
500 | internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind it | Any endpoint |
400 | template_invalid | Audiences area |
400 | template_narratives_path | Audiences area |
400 | template_language_not_targeted | Audiences area |
400 | invalid_release_languages | Audiences area |
404 | audience_not_found | Audiences area |
409 | audience_code_taken | Audiences area |
409 | audience_limit | Audiences area |
409 | audience_last | Audiences area |
409 | audience_last_active | Audiences area |
409 | audience_already_retired | Audiences area |
409 | audience_not_retired | Audiences area |
409 | audience_in_use | Audiences area |
409 | audience_not_preset | Audiences area |
404 | glossary_term_not_found | Glossary area |
409 | glossary_term_taken | Glossary area |
409 | glossary_limit | Glossary area |
400 | invalid_release_schedule | Releases area |
400 | invalid_upgrade_guide_url | Releases area |
400 | invalid_previous_release | Releases area |
400 | invalid_fold_decision | Releases area |
404 | release_not_found | Releases area |
404 | release_note_not_found | Releases area |
404 | folding_suggestion_not_found | Releases area |
404 | linked_issue_not_found | Releases area |
409 | release_status_conflict | Releases area |
409 | release_published | Releases area |
409 | release_empty | Releases area |
409 | release_review_incomplete | Releases area |
409 | change_summary_required | Releases area |
409 | release_version_taken | Releases area |
409 | classification_changed | Releases area |
409 | change_not_releasable | Releases area |
409 | change_excluded | Releases area |
409 | release_note_render_failed | Releases area |
409 | release_notes_missing | Releases area |
409 | translations_not_ready | Releases area |
409 | linked_issue_status_changed | Releases area |
Request
bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X PUT "http://localhost:8080/api/organization/release-languages" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"targetLanguages": [
"<string>"
]
}'
The request body is an example built from the schema; replace every placeholder.
Response
200Example
{
"targetLanguages": [
"<string>"
],
"outputLanguage": "<string>",
"translationEnabled": false,
"updatedBy": "<string>",
"updatedAt": "<date-time>",
"suggestions": [
{
"tag": "<string>",
"displayName": "<string>"
}
]
}