Campaigns
POST /v1/campaigns/{campaignId}/test
Send one real message on the channel the campaign will actually use.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Acest punct final nu specifică o permisiune anume în specificație, așa că acordați cheii cele mai puține drepturi necesare și verificați răspunsul în loc să faceți presupuneri.
Unde merge ID-ul organizației tale
Acest punct final preia org_id ca câmp în corpul JSON.
ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X POST https://api.zinndigital.com/v1/campaigns/{campaignId}/test \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
campaignId (path) | string | Da | — |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
to | string | Nu | Required when the campaign sends by e-mail; ignored otherwise. |
org_id | string | Nu | — |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
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. |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 422