Skip to Content
Workspace

Replace the workspace language set

Replaces the workspace language set. Every product and tenant of the workspace may use a SUBSET of this set and never anything outside it, so adding a language here is the prerequisite for using it anywhere below. This is a PUT: any language absent from the posted list is REMOVED. A removal is refused with 409 `workspaceLanguages` while translations exist for that language — counted across BOTH layers, the platform defaults (`source_story`) and the tenant overrides (`translation`) — and the message names the counts. Removing a language with no translations is allowed. Growing the set is refused with 409 `planLimit` when it would exceed the plan's `max_languages`; a set that already sits above the cap can still be re-saved, swapped and shrunk. Accessible by super roles for any workspace, and by a Workspace Administrator of this one.

PUT
/api/v2/workspaces/{id}/languages

Authorization

BearerAuthObject
AuthorizationBearer <token>

Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.

In: header

Path Parameters

id*string

Workspace UUID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v2/workspaces/019fc817-0b94-7112-a578-66500eeec781/languages" \  -H "Content-Type: application/json" \  -d '{    "languageIds": [      1,      5,      12    ]  }'
{  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "languageIds": [    1,    5,    12  ],  "addedLanguageIds": [    12  ],  "removedLanguageIds": []}