Campaigns
POST /v1/campaigns/{campaignId}/test
Send one real message on the channel the campaign will actually use.
Автентифікація
Надішліть ключ 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 | Так | — |
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
to | string | Ні | Required when the campaign sends by e-mail; ignored otherwise. |
org_id | string | Ні | — |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
sent | boolean | Так | — |
provider | string | Так | — |
channel | string | Так | The channel the test actually went out on. |
to | string | Так | 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… |
from | string | Так | Empty on a connected channel, which has no From header. |
Помилки, які може повертати ця кінцева точка
401 · 403 · 404 · 422