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

会話を変更する

会話を既読か未読に、または対応済みか受信トレイに戻した状態にします。コンソールでの操作と同じです。無料。

会話を既読か未読(read)に、または対応済みか受信トレイに戻した状態(done)にします。アカウントの全員に反映され、コンソールにも表示されます。対応済みにするとdoneに移って既読になり、あとから返信が届くとそこから出ます。done: falseは会話を受信トレイに戻し、返答するか、もう一度対応済みにするまでそこに残します。返答済みの会話や、最後の返信に返事の要らない会話でも同じです。返答すると会話は自動でdoneに移るので、これは返事の要らない会話のためのものです。まだ返信のない会話はどのフォルダーにも入っていないので、変更しようとするとinvalid_stateで失敗します。無料です。

  • 課金: 無料。

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

PATCH
/conversations/{id}

認証

apiKey
headerAuthorizationBearer <APIキー>

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

パスパラメータ

id*string

Conversation ID, such as cnv_9x7p1q8w3e5r4k2m.

長さ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
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*
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/cnv_9x7p1q8w3e5r4k2m' \  -H 'Content-Type: application/json' \  -d '{  "id": "cnv_9x7p1q8w3e5r4k2m",  "done": true}'
レスポンスの例
{  "data": {    "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"    }  },  "notice": null,  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}

最終更新日