create_property

Add a custom property definition.

POST/v1/guides/{productId}/properties
MCP tool create_propertyScope: writeStableSince 2026-09-17
Markdown

Define a property once, then fill it per spot via customValues[key]. Kinds: categories (predefined category ids and map icons; one such property per guide, with no caller-supplied options), shortLabel (a tiny fact, usually one to five words, such as Late afternoon), ownPage (longer advice or explanations, such as Photo Tips, opened as their own page from the spot; use longDescription for advice that belongs in the main write-up), reels (Instagram and TikTok links with stored covers), number (with numUnit), date (epoch ms), checkbox (multi-select options), singleSelect. The kind decides what buyers can filter by: categories, number, date, checkbox and singleSelect; never shortLabel, ownPage or reels, so use singleSelect for a fact buyers should filter on (Effort, Region). Options get server-minted ids; read them back with list_properties before writing spot values. Max 50 live properties per guide.

curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/properties" \
  -H "Authorization: Bearer $SCENIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Reels",
  "key": "reels",
  "kind": "reels"
}'

Path parameters

Body parameters

  • kindstringrequired

    One of categories, shortLabel, ownPage, reels, number, date, checkbox, singleSelect. Reels holds Instagram and TikTok links with covers, never a filter and no placeholder. Categories uses predefined ids and icons; a guide may have only one, including removed properties.

    categoriesshortLabelcheckboxsingleSelectnumberdateownPagereels
  • labelstringrequired

    Display label, 1-80 characters (Best time, Difficulty, Parking).

  • filterablebooleanoptional

    Ignored: the kind decides (see the description).

  • keystringoptional

    Optional snake_case key, refused when a property of the guide (live or archived) already holds it. Left out, it is derived from the label: its Latin letters and digits, with _2, _3 and on added while that key is taken, or property for a label without any. Immutable. Left out, a label equal to a live property's (case ignored) is refused.

  • numUnitstringoptional

    Unit label for number kinds (m, km, USD).

  • optionsarray of objectsoptional

    Required for checkbox and singleSelect, refused for other kinds: 1 to 100 options [{ label, order? }] in display order.

    Show 2 fields
    • labelstringrequired

      Option label, 1 to 80 characters. Use a few words for a scannable choice, never a sentence of advice. The server mints the option's immutable id from it; read the ids back with list_properties.

    • ordernumberoptional

      Display position (ascending). Absent means the option's index in this list.

  • placeholderstringoptional

    Editor placeholder text.

  • requiredbooleanoptional

    Whether every spot must carry a value.

  • visiblebooleanoptional

    Whether to show this property on spot pages. Defaults to false for categories and true for other kinds. Hidden properties keep their saved values, required setting and filters.

Returns

201 Created with Property: A custom property definition.

  • propertyDefIdstring · property idrequired

    The property's id.

  • keystringrequired

    The immutable key spots use in customValues.

  • labelstringrequired

    The label buyers see.

  • kindstringrequired

    The kind; it decides the value's type and whether buyers can filter by it. shortLabel holds a tiny fact of a few words; ownPage holds longer writing that opens on its own page. Explanations also fit in a spot's longDescription.

    shortLabelownPagereelsnumberdatecheckboxsingleSelectcategories
  • ordernumberrequired

    Display order (ascending).

  • requiredbooleanoptional

    true when every spot must carry a value. Absent means false.

  • visiblebooleanrequired

    Whether the property is shown on spot pages. New categories properties default to false; other kinds default to true. Existing properties without a saved flag stay visible. Filters and saved values are unaffected.

  • filterablebooleanrequired

    Whether buyers can filter by it (number, date, checkbox, singleSelect and categories).

  • placeholderstring or nullrequired

    Editor placeholder text.

  • numUnitstring or nullrequired

    Unit label for number properties.

  • optionsarray of objectsrequired

    Options of checkbox and singleSelect properties; categories supplies predefined ids and labels whose icons come from the category registry. Non-archived category options are enabled for new picks; disabling one preserves saved assignments, icons and buyer filters.

    Show 4 fields
    • idstringrequired

      The option's immutable id: the value spots store.

    • labelstringrequired

      The option's label.

    • ordernumberrequired

      Display order (ascending).

    • archivedbooleanrequired

      true when the option is retired; stored values stay.

  • archivedbooleanrequired

    true when the property is archived; stored values stay.

  • schemaVersionnumberrequired

    The guide's property schema version after the last change.

Response 201
{
  "propertyDefId": "kh75b789hrwaq3kafenm0xbb6v34gh06",
  "key": "reels",
  "label": "Reels",
  "kind": "reels",
  "order": 2,
  "required": false,
  "visible": true,
  "filterable": false,
  "placeholder": null,
  "numUnit": null,
  "options": [],
  "archived": false,
  "schemaVersion": 4
}

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.