Campaigns

POST /v1/campaigns/{campaignId}/test

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

Барлық Campaigns соңғы нүктелері

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Бұл соңғы нүкте сипаттамада арнайы рұқсатты көрсетпейді, сондықтан болжағаннан гөрі кілтіңізге қажетті ең аз рұқсатты беріп, жауапты тексеріңіз.

Ұйымыңыздың идентификаторы орналасатын жер

Бұл соңғы нүкте JSON корпусында өріс ретінде org_id қабылдайды.

Сіздің ұйым идентификаторыңыз басқару панеліндегі 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.

Параметрлер

АтыTүріМіндеттіМазмұны
campaignId (path)stringИә

Сұрау денесі

АтыTүріМіндеттіМазмұны
tostringЖоқRequired when the campaign sends by e-mail; ignored otherwise.
org_idstringЖоқ

Жауап

АтыTүріМіндеттіМазмұны
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