Skip to content
WeZend

Customer Data Platform

Segments & computed traits

Build segments with a live-preview count and define computed traits over events, messages and orders.

Segments

GET /v1/segments lists every segment with a live contact count. GET /v1/segments/schema returns the fields and operators the rule builder can offer, so a custom UI can be built against the same schema the dashboard uses.

Before saving a segment, preview how many contacts a rule set matches:

curl -X POST https://api.wezend.com/v1/segments/preview \
  -H "X-API-Key: $WEZEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "rules": [{ "field": "trait:churn_score", "op": "gt", "value": 0.7 }] }'

GET /v1/segments/:id/contacts resolves a saved segment to the actual member contacts.

Computed traits

Traits (/v1/traits) are customer-defined aggregations over events, messages and orders — e.g. "orders in the last 90 days" or "average order value" — materialized directly onto each contact so they're queryable as trait:<key> in segment rules, exactly like the churn-score example above.

One platform. Every customer interaction.

Replace your patchwork of messaging APIs, CDP and automation tools with a single engagement platform built for scale.

No credit card required · EU data residency · 99.99% uptime SLA