Skip to main content
POST
Create a trait preference

Authorizations

X-API-Key
string
header
required

Body

application/json
trait_slug
string
required

Trait.slug of the trait to record a stance on (as returned in trait_slug).

Required string length: 1 - 64
Pattern: ^[^\x00]{1,64}$
stance
enum<string>
required

How the caller feels about the trait. SENSITIVITY traits accept only AVOID.

Available options:
AVOID,
REQUIRE,
PREFER,
NEUTRAL

Response

OK

A single stored preference row.

Returned by GET /account/api/v1/preferences. The trait slug is lower-snake-case ("tree_nuts", "vegan") so it can be passed directly into search constraints; the human-readable form is in trait_label.

id
string<shortuuid>
required

URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
trait
string
required

Lower-snake-case slug for the trait — pass directly into search constraints like exclude_allergens / require_certifications depending on the category.

trait_slug
string
required

The trait's stable kebab-case identifier (Trait.slug) — the value POST /preferences takes to name a trait.

trait_label
string
required

Human-readable trait name as stored on Trait.name.

category
enum<string>
required

Which axis the trait sits on. ALLERGEN preferences feed exclude_allergens; DIETARY / RELIGIOUS / SOURCING feed require_certifications.

Available options:
ALLERGEN,
DIETARY,
RELIGIOUS,
SOURCING,
SENSITIVITY,
OTHER
stance
enum<string>
required

How the user feels about the trait. AVOID / REQUIRE are hard filters; PREFER is a ranking boost; NEUTRAL is recorded but not acted on.

Available options:
AVOID,
REQUIRE,
PREFER,
NEUTRAL