Recusar e-mails
Impede que saiam os e-mails que aguardam aprovação e encerra a cadência dessas pessoas. Grátis.
Recusa e-mails que aguardam aprovação, ou que foram aprovados e ainda não saíram: eles nunca saem (skipped), e os destinatários não recebem mais nada da campanha (stopped, motivo declined). Para enviar outra coisa no lugar, altere o e-mail com PATCH /email/messages/{id}. Uma chave configurada para pedir aprovação não pode recusar (forbidden). Grátis.
- Cobrança: Grátis.
Uma chave de teste (won_test_...) roda isto no sandbox: nada é enviado e nada é cobrado.
apiKeyAuthorizationBearer <chave de API>Authorization: Bearer won_live_..., a key from the console.
Idempotency-Key?stringAny unique string. A retry with the same key and the same body returns the first response and is not charged again.
length <= 255application/json- body
message_ids*array<>Up to 100 email IDs, such as msg_3e5r4k2m9x7p1q8w, from GET /email/messages?status=pending_approval.
1 <= items <= 100The result.
application/json- response
data*array<>One result per ID, in the order given.
notice*|A plain sentence when there is something to know about this answer. Null otherwise.
usage*Nothing is charged here. The balance, for reference.
curl -X POST 'https://api.won.dev/v1/email/messages/decline' \ -H 'Content-Type: application/json' \ -d '{ "message_ids": [ "msg_3e5r4k2m9x7p1q8w" ]}'{ "data": [ { "id": "msg_3e5r4k2m9x7p1q8w", "done": true, "status": "skipped" } ], "notice": null, "usage": { "cost": 0, "balance": 48.08, "replayed": false }}Última atualização em