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

メールを変更する

承認待ちのメールを、宛先のその1人に向けて変更します。無料。

承認待ち、または承認済みでまだ送られていないメールの件名や本文を、その1人に向けて変更します。ほかのメールと同じようにチェックされ、もう一度承認を待ちます。プレースホルダーはすでに埋まっているので、言葉で書いてください。前のメールに返信するフォローアップは、そのスレッドの件名を引き継ぎます。あとでキャンペーンのステップを変えても、変更したメールはそのままです。無料です。

  • 課金: 無料。

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

PATCH
/email/messages/{id}

認証

apiKey
headerAuthorizationBearer <APIキー>

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

パスパラメータ

id*string

Email ID, such as msg_3e5r4k2m9x7p1q8w.

長さlength <= 40

ヘッダーパラメータ

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
subject?string

The new subject line.

長さ1 <= length <= 300
text?string

The new text, as plain text. The footer and the unsubscribe link are added when it goes out.

長さ1 <= length <= 4000

レスポンスボディ

The result.

application/json
  1. response
data*
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 PATCH 'https://api.won.dev/v1/email/messages/msg_3e5r4k2m9x7p1q8w' \  -H 'Content-Type: application/json' \  -d '{  "id": "msg_3e5r4k2m9x7p1q8w",  "text": "Hi Dana,\n\nI saw that Harborline Imports imports office seating, and that you opened a warehouse in Savannah. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\nAlex"}'
レスポンスの例
{  "data": {    "id": "msg_3e5r4k2m9x7p1q8w",    "conversation_id": "cnv_9x7p1q8w3e5r4k2m",    "campaign_id": "cmp_7p1q8w3e5r4k2m9x",    "recipient_id": "rcp_9x7p1q8w3e5r4k2m",    "from": "alex@northwindseating.example",    "to": "dana.whitfield@harborline-imports.example",    "kind": "step",    "step": 1,    "version": 1,    "status": "pending_approval",    "subject": "Office chairs for Harborline Imports",    "text": "Hi Dana,\n\nI saw that Harborline Imports imports office seating, and that you opened a warehouse in Savannah. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\nAlex",    "opens": 0,    "clicks": 0,    "bounce_type": null,    "attachments": [],    "sent_at": null  },  "notice": null,  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}