Campaigns

POST /v1/campaigns

Create a campaign from a template and an audience.

จุดสิ้นสุด Campaigns ทั้งหมด

การยืนยันตัวตน

ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body

รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ 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.

เนื้อหาคำขอ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
namestringใช่
template_idstringใช่
segment_idstringไม่ใช่
channelsstring<email, in_app, slack, telegram>[]ไม่ใช่
scheduled_forstringไม่ใช่
include_not_in_good_standingbooleanไม่ใช่⚖️ 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_idstringไม่ใช่

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
idstringใช่
org_idstringใช่
namestringใช่
template_idstringใช่
segment_idstringไม่ใช่
purposestring<marketing, transactional>ใช่
channelsstring[]ใช่
statusstring<draft, scheduled, sending, paused, sent, cancelled, failed>ใช่
scheduled_forstringไม่ใช่
include_not_in_good_standingbooleanไม่ใช่
total_recipientsintegerใช่
skippedCampaignSkipCountsใช่⛔ 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…
deliveryCampaignDeliveryCountsไม่ใช่⛔ `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_errorstringไม่ใช่
created_atstringใช่
started_atstringไม่ใช่
finished_atstringไม่ใช่

ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้

401 · 403 · 422