Campaigns
POST /v1/campaigns
Create a campaign from a template and an audience.
Doğrulama
API açarını bearer token kimi göndərin. Bu səhifə spresifikasiyada xüsusi icazə tələb etmir, buna görə də açarınıza ehtiyac duyduğu minimum səviyyədə icazə verin və güman etmək əvəzinə cavabı yoxlayın.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
name | string | Bəli | — |
template_id | string | Bəli | — |
segment_id | string | Xeyr | — |
channels | string<email, in_app, slack, telegram>[] | Xeyr | — |
scheduled_for | string | Xeyr | — |
include_not_in_good_standing | boolean | Xeyr | ⚖️ 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 | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | string | Bəli | — |
org_id | string | Bəli | — |
name | string | Bəli | — |
template_id | string | Bəli | — |
segment_id | string | Xeyr | — |
purpose | string<marketing, transactional> | Bəli | — |
channels | string[] | Bəli | — |
status | string<draft, scheduled, sending, paused, sent, cancelled, failed> | Bəli | — |
scheduled_for | string | Xeyr | — |
include_not_in_good_standing | boolean | Xeyr | — |
total_recipients | integer | Bəli | — |
skipped | CampaignSkipCounts | Bəli | ⛔ 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 | Xeyr | ⛔ `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 | Xeyr | — |
created_at | string | Bəli | — |
started_at | string | Xeyr | — |
finished_at | string | Xeyr | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422