# create_property

Add a custom property definition.

`POST /v1/guides/{productId}/properties` · MCP tool `create_property` · scope `write` · stable · since 2026-09-17

Define 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.

## Path parameters

- `productId` (string, required): Id of the guide (a product of type map). From list_guides or create_guide.

## Body parameters

- `kind` (string, required): One of shortLabel, longSection, number, date, checkbox, singleSelect. One of `shortLabel`, `checkbox`, `singleSelect`, `number`, `date`, `longSection`.
- `label` (string, required): Display label, 1-80 characters (Best time, Difficulty, Parking).
- `filterable` (boolean, optional): Ignored: the kind decides (see the description).
- `key` (string, optional): Optional snake_case key; derived from the label when omitted. Immutable.
- `numUnit` (string, optional): Unit label for number kinds (m, km, USD).
- `options` (array of objects, optional): Required for checkbox and singleSelect, refused for other kinds: 1 to 100 options [{ label, order? }] in display order.
  - `label` (string, required): Option label, 1 to 80 characters. The server mints the option's immutable id from it; read the ids back with list_properties.
  - `order` (number, optional): Display position (ascending). Absent means the option's index in this list.
- `placeholder` (string, optional): Editor placeholder text.
- `required` (boolean, optional): Whether every spot must carry a value.

## Returns

201: Property.

- `propertyDefId` (string, required): The property's id.
- `key` (string, required): The immutable key spots use in customValues.
- `label` (string, required): The label buyers see.
- `kind` (string, required): The kind; it decides the value's type and whether buyers can filter by it. One of `shortLabel`, `longSection`, `number`, `date`, `checkbox`, `singleSelect`.
- `order` (number, required): Display order (ascending).
- `required` (boolean, optional): true when every spot must carry a value. Absent means false.
- `filterable` (boolean, required): Whether buyers can filter by it (number, date, checkbox and singleSelect).
- `placeholder` (string or null, required): Editor placeholder text.
- `numUnit` (string or null, required): Unit label for number properties.
- `options` (array of objects, required): Options of checkbox and singleSelect properties.
  - `id` (string, required): The option's immutable id: the value spots store.
  - `label` (string, required): The option's label.
  - `order` (number, required): Display order (ascending).
  - `archived` (boolean, required): true when the option is retired; stored values stay.
- `archived` (boolean, required): true when the property is archived; stored values stay.
- `schemaVersion` (number, required): The guide's property schema version after the last change.

## Examples

### A single select buyers can filter by

```bash
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"
    }
  ]
}'
```

MCP `tools/call`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_property",
    "arguments": {
      "productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
      "label": "Best time",
      "kind": "singleSelect",
      "options": [
        {
          "label": "Sunrise"
        },
        {
          "label": "Morning"
        },
        {
          "label": "Midday"
        },
        {
          "label": "Sunset"
        }
      ]
    }
  }
}
```

Response 201:

```json
{
  "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
}
```

### A long section: its own block on the spot page, never a filter

```bash
curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/properties" \
  -H "Authorization: Bearer $SCENIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Photo notes",
  "kind": "longSection",
  "placeholder": "Lens, framing, where to stand"
}'
```

MCP `tools/call`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_property",
    "arguments": {
      "productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
      "label": "Photo notes",
      "kind": "longSection",
      "placeholder": "Lens, framing, where to stand"
    }
  }
}
```

Response 201:

```json
{
  "propertyDefId": "kh75b789hrwaq3kafenm0xbb6v34gh06",
  "key": "photo_notes",
  "label": "Photo notes",
  "kind": "longSection",
  "order": 2,
  "required": false,
  "filterable": false,
  "placeholder": "Lens, framing, where to stand",
  "numUnit": null,
  "options": [],
  "archived": false,
  "schemaVersion": 4
}
```

## Errors

- `invalid_argument` (400): A 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).
- `invalid_request` (400): A 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.
- `unauthenticated` (401): The request carries no key. Send it as Authorization: Bearer sk_sceniq_... (or X-Api-Key).
- `invalid_api_key` (401): The key is unknown, revoked or expired.
- `api_scope_required` (403): A read-only key called a write operation, or a key without the publish option called publish_changes.
- `forbidden` (403): The key belongs to a creator account that is no longer active.
- `not_found` (404): The id does not exist or belongs to another creator. The two answers are identical on purpose, so ids never reveal what exists.
- `payload_too_large` (413): A JSON body over 2 MB, an image over 6 MB, a batch upload over 19 MB, or an MCP message over 2 MB.
- `rate_limited` (429): Over a limit: requests per key per minute, per creator per hour, uploads per key per minute, or check_links per guide per hour.
- `internal_error` (500): An unexpected failure. The message is hidden on purpose.

Reference: https://developers.sceniq.earth/reference/create_property
