Campaigns
POST /v1/campaigns/{campaignId}/control
Pause, resume or cancel a running send.
การยืนยันตัวตน
ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body
รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
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>> }'เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
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.
พารามิเตอร์
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
campaignId (path) | string | ใช่ | — |
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
action | string<pause, resume, cancel> | ใช่ | — |
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 | ไม่ใช่ | — |
signal_delivered | boolean | ไม่ใช่ | ⛔ 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… |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 422