Campaigns
POST /v1/campaigns
Create a campaign from a template and an audience.
Autenticación
Envía una clave de API como token de portador. Este endpoint no especifica un permiso concreto en la especificación, así que otorga a tu clave los mínimos privilegios necesarios y comprueba la respuesta en lugar de dar por sentado.
Donde va el ID de tu organización
Este endpoint toma org_id como un campo en el cuerpo JSON.
El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
curl -X POST https://api.zinndigital.com/v1/campaigns \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "template_id": <string> }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
Create a campaign from a template and an audience segment. It is created as a draft and sends nothing until the send endpoint is called.
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
name | string | Sí | — |
template_id | string | Sí | — |
segment_id | string | No | — |
channels | string<email, in_app, slack, telegram>[] | No | — |
scheduled_for | string | No | — |
include_not_in_good_standing | boolean | No | ⚖️ Suspended and unpaid organisations are excluded by default (CLAUDE.md §2.46); this is the explicit per-campaign override that makes a win-back campaign possible. The skip is… |
org_id | string | No | — |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
id | string | Sí | — |
org_id | string | Sí | — |
name | string | Sí | — |
template_id | string | Sí | — |
segment_id | string | No | — |
purpose | string<marketing, transactional> | Sí | — |
channels | string[] | Sí | — |
status | string<draft, scheduled, sending, paused, sent, cancelled, failed> | Sí | — |
scheduled_for | string | No | — |
include_not_in_good_standing | boolean | No | — |
total_recipients | integer | Sí | — |
skipped | CampaignSkipCounts | Sí | ⛔ Every skip counted separately and never silent, and **every one is present even when it is zero**. "4,127 recipients, 312 skipped — not in good standing" is rendered from thes… |
delivery | CampaignDeliveryCounts | No | ⛔ `sent` is NOT `delivered`. `sent` means a provider accepted the hand-off; `delivered` means the receiving server accepted it, which arrives later by webhook. A screen showing… |
last_error | string | No | — |
created_at | string | Sí | — |
started_at | string | No | — |
finished_at | string | No | — |
Errores que este endpoint puede devolver
401 · 403 · 422