Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja tačka ne navodi specifičnu dozvolu u specifikaciji, zato dodelite svom ključu minimum potrebnih ovlašćenja i proverite odgovor umesto da pretpostavljate.
Gde ide ID vaše organizacije
Ova krajnja tačka prihvata org_id kao parametar upita. Izostavite ga i poziv obuhvata celokupno stablo vašeg zakupca; pošaljite ga da biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
curl -X POST https://api.zinndigital.com/v1/campaigns/segments \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "definition": <CampaignSegmentNode> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
The `definition` is a filter tree over the fields `GET /v1/campaigns/segments/fields` lists, and is validated on write — a definition that cannot be compiled cannot be stored, so a saved segment never explodes at send time in front of an operator who has already scheduled it. ⛔ An empty group (`{"op":"and","children":[]}`) is refused rather than treated as "everybody": a half-built segment must not silently mean the entire estate.
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
org_id (query) | string | Ne | Which organization's campaigns to work on. Required only when you hold campaign access on more than one; staff always work on the platform scope and may omit it. |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
name | string | Da | — |
description | string | Ne | — |
definition | CampaignSegmentNode | Da | 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… |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
id | string | Da | — |
org_id | string | Da | The segment's OWNER, not the orgs it selects. |
scope | string<platform, reseller> | Da | — |
name | string | Da | — |
description | string | Ne | — |
definition | CampaignSegmentNode | Da | 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… |
status | string<active, archived> | Da | — |
created_by | string | Ne | — |
created_at | string | Ne | — |
updated_at | string | Ne | — |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 422