add_language
Offer a guide in another language, empty and not live.
/v1/guides/{productId}/languagesOnly when the creator asks for the guide in that language. Adds English, German, French or Italian (en, de, fr, it) to the languages the guide is offered in, never the language it is written in; canAdd in list_languages names what is left. The language starts with no translations and not live: buyers see nothing of it until it is turned live, by set_language_live when the creator asks you to or by the creator on the studio's Languages page. Adding a language the guide already has changes nothing and keeps its translations, so the call is safe to repeat. Returns the guide's languages as list_languages does. Then translate: list_untranslated_texts and save_translations in turn until remaining is 0. Refused with invalid_request for the language the guide is written in and for any other code.
curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/languages" \
-H "Authorization: Bearer $SCENIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lang": "de"
}'Path parameters
- productIdstring · guide idrequired
Id of the guide (a product of type map). From
list_guidesorcreate_guide.
Body parameters
- langstringrequired
The language to add: en (English), de (German), fr (French) or it (Italian), and not the one the guide is written in.
Returns
201 Created 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": false,
"translated": 0,
"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.
- 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.