Campaigns

POST /v1/campaigns/{campaignId}/test

Send one real message on the channel the campaign will actually use.

כל נקודות הקצה מסוג Campaigns

אימות

שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.

המקום שבו מזהה הארגון שלך נכנס

נקודת קצה זו מקבלת את org_id כשדה בגוף ה-JSON.

מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

curl -X POST https://api.zinndigital.com/v1/campaigns/{campaignId}/test \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API

פרטים

A real send through the real provider, not a preview. The value of a test send is that it proves the account, the domain, the From header and the rendering all work together — which a preview cannot, because it touches none of them. ⛔ It goes out on the channel the CAMPAIGN uses. A campaign whose channels are `["slack"]` has no account, no domain and no From header to prove, so an e-mailed test would exercise nothing the send would do; it posts to a verified connected destination instead. `to` is therefore required only when the campaign sends by e-mail — for a connected channel the destination is the organisation's own verified connection and is never accepted from the caller.

פרמטרים

שםסוגנדרשמה זה
campaignId (path)stringכן

גוף הבקשה

שםסוגנדרשמה זה
tostringלאRequired when the campaign sends by e-mail; ignored otherwise.
org_idstringלא

תשובה

שםסוגנדרשמה זה
sentbooleanכן
providerstringכן
channelstringכןThe channel the test actually went out on.
tostringכןWhere it went. ⛔ Not `format: email` — on a connected channel this is the destination (`#announcements`, a chat id), and declaring it an e-mail address would make a truthful res…
fromstringכןEmpty on a connected channel, which has no From header.

שגיאות שנקודה קצה זו עשויה להחזיר

401 · 403 · 404 · 422