Define a custom contact field
define_contact_fieldDeclare a custom attribute on this site's contacts so it becomes a labelled, filterable, segmentable field rather than a raw key. Use it when the user wants a specific label or a non-text type (number, date, boolean, or select with fixed options) — a plain text field is created automatically by upsert_contacts for any new key it sees. Defining a field never touches existing contact values, and values already stored under that key light up immediately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| options | No | ||
| site_id | Yes | The site to define the field on | |
| field_key | Yes | ||
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| field_type | No | text |