> ## Documentation Index
> Fetch the complete documentation index at: https://spotzee.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Define custom contact attributes

> Review discovered contact attributes and set their visibility.

The **Data Schema** tab in project Settings lists discovered contact attribute paths. You can set each path's visibility to control where it appears in rule builders and contact API responses. Visibility does not block template rendering.

> [!NOTE]
>
> Data Schema management lives under **Settings** → **Data Schema** and requires the project `admin` role. A scheduled schema sync discovers new paths from stored contacts and events.

## How the schema builds itself

An hourly schema sync scans recently updated contacts and events for new leaf paths. A full sync can also rebuild the index from stored records. The **Data Schema** table shows contact paths with:

* The **path** itself (for example, `$.subscription_tier` or `$.shipping_address.city`).
* The detected **data type** (`string`, `number`, `boolean`, `date`, or `array`).
* An auto-assigned **visibility** of `public`.

New paths appear after the schema sync runs. Admins can then review their visibility.

## Visibility levels

| Visibility | Rule-path catalogue | Contact API output | Template rendering |
| - | - | - | - |
| **Public** | Available to project members | Included | Available |
| **Hidden** | Omitted from the rule-path catalogue | Omitted | Available |
| **Classified** | Available to project admins | Included for project admins; omitted for other roles | Available |

Public is the default for newly discovered paths. Visibility controls the rule-path catalogue and filtered contact API responses; it is not a template privacy boundary. Avoid placing sensitive data in contact attributes used by templates.

## Set visibility on an attribute

**1. Open Settings → Data Schema**

Inside the project, open **Settings** and pick the **Data Schema** tab. The table lists every contact attribute Spotzee has observed.

**2. Pick an attribute**

Click a row to open the visibility editor for that path. The path appears at the top of the drawer in monospace.

**3. Choose visibility**

Pick **Public**, **Hidden**, or **Classified**. Choose **Save** to apply the visibility change.

## Data types

The detected `data_type` decides which segment operators are available for that path. The mapping comes straight from the rules engine:

| Data type | Segment operators |
| - | - |
| `string` | `=`, `!=`, `starts with`, `not start with`, `contains`, `not contain`, `is set`, `is not set`, `empty` |
| `number` | `=`, `!=`, `<`, `<=`, `>`, `>=`, `is set`, `is not set` |
| `boolean` | `=`, `!=` |
| `date` | `=`, `!=`, `<`, `<=`, `>`, `>=`, `is same day`, `is set`, `is not set` |
| `array` | `=`, `!=`, `contains`, `empty`, `is set`, `is not set` |

Spotzee records the type seen when a path is first discovered. If the inference is wrong (a field that's typed as a number in your source becomes a string in segments because the first values came in quoted), correct the type at the source. You can't override the type in the UI; it's a function of the actual data.

For the full operator reference and how rules combine into segments, see [Build segments](https://spotzee.com/docs/guides/segments.md).

## Schema refresh

Spotzee runs a schema sync every hour over recently updated contacts and events. Use **Rebuild** under **Settings** → **General** → **Advanced** to queue a full schema sync when you need to reconcile the index with stored records. A full sync removes paths no longer present and keeps visibility on paths that remain.

## Next steps

> [card] [Build segments](https://spotzee.com/docs/guides/segments.md)
>
> Use your typed attributes in segment rules.

> [card] [Sync contacts](https://spotzee.com/docs/guides/sync-users.md)
>
> Push attribute data into the project via the API.

> [card] [Ingest events](https://spotzee.com/docs/guides/event-ingestion.md)
>
> Send events with payload attributes that land in the schema.

> [card] [Build templates](https://spotzee.com/docs/guides/templates.md)
>
> Use template variables to render attribute values into your messages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.