Campaigns

POST /v1/campaigns

Create a campaign from a template and an audience.

Tất cả các điểm cuối Campaigns

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Điểm cuối này không nêu rõ quyền cụ thể trong thông số kỹ thuật, vì vậy hãy cấp cho khóa của bạn quyền tối thiểu cần thiết và kiểm tra phản hồi thay vì phỏng đoán.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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> }'

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
namestring
template_idstring
segment_idstringKhông
channelsstring<email, in_app, slack, telegram>[]Không
scheduled_forstringKhông
include_not_in_good_standingbooleanKhông⚖️ 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_idstringKhông

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
org_idstring
namestring
template_idstring
segment_idstringKhông
purposestring<marketing, transactional>
channelsstring[]
statusstring<draft, scheduled, sending, paused, sent, cancelled, failed>
scheduled_forstringKhông
include_not_in_good_standingbooleanKhông
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…
deliveryCampaignDeliveryCountsKhông⛔ `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_errorstringKhông
created_atstring
started_atstringKhông
finished_atstringKhông

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422