Campaigns
POST /v1/campaigns/{campaignId}/control
Pause, resume or cancel a running send.
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/{campaignId}/control \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "action": <string<pause, resume, cancel>> }'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
The decision is written to the database first and signalled second, so a worker that restarted and never saw the signal still stops on its next batch.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
campaignId (path) | string | Bəli | — |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
action | string<pause, resume, cancel> | Bəli | — |
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 | — |
signal_delivered | boolean | Xeyr | ⛔ Reported honestly. `false` means the decision is recorded and the running workflow was not reachable — it will still stop on its next batch, but that is a real difference an o… |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 422