Campaigns

POST /v1/campaigns/{campaignId}/test

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

Semua titik akhir Campaigns

Pengesahan

Hantar kunci API sebagai token pembawa. Titik akhir ini tidak menyatakan kebenaran tertentu dalam spesifikasi, jadi berikan kunci anda kebenaran minimum yang diperlukan dan semak respons tersebut daripada membuat andaian.

Tempat ID organisasi anda diletakkan

Titik akhir ini mengambil org_id sebagai medan dalam kandungan JSON.

ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

curl -X POST https://api.zinndigital.com/v1/campaigns/{campaignId}/test \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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.

Parameter

NamaJenisDiperlukanApakah ia
campaignId (path)stringYa

Badan permintaan

NamaJenisDiperlukanApakah ia
tostringTidakRequired when the campaign sends by e-mail; ignored otherwise.
org_idstringTidak

Respons

NamaJenisDiperlukanApakah ia
sentbooleanYa
providerstringYa
channelstringYaThe channel the test actually went out on.
tostringYaWhere 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…
fromstringYaEmpty on a connected channel, which has no From header.

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 404 · 422