create_property
Add a custom property definition.
/v1/guides/{productId}/propertiesDefine a property once, then fill it per spot via customValues[key]. Kinds: shortLabel (one line of text), longSection (titled prose block), number (with numUnit), date (epoch ms), checkbox (multi-select options), singleSelect. The kind decides what buyers can filter by: number, date, checkbox and singleSelect; never shortLabel or longSection, 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": "Best time",
"kind": "singleSelect",
"options": [
{
"label": "Sunrise"
},
{
"label": "Morning"
},
{
"label": "Midday"
},
{
"label": "Sunset"
}
]
}'Path parameters
- productIdstring · guide idrequired
Id of the guide (a product of type map). From
list_guidesorcreate_guide.
Body parameters
- kindstringrequired
One of
shortLabel,longSection, number, date, checkbox,singleSelect.shortLabelcheckboxsingleSelectnumberdatelongSection - labelstringrequired
Display label, 1-80 characters (Best time, Difficulty, Parking).
- filterablebooleanoptional
Ignored: the kind decides (see the description).
- keystringoptional
Optional
snake_casekey; derived from the label when omitted. Immutable. - 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 fieldsHide fields
- labelstringrequired
Option label, 1 to 80 characters. 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.
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.
shortLabellongSectionnumberdatecheckboxsingleSelect - ordernumberrequired
Display order (ascending).
- requiredbooleanoptional
true when every spot must carry a value. Absent means false.
- filterablebooleanrequired
Whether buyers can filter by it (number, date, checkbox and
singleSelect). - placeholderstring or nullrequired
Editor placeholder text.
- numUnitstring or nullrequired
Unit label for number properties.
- optionsarray of objectsrequired
Options of checkbox and
singleSelectproperties.Show 4 fieldsHide 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.
{
"propertyDefId": "kh75t2w9q4r6y8v0j1p3p5a7s9d1f3g5",
"key": "best_time",
"label": "Best time",
"kind": "singleSelect",
"order": 0,
"required": false,
"filterable": true,
"placeholder": null,
"numUnit": null,
"options": [
{
"id": "sunrise",
"label": "Sunrise",
"order": 0,
"archived": false
},
{
"id": "morning",
"label": "Morning",
"order": 1,
"archived": false
},
{
"id": "midday",
"label": "Midday",
"order": 2,
"archived": false
},
{
"id": "sunset",
"label": "Sunset",
"order": 3,
"archived": false
}
],
"archived": false,
"schemaVersion": 2
}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.