Campaigns
POST /v1/campaigns/{campaignId}/test
Send one real message on the channel the campaign will actually use.
Նույնականացում
Ուղարկեք API բանալին որպես bearer թոքեն։ Այս վերջնակետը բնութագրում չի նշում որոշակի թույլտվության մասին, ուստի տվեք ձեր բանալուն նվազագույն անհրաժեշտը և ենթադրություններ անելու փոխարեն ստուգեք պատասխանը:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այս վերջնակետը JSON մարմնում որպես դաշտ վերցնում է org_id-ը։
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
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 | Այո | — |
Հարցման մարմին
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
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