create_chapter
Create a chapter or a collection.
/v1/guides/{productId}/chapterskind collection (the default) for a set of spots: a region, a theme, top picks; fill it with set_chapter_members. kind chapter only for the creator's own writing (an introduction, tips, local rules, a trip told like a travel blog): a group that would hold nothing but spots is a collection. Create the chapter, then author its pages with set_chapter_pages, adding its spots as refs on Spots pages. The member list follows page order. Spots pages hold up to 500 spots, with at most 500 distinct spots per chapter. The deprecated body input converts to Text pages for one release.
curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/chapters" \
-H "Authorization: Bearer $SCENIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Introduction",
"kind": "chapter"
}'Path parameters
- productIdstring · guide idrequired
Id of the guide (a product of type map). From
list_guidesorcreate_guide.
Body parameters
- namestringrequired
Name, e.g. Before you go for a chapter or Bernese Oberland for a collection. Cannot be empty.
- bodyarray of stringsoptional
Deprecated since 2026-10-06.2: use
set_chapter_pages. Accepted for one release: up to 100 paragraphs of 10,000 characters become consecutive Text pages of at most 30 paragraphs. [] clears prose. On update, chapters with only Text and Spots pages accept body: Text pages are replaced, existing Spots pages stay and leftover member spots are appended. Other page types refuse withinvalid_request. Empty paragraphs are dropped. - descriptionstringoptional
One-line summary shown on the chapter card. Empty string clears.
- kindstringoptional
chapter or collection (default collection).
chaptercollection Collections only: keep the collection in sync with every live spot ({ source: all }) or with a property value (see
set_chapter_rule). It starts with exactly those spots.- slugstringoptional
Optional URL slug, unique in the guide: 1 to 63 lowercase letters, digits or hyphens, a letter or digit first (stored lower case). Empty string clears.
Returns
201 Created with Chapter: A chapter or a collection with its members.
- collectionIdstring · chapter idrequired
The chapter's or collection's id.
- productIdstring · guide idrequired
The guide's id.
- namestringrequired
Its title.
- slugstring or nullrequired
URL slug, unique in the guide.
- descriptionstring or nullrequired
One-line summary on the chapter card.
- kindstringrequired
chapter carries a stack of pages; collection is a plain spot set.
collectionchapter The chapter pages in reading order, normalised on save. Chapter spots are the unique Spots-page refs in page order; member rows follow them. Legacy chapters are converted on read. Empty chapters and plain collections return []. Replaces the removed body and intro response fields.
Show 13 fieldsHide fieldsof ChapterPage
- idstringrequired
Stable client-made identity: 8 to 16 letters, digits, underscores or hyphens, unique within the stack. Trimmed on save. Keep ids when editing or reordering; make a new id when duplicating.
- typestringrequired
cover: opening with title and photo (kicker/title/lead/photos). text: paragraphs (kicker/title/lead/body).
photoText: a photo beside paragraphs (kicker/title/lead/body/photos). photo: a big image (title/lead/photos). gallery: image grid (kicker/title/lead/photos with captions). quote: quotation (body/author/authorMediaId/photos). tips: numbered cards (kicker/title/lead/items title and text). checklist: lines (kicker/title/lead/items title only). facts: label/value table (kicker/title/lead/items title and text). chapters: Contents rows (kicker/title/lead/refscollectionId/title/line/color/hidden). collections: collection cards (kicker/title/lead/refscollectionId/title/mediaId/hidden). itineraries: trip tiles (kicker/title/lead/refsitineraryId/hidden). spots: chosen spot cards (kicker/title/lead/refsspotKey). creator: About me (kicker/title/body/photos), with socials from the creator profile. Other fields are dropped.covertextphotoTextphotogalleryquotetipschecklistfactschapterscollectionsitinerariesspotscreator - variantstringoptional
cover: split (default), full, simple;
photoText: left (default), right; photo: overlay (default), below; quote: plain (default), photo; spots: reader (default), grid; creator: profile (default), portrait. An invalid variant for these types is refused. Other types have no variants and drop this field. - kickerstringoptional
Small heading line, at most 120 characters. Used by cover, text,
photoText, gallery, tips, checklist, facts, chapters, collections, itineraries, spots and creator. - titlestringoptional
Heading, at most 160 characters. Used by every type except quote. Empty cover title uses the chapter name; creator title overrides the profile name.
- leadstringoptional
Short introduction, at most 500 characters. Used by every type except quote and creator. Spots shows a heading only when kicker, title or lead has text.
- bodyarray of stringsoptional
text/
photoTextparagraphs, quote text or creator bio override: up to 30 strings of 10000 characters. Lines beginning with "- " render as dotted lists. Other types drop body. - bylinebooleanoptional
Deprecated: covers show no byline. Accepted and dropped on every page type.
- authorstringoptional
Quote attribution, at most 120 characters. Other types drop it, covers included.
- authorMediaIdstring · photo idoptional
Quote author photo: a media row id owned by this chapter or a spot/collection of this guide. Removed photos are dropped; other-guide ids are refused. Other page types drop it, covers included.
cover/
photoText/photo/quote/creator accept at most one photo; gallery accepts up to 6. Other types drop photos. Only gallery keeps captions. Upload withownerTypecollection andownerIdcollectionId, or reuse a spot photomediaIdfromlist_media. Photos retain the media row's credit; its display follows guide settings and licence requirements.Show 2 fieldsHide fieldsof ChapterPagePhoto
- mediaIdstring · photo idrequired
A spot- or collection-owned media id of this guide. Upload chapter photos with
ownerTypecollection andownerIdcollectionId, then referencemediaId. Product and listing owners are refused. No copy is made when reusing a spot photo. - captionstringoptional
Gallery only: optional caption, at most 200 characters. Other page types drop it. Credit belongs to the media row, not this caption.
tips: up to 8 title/text cards; checklist: up to 20 title-only lines; facts: up to 12 title (label)/text (value) rows. Empty items are dropped; other types drop items.
Show 2 fieldsHide fieldsof ChapterPageItem
- titlestringoptional
Tip title, checklist line or fact label, at most 120 characters.
- textstringoptional
Tip text or fact value, at most 600 characters. Checklist drops it.
chapters/collections/itineraries accept up to 60/60/60 per-item overrides. Referenced items display first in ref order, then unreferenced eligible guide rows in guide order; hidden refs drop. New items join at the end. spots accepts zero to 500
spotKeysper page, at most 500 distinctspotKeysper chapter. The chapter's spots are exactly these refs, unique in page order then ref order;set_chapter_pagesrewrites membership to match. Each ref must carry exactly the target its type accepts; unsupported dressing is refused. Duplicate targets keep the first. Missing targets are dropped; archived spots stay stored and buyers hide them. Other types drop refs.Show 8 fieldsHide fieldsof ChapterPageRef
- collectionIdstring · chapter idoptional
chapters: another chapter of this guide (self refs drop). collections: a plain collection of this guide. Required for these types only. A target promoted or demoted to the wrong kind is dropped.
- itineraryIdstring · itineraries idoptional
itineraries only: itinerary of this guide. Required for that type; missing rows drop.
- spotKeystringoptional
spots only: key from
list_spots, required for that type. Up to 500, in display order. Unknown keys drop; archived spots are hidden from buyers. - titlestringoptional
chapters or collections only: row/card name override, at most 120 characters. Empty means the target's name.
- linestringoptional
chapters only: row description override, at most 200 characters. Empty means the chapter's description.
- colorstringoptional
chapters only: row color bar in #rrggbb format, stored lower case. Absent uses the chapter art.
- mediaIdstring · photo idoptional
collections only: card photo override, a spot- or collection-owned media row of this guide. Missing media is unset on save. Empty uses the collection art.
- hiddenbooleanoptional
chapters/collections/itineraries only: true hides the item on this page. false is dropped. Does not hide it elsewhere or change membership.
The studio-managed rule for a synced collection. A source of all follows every live spot except helper pins; other sources follow a property value. Null for hand-picked collections and chapters. Synced spot members can only be reordered through the API.
- ordernumberrequired
Position in the guide.
- coverUrlstring or nullrequired
The cover image.
- coverStorageIdstring or null · stored file idrequired
The cover's storage id (from an upload with target=blob).
- membersarray of objectsrequired
Members in order: spots, or chapters inside a collection.
Show 3 fieldsHide fields
- spotKeystring or nullrequired
A member spot's key.
- memberCollectionIdstring or null · chapter idrequired
A chapter placed as a card inside a collection.
- ordernumberrequired
Position in the chapter.
- archivedbooleanrequired
true when the chapter or collection is hidden from buyers but kept (
update_chapterarchived). - createdAtnumberrequired
When the row was created (Unix time in milliseconds).
- updatedAtnumberrequired
When the row last changed (Unix time in milliseconds).
{
"collectionId": "kn7q65ntqkryzm6y45h5dyxqt0p454y8",
"productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
"name": "Introduction",
"slug": null,
"description": null,
"kind": "chapter",
"rule": null,
"pages": [],
"order": 1024,
"coverUrl": null,
"coverStorageId": null,
"members": [],
"archived": false,
"createdAt": 1789895640000,
"updatedAt": 1789895640000
}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.