跳到正文
Won.dev
文档API 参考
冷邮件 API

批量修改会话

一次最多标记 50 条会话,每条单独返回结果。免费。

一次最多标记 50 条会话,和 PATCH /conversations/{id} 标记一条一样:已读或未读、已处理或移回收件箱。每个 ID 按传入的顺序单独返回结果:如果这个 key 没有某个 ID 对应的会话,或者对方还没回信、会话不在任何文件夹里,它的 updated 为 false,其他会话照常修改。免费。

  • 计费: 免费。

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

PATCH
/conversations

鉴权

apiKey
headerAuthorizationBearer <API key>

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
ids*array<>

Up to 50 conversation IDs.

元素1 <= items <= 50
read?boolean

true marks it read, false unread.

done?boolean

true files it under done and marks it read. false moves it back to the inbox, where it stays until it is answered or marked done again.

响应体

The result.

application/json
  1. response
data*array<>

A result for each 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 PATCH 'https://api.won.dev/v1/conversations' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "cnv_9x7p1q8w3e5r4k2m",    "cnv_5r4k2m9x7p1q8w3e"  ],  "done": true}'
响应示例
{  "data": [    {      "id": "cnv_9x7p1q8w3e5r4k2m",      "updated": true,      "conversation": {        "id": "cnv_9x7p1q8w3e5r4k2m",        "channel": "email",        "folder": "done",        "unread": false,        "answered": false,        "name": "Dana Whitfield",        "company": "Harborline Imports",        "country": "US",        "campaign": {          "id": "cmp_7p1q8w3e5r4k2m9x",          "name": "US chair importers, November"        },        "replies": 1,        "last_reply": {          "id": "rpl_1q8w3e5r4k2m9x7p",          "intent": "interested",          "automated": false,          "text": "Hi, yes, please send the price list. We are reviewing suppliers for next quarter.",          "has_attachments": false,          "received_at": "2026-11-20T13:41:02.000Z"        },        "activity_at": "2026-11-20T13:41:02.000Z",        "email": {          "recipient_id": "rcp_9x7p1q8w3e5r4k2m",          "address": "dana.whitfield@harborline-imports.example",          "status": "replied",          "reply_from": "dana.whitfield@harborline-imports.example",          "subject": "Re: Office chairs for Harborline Imports"        }      }    },    {      "id": "cnv_5r4k2m9x7p1q8w3e",      "updated": false,      "conversation": null    }  ],  "notice": "This key has no conversation with the ID `cnv_5r4k2m9x7p1q8w3e`. Conversation IDs come from `GET /conversations`, and every recipient, reply and email names its own in `conversation_id`. A test key only sees the conversations of campaigns made with a test key.",  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}

最后更新于