Campaigns
POST /v1/campaigns/{campaignId}/test
Send one real message on the channel the campaign will actually use.
Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja točka ne navodi određenu dozvolu u specifikaciji, stoga dajte svom ključu najmanje što mu je potrebno i provjerite odgovor umjesto da pretpostavljate.
Gdje dolazi ID vaše organizacije
Ova krajnja točka prihvaća org_id kao polje u JSON tijelu.
ID vaše organizacije nalazi se na zaslonu API ključeva u vašoj nadzornoj ploči, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X POST https://api.zinndigital.com/v1/campaigns/{campaignId}/test \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
campaignId (path) | string | Da | — |
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
to | string | Ne | Required when the campaign sends by e-mail; ignored otherwise. |
org_id | string | Ne | — |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
sent | boolean | Da | — |
provider | string | Da | — |
channel | string | Da | The channel the test actually went out on. |
to | string | Da | 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 | Da | Empty on a connected channel, which has no From header. |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 422