Campaigns

POST /v1/campaigns/{campaignId}/test

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

Усі кінцеві точки Campaigns

Автентифікація

Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.

Де вказується ідентифікатор вашої організації

Цей ендпоінт приймає 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