# 会話を取得する

Source: https://won.dev/ja/docs/email/conversations-get

`GET https://api.won.dev/v1/conversations/{id}`

1つの会話を、今の状態と、そこで書かれたすべてとともに古い順に返します。キャンペーンで連絡した人には、返信がまだなくても会話があります。`email`では、送ったステップ、返ってきたメール（同じ会社の同僚からのものも含む）、あなたの返答と単発メールで、それぞれ本文全体つきです。`email.recipient`で、その人のシーケンスがどこまで進んだかがわかり、返信には添付ファイルとダウンロードリンクがつきます。返答する前や、もう一度書く前に読んでください。読んでも既読にはなりません。既読にするのは`PATCH /conversations/{id}`です。返るのは最新の100件で、それより前があれば`truncated`でわかります。無料です。

- **課金：** 無料。

テストキー（`won_test_...`）では、これは[サンドボックス](/ja/docs/email#sandbox)で動きます。何も送信されず、課金もされません。

## パラメーター [#parameters]

`id`はパスに含めます。それ以外はクエリ文字列で渡し、リストはカンマ区切りにします。

| パラメーター | 型 | 必須 | 説明（APIの原文） |
| --- | --- | --- | --- |
| `id` | string | はい | Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`. |

## レスポンス [#response]

エラーについては[エラーコード](/ja/docs/errors)を参照してください。

| フィールド | 型 | 説明（APIの原文） |
| --- | --- | --- |
| `data` | object | The conversation, and everything written in it. |
| `data.id` | string | Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`. |
| `data.channel` | `email` | Where it runs: `email` for now. What only a channel has is in the object of its name. |
| `data.folder` | `inbox` \| `low` \| `done` \| null | `inbox` while its last reply waits for an answer, `low` when that reply needs nobody (an automatic answer, a no, an unsubscribe), `done` once it is answered or marked done. A reply that comes later takes it out of `done` again. Null while they have not written back: the folders hold the ones who did. |
| `data.unread` | boolean | A reply came after it was last read. |
| `data.answered` | boolean | The last word is yours: an answer or a single email went out after the last reply. False while they have not written back. |
| `data.name` | string \| null | The person's name, when it is known. |
| `data.company` | string \| null |  |
| `data.country` | string \| null | ISO 3166-1 alpha-2. |
| `data.campaign` | object | The campaign that wrote to them. |
| `data.campaign.id` | string |  |
| `data.campaign.name` | string |  |
| `data.replies` | integer | Replies in it, automatic ones included. |
| `data.last_reply` | object \| null | The reply it is about, which an answer goes to: the last one a person wrote, else the last automatic one. Null while they have not written back. |
| `data.last_reply.id` | string | Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`. |
| `data.last_reply.intent` | `interested` \| `question` \| `not_interested` \| `wrong_person` \| `unsubscribe` \| `out_of_office` \| `other` | What it means. |
| `data.last_reply.automated` | boolean | An automatic answer, such as an out-of-office note. |
| `data.last_reply.text` | string | The start of its text, up to 300 characters. |
| `data.last_reply.has_attachments` | boolean |  |
| `data.last_reply.received_at` | string | When it arrived, as an ISO 8601 time in UTC. |
| `data.activity_at` | string | The last reply, or the last answer when that is later; before a reply, the last email that went out, as an ISO 8601 time in UTC. |
| `data.email` | object \| null | With `channel` `email`: what is particular to email. Null in other channels. |
| `data.email.recipient_id` | string | The recipient, such as `rcp_9x7p1q8w3e5r4k2m`, to write to again with `POST /email/messages`. |
| `data.email.address` | string | The address the campaign wrote to. |
| `data.email.status` | `verifying` \| `scheduled` \| `active` \| `replied` \| `completed` \| `bounced` \| `unsubscribed` \| `suppressed` \| `invalid` \| `stopped` | Where their sequence stands, as a recipient's `status`: someone `unsubscribed`, `bounced`, `suppressed` or `invalid` cannot be written to. |
| `data.email.reply_from` | string \| null | The address the last reply came from: another one when a colleague answered. Null while they have not written back. |
| `data.email.subject` | string \| null | The subject of the last reply. Null while they have not written back. |
| `data.email.recipient` | object | The person the campaign wrote to, with where their sequence stands and your metadata. |
| `data.email.recipient.id` | string | Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`. |
| `data.email.recipient.conversation_id` | string | Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`. |
| `data.email.recipient.campaign_id` | string |  |
| `data.email.recipient.email` | string |  |
| `data.email.recipient.first_name` | string \| null |  |
| `data.email.recipient.last_name` | string \| null |  |
| `data.email.recipient.company` | string \| null |  |
| `data.email.recipient.country` | string \| null | ISO 3166-1 alpha-2, as given or as read off the address. |
| `data.email.recipient.contact_id` | string \| null | The person ID it was added by. |
| `data.email.recipient.status` | `verifying` \| `scheduled` \| `active` \| `replied` \| `completed` \| `bounced` \| `unsubscribed` \| `suppressed` \| `invalid` \| `stopped` | `verifying` while the address is checked, `scheduled` before the first email, `active` between emails. Final: `replied`, `completed` (every email sent, no answer), `bounced`, `unsubscribed`, `suppressed`, `invalid`, `stopped`. |
| `data.email.recipient.reason` | string \| null | Why, for `invalid`, `stopped`, `bounced` and `suppressed`. |
| `data.email.recipient.risky` | boolean | The address could not be confirmed: its domain accepts mail for any name. |
| `data.email.recipient.emails_sent` | integer |  |
| `data.email.recipient.next_send_at` | string \| null | When the next email is due at the earliest. |
| `data.email.recipient.last_sent_at` | string \| null |  |
| `data.email.recipient.metadata` | object | Your own keys and values, as you gave them. Empty when none were. |
| `data.email.recipient.created_at` | string | When it was added, as an ISO 8601 time in UTC. |
| `data.messages` | object[] | With `channel` `email`: the emails, oldest first. |
| `data.messages[].type` | `sent` \| `received` | `sent` for an email to them, `received` for one from them or a colleague. |
| `data.messages[].at` | string | When it was sent or arrived, as an ISO 8601 time in UTC. |
| `data.messages[].message` | object \| null | With `sent`: the email. Null otherwise. |
| `data.messages[].message.id` | string | Message ID, such as `msg_3e5r4k2m9x7p1q8w`. |
| `data.messages[].message.conversation_id` | string | Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`. |
| `data.messages[].message.campaign_id` | string |  |
| `data.messages[].message.recipient_id` | string |  |
| `data.messages[].message.from` | string \| null | The address it went out from: a mailbox of the sender's domains. |
| `data.messages[].message.to` | string |  |
| `data.messages[].message.kind` | `step` \| `reply` \| `single` | `step` of the sequence, `reply` (your answer to a reply), or `single` (an email you sent on its own with `POST /email/messages`). |
| `data.messages[].message.step` | integer \| null | The step, counted from 1. Null for a reply or a single email. |
| `data.messages[].message.version` | integer | Which version of the step went out, counted from 1. |
| `data.messages[].message.status` | `sending` \| `sent` \| `bounced` \| `failed` \| `skipped` | `sent`, `bounced`, or `sending` for the seconds it takes. `failed` and `skipped` did not go out. |
| `data.messages[].message.subject` | string |  |
| `data.messages[].message.opens` | integer | Opens that look like a person's. Machines that fetch mail to scan it are left out. |
| `data.messages[].message.clicks` | integer |  |
| `data.messages[].message.bounce_type` | `hard` \| `soft` \| null |  |
| `data.messages[].message.attachments` | object[] | The files that went with it. |
| `data.messages[].message.attachments[].filename` | string |  |
| `data.messages[].message.attachments[].content_type` | string |  |
| `data.messages[].message.attachments[].size` | integer | In bytes. |
| `data.messages[].message.sent_at` | string \| null |  |
| `data.messages[].message.text` | string \| null | What it said, placeholders filled in, without the footer and the quoted email. |
| `data.messages[].reply` | object \| null | With `received`: the reply. Null otherwise. |
| `data.messages[].reply.id` | string | Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`. |
| `data.messages[].reply.conversation_id` | string | Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`. |
| `data.messages[].reply.campaign_id` | string |  |
| `data.messages[].reply.recipient_id` | string |  |
| `data.messages[].reply.from_email` | string |  |
| `data.messages[].reply.from_name` | string \| null |  |
| `data.messages[].reply.subject` | string |  |
| `data.messages[].reply.text` | string | What the person wrote, without the quoted email underneath. |
| `data.messages[].reply.intent` | `interested` \| `question` \| `not_interested` \| `wrong_person` \| `unsubscribe` \| `out_of_office` \| `other` | What the reply means: `interested`, `question`, `not_interested`, `wrong_person`, `unsubscribe`, `out_of_office` or `other`. |
| `data.messages[].reply.confidence` | number | How sure the intent is, 0 to 1. Read the text when it is low. |
| `data.messages[].reply.automated` | boolean | An automatic answer, such as an out-of-office note. |
| `data.messages[].reply.matched_by` | `thread` \| `address` \| `domain` | How it was tied to the recipient: it answers our email, it comes from their address, or from a colleague at the same company. |
| `data.messages[].reply.has_attachments` | boolean | The email came with files. They are listed in `attachments` within a minute or two of the reply showing up. |
| `data.messages[].reply.attachments` | object[] | The files it came with, in their order. |
| `data.messages[].reply.attachments[].id` | string | Attachment ID, such as `att_6m2k9x7p1q8w3e5r`. |
| `data.messages[].reply.attachments[].filename` | string |  |
| `data.messages[].reply.attachments[].content_type` | string | As the sender's mail program declared it. |
| `data.messages[].reply.attachments[].size` | integer | In bytes. |
| `data.messages[].reply.attachments[].status` | `pending` \| `stored` \| `failed` \| `skipped` | `stored` once we have a copy, `pending` for the minute or two before. `skipped` files are not copied: programs and scripts (`reason: blocked_type`) and files over 15 MB (`too_large`). `failed` could not be read from the mailbox. |
| `data.messages[].reply.attachments[].reason` | string \| null | Why it was skipped or failed. |
| `data.messages[].reply.attachments[].download_url` | string \| null | Where to download it, without an API key, for one hour from this response. Null for a skipped or failed file. |
| `data.messages[].reply.metadata` | object | The campaign's metadata with the recipient's over it, as they were when the reply arrived: up to 40 keys. |
| `data.messages[].reply.received_at` | string | When it arrived, as an ISO 8601 time in UTC. |
| `data.truncated` | boolean | Whether there were more than 100 and the oldest were left out. |
| `notice` | string \| null | A plain sentence when there is something to know about this answer. Null otherwise. |
| `usage` | object | Nothing is charged here. The balance, for reference. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## 例 [#example]

```bash
curl "https://api.won.dev/v1/conversations/cnv_9x7p1q8w3e5r4k2m" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "data": {
    "id": "cnv_9x7p1q8w3e5r4k2m",
    "channel": "email",
    "folder": "inbox",
    "unread": true,
    "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",
      "recipient": {
        "id": "rcp_9x7p1q8w3e5r4k2m",
        "conversation_id": "cnv_9x7p1q8w3e5r4k2m",
        "campaign_id": "cmp_7p1q8w3e5r4k2m9x",
        "email": "dana.whitfield@harborline-imports.example",
        "first_name": "Dana",
        "last_name": "Whitfield",
        "company": "Harborline Imports",
        "country": "US",
        "contact_id": null,
        "status": "active",
        "reason": null,
        "risky": false,
        "emails_sent": 1,
        "next_send_at": "2026-11-24T15:20:00.000Z",
        "last_sent_at": "2026-11-19T15:07:31.000Z",
        "metadata": {
          "crm_id": "lead_4471"
        },
        "created_at": "2026-11-18T14:03:10.000Z"
      }
    },
    "messages": [
      {
        "type": "sent",
        "at": "2026-11-19T15:07:31.000Z",
        "message": {
          "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": "sent",
          "subject": "Office chairs for Harborline Imports",
          "opens": 0,
          "clicks": 0,
          "bounce_type": null,
          "attachments": [],
          "sent_at": "2026-11-19T15:07:31.000Z",
          "text": "Hi Dana,\n\nI saw that Harborline Imports 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\nAlex"
        },
        "reply": null
      },
      {
        "type": "received",
        "at": "2026-11-20T13:41:02.000Z",
        "message": null,
        "reply": {
          "id": "rpl_1q8w3e5r4k2m9x7p",
          "conversation_id": "cnv_9x7p1q8w3e5r4k2m",
          "campaign_id": "cmp_7p1q8w3e5r4k2m9x",
          "recipient_id": "rcp_9x7p1q8w3e5r4k2m",
          "from_email": "dana.whitfield@harborline-imports.example",
          "from_name": "Dana Whitfield",
          "subject": "Re: Office chairs for Harborline Imports",
          "text": "Hi, yes, please send the price list. Our spec sheet for the tender is attached.",
          "intent": "interested",
          "confidence": 0.7,
          "automated": false,
          "matched_by": "thread",
          "has_attachments": true,
          "attachments": [
            {
              "id": "att_6m2k9x7p1q8w3e5r",
              "filename": "tender-spec.pdf",
              "content_type": "application/pdf",
              "size": 248113,
              "status": "stored",
              "reason": null,
              "download_url": "https://won.dev/e/a/eyJhIjoiYXR0XzZtMms5eDdwMXE4dzNlNXIifQ.c2FtcGxl"
            }
          ],
          "metadata": {
            "customer_id": "c_812",
            "crm_id": "lead_4471"
          },
          "received_at": "2026-11-20T13:41:02.000Z"
        }
      }
    ],
    "truncated": false
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```