Campaigns
POST /v1/campaigns
Create a campaign from a template and an audience.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako pole w treści JSON.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/campaigns \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "template_id": <string> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
Create a campaign from a template and an audience segment. It is created as a draft and sends nothing until the send endpoint is called.
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
name | string | Tak | — |
template_id | string | Tak | — |
segment_id | string | Nie | — |
channels | string<email, in_app, slack, telegram>[] | Nie | — |
scheduled_for | string | Nie | — |
include_not_in_good_standing | boolean | Nie | ⚖️ Suspended and unpaid organisations are excluded by default (CLAUDE.md §2.46); this is the explicit per-campaign override that makes a win-back campaign possible. The skip is… |
org_id | string | Nie | — |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | string | Tak | — |
org_id | string | Tak | — |
name | string | Tak | — |
template_id | string | Tak | — |
segment_id | string | Nie | — |
purpose | string<marketing, transactional> | Tak | — |
channels | string[] | Tak | — |
status | string<draft, scheduled, sending, paused, sent, cancelled, failed> | Tak | — |
scheduled_for | string | Nie | — |
include_not_in_good_standing | boolean | Nie | — |
total_recipients | integer | Tak | — |
skipped | CampaignSkipCounts | Tak | ⛔ Every skip counted separately and never silent, and **every one is present even when it is zero**. "4,127 recipients, 312 skipped — not in good standing" is rendered from thes… |
delivery | CampaignDeliveryCounts | Nie | ⛔ `sent` is NOT `delivered`. `sent` means a provider accepted the hand-off; `delivered` means the receiving server accepted it, which arrives later by webhook. A screen showing… |
last_error | string | Nie | — |
created_at | string | Tak | — |
started_at | string | Nie | — |
finished_at | string | Nie | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422