campaigns
POST /v1/campaigns/segments/preview
How many people this reaches, who they are, and who it leaves out.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। यो इन्डपोइन्टले विशिष्ट अनुमति खुलाएको छैन, त्यसैले अनुमान गर्नुको सट्टा आफ्नो कुञ्जीलाई आवश्यक पर्ने न्यूनतम अधिकार दिनुहोस् र प्रतिक्रिया जाँच गर्नुहोस्।
तपाईंको संस्थाको आइडी राख्ने ठाउँ
यो इन्डपोइन्टले org_id लाई क्वेरी प्यारामिटरको रूपमा लिन्छ। यसलाई छुटाउनुभयो भने कलले तपाईंको सम्पूर्ण टेनेन्सी सबट्रीलाई समेट्छ; यसलाई एउटा संस्थामा मात्र सीमित गर्न पठाउनुहोस्।
तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/campaigns/segments/preview \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Pass either a `definition` (to preview an unsaved segment as you build it) or a `segment_id` — exactly one. ⛔ `total` is the TRUE recipient count and `sample` is a bounded illustration of it. They are different numbers and `truncated` says when: an operator who reads the sample size as the audience size sends thousands of emails believing they sent twenty. Every response carries all five skip counters whether or not any is non-zero, because a counter that disappears when it is zero is indistinguishable from a fence that never ran. `skipped_no_marketing_consent` will be large today: marketing is soft opt-in for people who are or were customers, and anyone else needs an explicit opt-in.
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
org_id (query) | string | हैन | — |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
definition | CampaignSegmentNode | हैन | A filter tree. Two node shapes and no third: a GROUP (`op` with `children`) or a CONDITION (`field`/`operator`/`value`). `not` takes exactly one child — an n-ary `not` reads as… |
segment_id | string | हैन | — |
channel | string | हैन | — |
purpose | string<marketing, transactional> | हैन | `marketing` applies the consent fence and the suppression list; `transactional` applies neither — a service notice is not silenced by "stop sending me offers". |
include_not_in_good_standing | boolean | हैन | ⚖️ Owner ruling 2026-08-26. Suspended and unpaid accounts are excluded by DEFAULT, because a send costs money (CLAUDE.md §2.46). Set this to reach them anyway — which is what a… |
limit | integer | हैन | — |
record_approval | boolean | हैन | Persist this resolution as an immutable **approval record** — what the operator saw and agreed to, stamped at the moment they agreed. Returns its id as `snapshot_id`. ⛔ Requires… |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
snapshot_id | string | हैन | The approval record's id when `record_approval` was set; `null` otherwise. |
total | integer | हुन्छ | The TRUE recipient count — not the length of `sample`. Show this number, and show the skips beside it. |
skipped_not_in_good_standing | integer | हुन्छ | — |
skipped_no_marketing_consent | integer | हुन्छ | People the soft opt-in does not cover — a trial that never converted, an imported contact — who hold no explicit opt-in. |
skipped_unsubscribed | integer | हुन्छ | — |
skipped_channel_muted | integer | हुन्छ | — |
skipped_no_destination | integer | हुन्छ | Accounts with no member carrying an address on this channel. |
skipped_total | integer | हुन्छ | — |
truncated | boolean | हुन्छ | True when `sample` is shorter than `total`. |
evaluated_at | string | हुन्छ | — |
scope | string<platform, reseller> | हुन्छ | — |
sample | object[] | हुन्छ | — |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 422