Campaigns
POST /v1/campaigns/preview
Render a template with example values.
Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come campo nel corpo JSON.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/campaigns/preview \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "subject": <string>, "body": <string> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
Rendered by the engine, through the same renderer the send uses. A preview computed in the client is a second implementation of the substitution rules, and the first time it disagrees an author ships copy they never actually saw.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
fallbacks | boolean | No | Preview only. Render with NO merge values, so every tag falls back and the author reads what a customer we know nothing about reads. It exists because a normal preview substitut… |
name | string | Sì | — |
subject | string | Sì | — |
body | string | Sì | — |
purpose | string<marketing, transactional> | No | — |
channels | string<email, in_app, slack, telegram>[] | No | — |
org_id | string | No | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
fallbacks | boolean | No | Whether this was rendered with fallbacks only, echoed so the composer can label the panel honestly. |
subject | string | Sì | — |
body_text | string | Sì | — |
body_html | string | Sì | — |
headers | object | Sì | RFC 8058 one-click unsubscribe headers on a marketing message; empty otherwise. |
Errori che questo endpoint può restituire
401 · 403 · 422