Campaigns

POST /v1/campaigns/{campaignId}/test

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

Tous les points de terminaison Campaigns

Authentification

Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.

Où insérer l'ID de votre organisation

Cet endpoint prend org_id comme champ dans le corps JSON.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Paramètres

NomTypeObligatoireQu'est-ce que c'est
campaignId (path)stringOui

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
tostringNonRequired when the campaign sends by e-mail; ignored otherwise.
org_idstringNon

Réponse

NomTypeObligatoireQu'est-ce que c'est
sentbooleanOui
providerstringOui
channelstringOuiThe channel the test actually went out on.
tostringOuiWhere 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…
fromstringOuiEmpty on a connected channel, which has no From header.

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 404 · 422