Skip to contentDevelopersPrezly website
Newsroom languages

Update Newsroom Language Settings

Update locale settings or deliberately migrate a language code.

Personal token scopes: sites:write. Your account must also have access to the requested data. Authentication

Changing code can overwrite destination company information and move stories. A force query parameter bypasses conflict confirmation whenever present, even force=false.

Read the guide

PATCH
/newsrooms/{newsroom_id}/languages/{locale}

Changing code migrates linked stories, replaces destination company information with source settings, and moves the default language when necessary. HTTP 409 (code unsafe) asks for confirmation when stories or destination settings would be affected. The presence of ?force bypasses that conflict check, including ?force=false. Read the conflicts before forcing.

Personal access tokens: sites:write. Every listed scope is required; the token owner's permissions, feature availability and newsroom access still apply.

Authorization

API_key
headerAuthorizationBearer <token>

Bearer authentication using an integration API key, or a personal access token only where the operation explicitly supports it. Every listed personal-token scope is required; owner permissions and newsroom access still apply.

Path Parameters

newsroom_id*string

Newsroom UUID or ID

Length1 <= length
locale*string

Language code (ISO 639-1 or ISO 639-2), with optional script designator (ISO 15924) and optional region code (ISO 3166-1).

Length2 <= length

Query Parameters

force?boolean

Presence bypasses migration conflict checks, regardless of the value (including false).

Request Body

Updating language settings

This endpoing follows the PATCH API semantics: all the request body properties are optional, all the updates are partial.

Making language default

To make a language default, send { "is_default": true } within request body.

The is_default property only accepts true as a value.

Switching newsroom language

A newsroom language can be "switched" (or "moved") to a different language code, preserving newsroom Company Information and also updating all linked stories.

To do so, pass new code within request body. It will try to move newsroom language "safely" (if there are no stories linked and there is nothing that will be overwritten). Otherwise, it'll throw a 409 error response, with "code": "unsafe". You can still force the operation by passing ?force within request URL.

application/json
  1. body
is_default?boolean

Can only be set to true.

code?LocaleCode

Language code (ISO 639-1 or ISO 639-2), with optional script designator (ISO 15924) and optional region code (ISO 3166-1).

Match[a-z]{2,3}(_[A-Z][a-z]{3})?(_[A-Z]{2})?
Length2 <= length
company_information?

Payload to update Newsroom Company Information

Response Body

OK

application/json
  1. response
language?
Example Request
curl -X PATCH 'https://api.prezly.com/v2/newsrooms/string/languages/nl_BE' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "language": {    "code": "en",    "locale": {      "code": "en",      "name": "string",      "direction": "ltr",      "language_code": "en",      "native_name": "string"    },    "is_default": true,    "stories_count": 0,    "categories_count": 0,    "company_information": {      "name": "string",      "about": "string",      "email": "user@example.com",      "website": "http://example.com",      "phone": "string",      "address": "string",      "twitter": "string",      "facebook": "string",      "linkedin": "string",      "pinterest": "string",      "youtube": "string",      "instagram": "string",      "tiktok": "string",      "discord": "string",      "skype": "string",      "snapchat": "string",      "twitch": "string",      "email_disclaimer": "string",      "cookie_statement": "string",      "subscribe_disclaimer": "string"    },    "public_stories_count": 0,    "default_email_disclaimer": "string",    "default_cookie_statement": "string",    "default_subscribe_disclaimer": "string"  }}