Campaigns
POST /v1/campaigns/preview
Render a template with example values.
Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Onde vai o ID da sua organização
Este endpoint aceita org_id como um campo no corpo JSON.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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 da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
fallbacks | boolean | Não | 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 | Sim | — |
subject | string | Sim | — |
body | string | Sim | — |
purpose | string<marketing, transactional> | Não | — |
channels | string<email, in_app, slack, telegram>[] | Não | — |
org_id | string | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
fallbacks | boolean | Não | Whether this was rendered with fallbacks only, echoed so the composer can label the panel honestly. |
subject | string | Sim | — |
body_text | string | Sim | — |
body_html | string | Sim | — |
headers | object | Sim | RFC 8058 one-click unsubscribe headers on a marketing message; empty otherwise. |
Erros que este endpoint pode retornar
401 · 403 · 422