Campaigns
POST /v1/campaigns
Create a campaign from a template and an audience.
אימות
שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כשדה בגוף ה-JSON.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
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> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
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.
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
name | string | כן | — |
template_id | string | כן | — |
segment_id | string | לא | — |
channels | string<email, in_app, slack, telegram>[] | לא | — |
scheduled_for | string | לא | — |
include_not_in_good_standing | boolean | לא | ⚖️ 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 | לא | — |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
id | string | כן | — |
org_id | string | כן | — |
name | string | כן | — |
template_id | string | כן | — |
segment_id | string | לא | — |
purpose | string<marketing, transactional> | כן | — |
channels | string[] | כן | — |
status | string<draft, scheduled, sending, paused, sent, cancelled, failed> | כן | — |
scheduled_for | string | לא | — |
include_not_in_good_standing | boolean | לא | — |
total_recipients | integer | כן | — |
skipped | CampaignSkipCounts | כן | ⛔ 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 | לא | ⛔ `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 | לא | — |
created_at | string | כן | — |
started_at | string | לא | — |
finished_at | string | לא | — |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 422