Campaigns

POST /v1/campaigns/{campaignId}/test

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

Све Campaigns крајње тачке

Сва документација за програмере →

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

Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.

Где се уноси ID ваше организације

Ова крајња тачка узима 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 конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом 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…
fromstringДаEmpty on a connected channel, which has no From header.

Грешке које ова крајња тачка може вратити

401 · 403 · 404 · 422