set_language_live
Turn a language of a guide live for buyers, or off.
/v1/guides/{productId}/languages/{lang}Only when the creator asks you to make the language live, or to turn it off. live true puts the guide and its sales pages in front of buyers in this language at once: a reader whose app or browser is in it reads the guide in it, and every sales page is served in it at its own address. A text without a translation reads as the creator wrote it, so finish the translation first (remaining 0 in list_untranslated_texts) unless the creator says otherwise. live false takes the language away from buyers, who read the guide as written again, and keeps every translation and picture version. Like a translation, the switch sits outside the draft: no save_guide_changes and no publish_changes, and the write scope is enough. Setting the state a language already has changes nothing, so the call is safe to repeat. Returns the guide's languages as list_languages does. Refused with invalid_request for a language the guide is not offered in (add_language first), and with conflict for live true on a language that has no translation yet. Removing a language, which deletes its translations, stays with the creator on the studio's Languages page.
curl -X PATCH "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/languages/de" \
-H "Authorization: Bearer $SCENIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"live": true
}'Path parameters
- langstringrequired
The language to translate into: en (English), de (German), fr (French) or it (Italian), one the guide is offered in (
list_languages). - productIdstring · guide idrequired
Id of the guide (a product of type map). From
list_guidesorcreate_guide.
Body parameters
- livebooleanrequired
true makes the language live for buyers, false turns it off.
Returns
200 OK with GuideLanguages: The languages a guide is offered in and how far each is translated (list_languages, add_language).
- productIdstring · guide idrequired
The guide's id.
- originalstringrequired
The language the guide is written in, as a two-letter code (
update_guidelanguage). A guide is never offered as a translation into it. - totalnumberrequired
How many texts the guide has to translate: every text of the draft and of its sales pages, each once however often it is used. Archived spots, chapters, collections, hikes and properties are left out.
- languagesarray of objectsrequired
The languages the guide is offered in besides the one it is written in, English first, then German, French and Italian. Empty until one is added.
Show 4 fieldsHide fields
- langstringrequired
The language: en (English), de (German), fr (French) or it (Italian).
- livebooleanrequired
true when buyers can read the guide and its sales pages in this language.
set_language_liveturns it on or off, and so does the creator with Live on the studio's Languages page. While it is true, every translation saved shows to buyers at once. - translatednumberrequired
How many of the guide's texts have a translation in this language. Below total, texts are left:
list_untranslated_textsreturns them. It falls when the creator changes a text, which then has no translation until it is translated again. - updatedAtnumberrequired
When the language or one of its translations last changed (Unix time in milliseconds).
- canAddarray of stringsrequired
The languages
add_languagecan still add: en, de, fr and it without the one the guide is written in and the ones it has. - studioUrlstringrequired
The guide's Languages page in the studio, where the creator reviews the translations, turns Live on or off and removes a language.
{
"productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
"original": "en",
"total": 212,
"languages": [
{
"lang": "de",
"live": true,
"translated": 212,
"updatedAt": 1790673240000
}
],
"canAdd": [
"fr",
"it"
],
"studioUrl": "https://creators.sceniq.earth/products/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2?tab=languages"
}Errors
Every error is { error: { code, message } }. Act on the code.
- 400invalid_argumentA required field is missing, a field is unknown, or a value does not match its type (the Convex validator's path and value are in the message).
- 400invalid_requestA writer refused a value: a map link on a host that is not allowed, a title that is too long, a date that does not exist, too many items in a list. The message is the writer's own sentence.
- 401unauthenticatedThe request carries no key. Send it as Authorization: Bearer sk_sceniq_... (or X-Api-Key).
- 401invalid_api_keyThe key is unknown, revoked or expired.
- 403api_scope_requiredA read-only key called a write operation, or a key without the publish option called publish_changes.
- 403forbiddenThe key belongs to a creator account that is no longer active.
- 404not_foundThe id does not exist or belongs to another creator. The two answers are identical on purpose, so ids never reveal what exists.
- 409conflictThe request clashes with the row's current state. The message says what to change.
- 413payload_too_largeA JSON body over 2 MB, an image over 6 MB, a batch upload over 19 MB, or an MCP message over 2 MB.
- 429rate_limitedOver a limit: requests per key per minute, per creator per hour, uploads per key per minute, or check_links per guide per hour.
- 500internal_errorAn unexpected failure. The message is hidden on purpose.