本文へスキップ
Won.dev
ドキュメントAPIリファレンス
コールドメールAPI

メールを却下する

承認待ちのメールを送らず、その人たちのシーケンスを終えます。無料。

承認待ち、または承認済みでまだ送られていないメールを却下します。メールは送られず(skipped)、その受信者にはキャンペーンからもう何も届きません(stopped、理由はdeclined)。代わりに別の内容を送るには、PATCH /email/messages/{id}でメールを変更してください。承認を求めるように設定したキーは却下できません(forbidden)。無料です。

  • 課金: 無料。

テストキー(won_test_...)では、これはサンドボックスで動きます。何も送信されず、課金もされません。

POST
/email/messages/decline

認証

apiKey
headerAuthorizationBearer <APIキー>

Authorization: Bearer won_live_..., a key from the console.

ヘッダーパラメータ

Idempotency-Key?string

Any unique string. A retry with the same key and the same body returns the first response and is not charged again.

長さlength <= 255

リクエストボディ

application/json
  1. body
message_ids*array<>

Up to 100 email IDs, such as msg_3e5r4k2m9x7p1q8w, from GET /email/messages?status=pending_approval.

要素1 <= items <= 100

レスポンスボディ

The result.

application/json
  1. 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  }}