跳到正文
Won.dev
冷邮件 API

发送活动列表

列出你的发送活动及其状态和数据。免费。

GET https://api.won.dev/v1/email/campaigns

列出你的发送活动,按时间倒序,每个都附带当前进度:多少人在等待、多少人在序列中、多少人已回复、多少退信,以及已花费的金额。免费。

  • 计费: 免费。

参数

参数放在查询字符串里,多个值用英文逗号分隔。

参数类型必填说明(API 原文)
statusdraft | in_review | active | paused | completed | canceled | suspended否Only campaigns in this status.
tenant_idstring否Only the campaigns of this tenant's senders.
limitinteger否How many to return, 1 to 100. Default: 25.
cursorstring否To get the next page, pass next_cursor of the previous response back unchanged, with the same parameters.

响应

错误说明见错误码。

字段类型说明(API 原文)
dataobject[]The campaigns of this page.
data[].idstringCampaign ID, such as cmp_7p1q8w3e5r4k2m9x.
data[].namestring
data[].sender_idstring
data[].tenant_idstring | nullIts sender's tenant_id. Null: the account itself.
data[].statusdraft | in_review | active | paused | completed | canceled | suspendeddraft until started. active sends. paused waits for resume. completed, canceled and suspended are final. in_review is no longer given: a campaign left waiting for a review from before starts by itself within minutes.
data[].pause_reasonmanual | insufficient_balance | max_cost | list_quality | sending_suspended | nullWhy it is paused: manual, insufficient_balance (top up, then resume), max_cost (the campaign's own cap is reached), list_quality (too many invalid addresses; resuming accepts the list as it is), sending_suspended.
data[].stepsobject[]The sequence, in order.
data[].steps[].delay_daysintegerSending days to wait after the email before. 0 on the first step.
data[].steps[].versionsobject[]The text of the step. More than one when versions are tested against each other.
data[].steps[].versions[].subjectstring | nullNull on a follow-up that goes out as a reply in the thread of the first email.
data[].steps[].versions[].bodystring
data[].steps[].versions[].weightintegerIts share of the recipients, relative to the other versions.
data[].steps[].versions[].statsobjectHow this version did.
data[].steps[].versions[].stats.sentinteger
data[].steps[].versions[].stats.openedintegerEmails opened at least once. Counted only when track_opens is on.
data[].steps[].versions[].stats.clickedinteger
data[].steps[].versions[].stats.repliedintegerReplies that came after this email and before the next one.
data[].scheduleobjectWhen emails go out: on these days, between these hours, in the recipient's time.
data[].schedule.timezonestringIANA time zone the hours are read in when a recipient's own is not known.
data[].schedule.days(sun | mon | tue | wed | thu | fri | sat)[]
data[].schedule.start_hourinteger
data[].schedule.end_hourinteger
data[].daily_limitintegerThe most emails the campaign sends on one day.
data[].stop_on_company_replybooleanOne person at a company answers: nobody else at that company gets another email.
data[].track_opensboolean
data[].track_clicksboolean
data[].max_costnumber | nullThe most the campaign may spend in its life, in US dollars. Null when not set.
data[].metadataobjectYour own keys and values, as you gave them. Empty when none were.
data[].statsobjectWhere the campaign stands.
data[].stats.recipientsintegerPeople in the campaign.
data[].stats.waitingintegerStill being checked, or waiting for their first email.
data[].stats.in_sequenceintegerGot at least one email and have more to come.
data[].stats.finishedintegerGot every email and did not answer.
data[].stats.repliedinteger
data[].stats.bouncedinteger
data[].stats.unsubscribedinteger
data[].stats.excludedintegerLeft out or stopped: invalid address, suppressed, or stopped by you.
data[].stats.emails_sentinteger
data[].stats.emails_openedinteger
data[].stats.emails_clickedinteger
data[].stats.spentnumberWhat the campaign has cost so far, in US dollars.
data[].stats.reservednumberSet aside from the balance for the emails of the next days, in US dollars.
data[].testbooleanMade with a test key: sending and replies are simulated.
data[].created_atstringWhen it was created, as an ISO 8601 time in UTC.
data[].started_atstring | null
data[].completed_atstring | null
has_morebooleanWhether more follow this page.
next_cursorstring | nullPass it as cursor to get the next page. Null on the last page.
noticestring | nullA plain sentence when there is something to know about this answer. Null otherwise.
usageobjectNothing is charged here. The balance, for reference.
usage.costnumberWhat this call cost, in US dollars.
usage.balancenumberThe balance left after this call, in US dollars.
usage.replayedbooleanTrue when this is a repeat of a request from the last 24 hours. Repeats are free.

示例

curl "https://api.won.dev/v1/email/campaigns?status=active&limit=1" \
  -H "Authorization: Bearer $WON_API_KEY"
{
  "data": [
    {
      "id": "cmp_7p1q8w3e5r4k2m9x",
      "name": "US chair importers, November",
      "sender_id": "snd_4k2m9x7p1q8w3e5r",
      "tenant_id": null,
      "status": "active",
      "pause_reason": 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": 42,
                "opened": 0,
                "clicked": 0,
                "replied": 3
              }
            }
          ]
        },
        {
          "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": 17,
                "opened": 0,
                "clicked": 0,
                "replied": 1
              }
            }
          ]
        }
      ],
      "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,
      "max_cost": 25,
      "metadata": {
        "customer_id": "c_812"
      },
      "stats": {
        "recipients": 120,
        "waiting": 74,
        "in_sequence": 38,
        "finished": 0,
        "replied": 4,
        "bounced": 1,
        "unsubscribed": 1,
        "excluded": 2,
        "emails_sent": 59,
        "emails_opened": 0,
        "emails_clicked": 0,
        "spent": 1.74,
        "reserved": 5.46
      },
      "test": false,
      "created_at": "2026-11-18T14:03:10.000Z",
      "started_at": "2026-11-18T14:03:11.000Z",
      "completed_at": null
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}

用测试 key(won_test_...)发送这个请求,会在沙箱中运行:不发信,不收费。

本页内容