Campaigns
POST /v1/campaigns/{campaignId}/control
Pause, resume or cancel a running send.
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/{campaignId}/control \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "action": <string<pause, resume, cancel>> }'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
The decision is written to the database first and signalled second, so a worker that restarted and never saw the signal still stops on its next batch.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
campaignId (path) | string | Sim | — |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
action | string<pause, resume, cancel> | Sim | — |
org_id | string | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Sim | — |
org_id | string | Sim | — |
name | string | Sim | — |
template_id | string | Sim | — |
segment_id | string | Não | — |
purpose | string<marketing, transactional> | Sim | — |
channels | string[] | Sim | — |
status | string<draft, scheduled, sending, paused, sent, cancelled, failed> | Sim | — |
scheduled_for | string | Não | — |
include_not_in_good_standing | boolean | Não | — |
total_recipients | integer | Sim | — |
skipped | CampaignSkipCounts | Sim | ⛔ 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 | Não | ⛔ `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 | Não | — |
created_at | string | Sim | — |
started_at | string | Não | — |
finished_at | string | Não | — |
signal_delivered | boolean | Não | ⛔ Reported honestly. `false` means the decision is recorded and the running workflow was not reachable — it will still stop on its next batch, but that is a real difference an o… |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422