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

メールを承認する

承認待ちのメールを、書かれたとおりに送ります。無料。

承認待ち(pending_approval)のメールを承認します。それぞれ書かれたとおりに、そのメールボックスが送れるようになり、受信者が勤務時間内になったらすぐに送られます。承認待ちでないもの(すでに承認したものなど)はそのままです(done: false)。承認を求めるように設定したキーは承認できません(forbidden)。承認はコンソールで人が行います。無料です。

  • 課金: 呼び出しは無料で、メールも無料です。メールは送信者の送信ドメインから送られ、ドメインは月ごとに支払います。送信ドメインを参照してください。

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

POST
/email/messages/approve

認証

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/approve' \  -H 'Content-Type: application/json' \  -d '{  "message_ids": [    "msg_3e5r4k2m9x7p1q8w"  ]}'
レスポンスの例
{  "data": [    {      "id": "msg_3e5r4k2m9x7p1q8w",      "done": true,      "status": "approved"    }  ],  "notice": null,  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}