publish_guide
Put a draft or archived guide on sale.
/v1/guides/{productId}/go-liveOnly when the creator asks you to put the guide on sale, and only after get_guide_readiness shows no blocking items. Needs a key with the publish option (403 api_scope_required otherwise). The guide's first publish, the studio's Publish guide: it runs every publish gate (the agreement, live spots each with a pin and a photo, a price unless it is free), goes on sale at once, and builds the version buyers read; the main sales page goes live with it when it can, unless salesPage is false. It does not list the guide in the store: request_store_listing asks for review when the creator wants that. Refused with 409 not_publishable and the blocking list while a gate is open, 409 conflict for a guide already live (publish_changes publishes its changes). Then poll get_publish_status until pendingSince is null.
curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/go-live" \
-H "Authorization: Bearer $SCENIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Path parameters
- productIdstring · guide idrequired
Id of the guide (a product of type map). From
list_guidesorcreate_guide.
Body parameters
- salesPagebooleanoptional
false puts the guide on sale without its main sales page; its link then opens the guide's page in the web app until a sales page is published. Absent or true: the main page goes live with it when it can. A page already live stays live.
Returns
200 OK with PublishStatus: What buyers see and what a publish would do.
- productIdstring · guide idrequired
The guide's id.
- namestringrequired
The guide's title.
- statusstringrequired
draft, published or archived.
draftpublishedarchived - livebooleanrequired
true when the guide is on sale.
- publishedobject or nullrequired
What buyers see, or null before the first build.
Show 2 fieldsHide fields
- publishedAtnumberrequired
When the live version went live (Unix time in milliseconds).
- versionnumber or nullrequired
The live version's number.
- hasUnpublishedChangesbooleanrequired
true when the draft holds changes buyers do not see yet.
- lastEditAtnumber or nullrequired
When the draft last changed.
- pendingSincenumber or nullrequired
When a publish started building; null when none is running.
- savedobject or nullrequired
The guide's save: the content as last kept with Save changes in the studio or
save_guide_changes, which Preview and draft testers read anddiscard_guide_changesgoes back to. null before the first save.Show 1 fieldHide fields
- savedAtnumberrequired
When the save was made (Unix time in milliseconds).
- hasUnsavedChangesbooleanrequired
true when the draft holds changes the save does not (false before the first save).
- savePendingSincenumber or nullrequired
When a save started building; null when none is running.
The publish gates that are open.
Show 2 fieldsHide fieldsof PublishGate
- codestringrequired
Which gate is open.
agreement_outdatedno_spotsmissing_coordinatesmissing_photosno_price - messagestringrequired
What to fix, in plain words.
- warningsarray of objectsrequired
Problems that do not block:
review_due,stale_facts,link_problems.Show 2 fieldsHide fields
- codestringrequired
A stable code for the warning (see the readiness guide for the list).
- messagestringrequired
What it means, in plain words.
- canPublishChangesbooleanrequired
true when
publish_changeswould queue a build now. - nextStepstringrequired
One sentence on what to do next.
- reviewUrlstringrequired
The guide in the studio.
{
"productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
"name": "American West: Parks at First Light",
"status": "published",
"live": true,
"published": null,
"lastEditAt": 1790586840000,
"saved": null,
"hasUnsavedChanges": false,
"savePendingSince": null,
"blocking": [],
"warnings": [],
"reviewUrl": "https://creators.sceniq.earth/products/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
"hasUnpublishedChanges": true,
"pendingSince": 1790673240000,
"canPublishChanges": false,
"nextStep": "A publish is building. Poll get_publish_status until pendingSince is null and published.version went up (usually seconds)."
}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.
- 409not_publishablepublish_changes or publish_guide while a gate is open: the agreement, no live spot, a live spot without a pin or a photo, no price. details.blocking lists each gate as { code, message }.
- 409agreement_outdatedA price change or a publish by a creator who never accepted the creator agreement. A newer agreement version never causes it.
- 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.