キャンペーンを作成する
リストの宛先に最大6通のシーケンスを作成し、開始します。無料で、メールは送信者の送信ドメインから送られます。
リストの宛先に最大6通のシーケンスを作成し、start: true を指定すると送信を始めます。送信者自身の送信ドメイン(POST /email/domains)のメールボックスから、メールボックスあたり1日数通ずつ、各受信者の勤務時間内に送ります。各受信者にはシーケンスの最後まで同じメールボックスから届き、返信、バウンス、配信停止があった時点でその人へのシーケンスは止まります。キャンペーンもメールも無料です。送信者のドメインが送る分は、ドメインの料金に含まれています。キャンペーンは1日に daily_limit が許す数まで、ドメインが合わせて送れる範囲で送ります。この範囲は送信者のすべてのキャンペーンで分け合います。まず dry_run: true を指定してください。本文とリストをチェックし、最初の受信者たちに届く最初のメールと、送信者の今のドメインでキャンペーンにどれくらいかかるかを示しますが、何も作成しません。送信者にドメインがない間は、開始すると no_domains で失敗します。Idempotency-Key ヘッダーをつければ、再試行でキャンペーンが二重に作られることはありません。受信者はあとから POST /email/campaigns/{id}/recipients で追加することもできます。
- 課金: 呼び出しは無料で、メールも無料です。メールは送信者の送信ドメインから送られ、ドメインは月ごとに支払います。送信ドメインを参照してください。
テストキー(won_test_...)では、これはサンドボックスで動きます。何も送信されず、課金もされません。
apiKeyAuthorizationBearer <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
sender_id*stringThe sender the emails are for, from POST /email/senders.
length <= 40name*stringA name for your own reference. Recipients never see it.
1 <= length <= 120steps*array<>The emails of the sequence, in order. Two to four work best.
1 <= items <= 6recipients?array<>Up to 1000 people to write to. Each is checked: bad addresses, people on a suppression list and people in regions the sender has not declared are left out and listed in the answer.
items <= 1000schedule?When emails go out. The hours are read in each recipient's own time zone when their country or time zone is known.
daily_limit?integerThe most emails the campaign sends on one day. It never sends more than the sender's domains may send, 45 a day each at full speed, which the sender's campaigns share.
1 <= value <= 100050stop_on_company_reply?booleanWhen one person at a company answers, stop writing to the others at that company.
truetrack_opens?booleanCount opens with an invisible image. Off by default: it lowers inbox placement, and mail programs that fetch images themselves make the numbers unreliable.
falsetrack_clicks?booleanCount clicks by sending links through our redirect. Off by default, for the same reason.
falsemetadata?Your own keys and values, such as {"customer_id": "c_812"}: up to 20 keys of at most 40 characters, each value a string of at most 500. Returned as given, and in the events about it.
start?booleanStart sending right away. Otherwise the campaign is a draft until POST /email/campaigns/{id}/start.
falsedry_run?booleanCheck everything and show a preview, without creating anything. Problems in the texts are listed instead of failing the call.
falseThe result.
application/json- response
data*The campaign, and what the checks found in its list and its texts.
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/campaigns' \ -H 'Content-Type: application/json' \ -d '{ "sender_id": "snd_4k2m9x7p1q8w3e5r", "name": "US chair importers, November", "steps": [ { "subject": "Office chairs for {{company}}", "body": "Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}" }, { "delay_days": 3, "body": "Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}" } ], "recipients": [ { "email": "dana.whitfield@harborline-imports.example", "first_name": "Dana", "company": "Harborline Imports", "country": "US" }, { "email": "info@coastal-office.example", "company": "Coastal Office Supply" } ], "daily_limit": 30, "start": false}'{ "data": { "dry_run": false, "campaign": { "id": "cmp_7p1q8w3e5r4k2m9x", "name": "US chair importers, November", "sender_id": "snd_4k2m9x7p1q8w3e5r", "status": "draft", "pause_reason": null, "waiting": null, "steps": [ { "delay_days": 0, "versions": [ { "subject": "Office chairs for {{company}}", "body": "Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}", "weight": 1, "stats": { "sent": 0, "opened": 0, "clicked": 0, "replied": 0 } } ] }, { "delay_days": 3, "versions": [ { "subject": null, "body": "Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}", "weight": 1, "stats": { "sent": 0, "opened": 0, "clicked": 0, "replied": 0 } } ] } ], "schedule": { "timezone": "America/New_York", "days": [ "mon", "tue", "wed", "thu", "fri" ], "start_hour": 9, "end_hour": 17 }, "daily_limit": 30, "stop_on_company_reply": true, "track_opens": false, "track_clicks": false, "metadata": { "customer_id": "c_812" }, "stats": { "recipients": 2, "waiting": 2, "in_sequence": 0, "finished": 0, "replied": 0, "bounced": 0, "unsubscribed": 0, "excluded": 0, "emails_sent": 0, "emails_opened": 0, "emails_clicked": 0 }, "test": false, "created_at": "2026-11-18T14:03:10.000Z", "started_at": null, "completed_at": null }, "recipients": { "accepted": 2, "duplicates": 0, "rejected": 0, "results": [ { "email": "info@coastal-office.example", "status": "accepted", "recipient_id": "rcp_5r4k2m9x7p1q8w3e", "reason": null, "message": null, "warnings": [ "shared_mailbox" ] } ] }, "content": { "problems": [], "advice": [], "variables": [ { "name": "company", "required": true }, { "name": "first_name", "required": false } ] }, "preview": [], "estimate": { "emails": 4, "per_day": 30, "days": 4, "domains_for_a_week": 1 } }, "notice": null, "usage": { "cost": 0, "balance": 48.08, "replayed": false }}最終更新日