Tenant/Product
Add languages to a product
Adds languages to the product; never removes one. Ids the product already has and duplicates are ignored (a call that adds nothing writes nothing). Each added language must exist and belong to the workspace's language set, and the workspace's distinct target-language set must stay within `max_languages`. Allowed to whoever may update the product, and to the Administrator of the product's workspace who has access to the product.
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
uid*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/v2/products/7c6c2c68-2def-421a-b4d0-107351f13049/languages" \ -H "Content-Type: application/json" \ -d '{ "languageIds": [ 2, 3 ] }'{ "id": "7c6c2c68-2def-421a-b4d0-107351f13049", "languages": [ 1, 2, 3 ], "addedLanguages": [ 3 ]}Empty
{ "message": { "error": "Your request was made with invalid credentials." }}{ "message": { "error": "You are not allowed to perform this action." }}Empty
Empty