Get a conversation

Read one whole conversation with GET /v3/inbound/threads/{id}: the emails you received, the email of yours they answer and your replies, as a reply tree.

Returns one conversation, oldest message first, with its summary. Each item says what it is (type) and which message it answers (parent_id), so you get the reply tree, not just a flat list — useful when several people answer in the same conversation.

GET /v3/inbound/threads/{id}

Path parameters

ParameterTypeRequiredDescription
iduuidRequiredConversation id — from the list, or the thread_id of an inbound message or reply. The id of a conversation that was merged into another returns the surviving one (its id in the response).

Query parameters

ParameterTypeRequiredDescription
fieldsstringOptionalfull (default) — inbound messages with bodies and headers; summary — no bodies or headers, a 160-character snippet instead.
limitintegerOptionalMessages per page, 1–100. Default 50.
cursorstringOptionalThe next_cursor of the previous page of this conversation.

Items

  • `inbound` — an email you received. inbound holds the full inbound message (the same object as GET /v3/inbound/messages/{id}).
  • `outbound` — an email of yours the conversation answers, for example the campaign email a person replied to. message holds its id, status, sender, recipients, subject, created_at and delivered_at — fetch the rest with `GET /v3/messages/{id}`.
  • `reply` — a reply you sent with `POST /v3/inbound/messages/{id}/reply`, with the same message fields.

parent_id is the id of the item this one answers, or null for the first message (or when the answered message is not stored here — for example an email from a mailbox outside wemail). Messages that were only forwarded and not stored are not shown.

Responses

StatusDescription
200{ id, summary, items, has_more, next_cursor }.
400validation_error — invalid id or query; invalid_cursor — the cursor is not a next_cursor value.
401Missing or invalid API key.
403insufficient_scope — a send_only key cannot read inbound mail.
404No such conversation on your workspace.
429More than 120 calls in a minute on this key.

Code examples

cURL
curl "https://api.wemail.io/v3/inbound/threads/9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c?fields=summary" \
  -H "Authorization: Bearer afn_live_…"
Node.js
const thread = await wemail.inbound.getInboundThread({ id: "9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c" });
for (const item of thread.items) {
  console.log(item.type, item.id, "answers", item.parentId, item.inbound?.subject ?? item.message?.subject);
}
Python
thread = wemail.inbound.get_inbound_thread("9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c")
for item in thread.items:
    print(item.type, item.id, "answers", item.parent_id)
Go
thread, _, err := client.API.InboundAPI.GetInboundThread(ctx, "9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c").Execute()
if err != nil { log.Fatal(err) }
for _, it := range thread.Items { fmt.Println(it.Type, it.Id) }
ResponseExample response
{
  "id": "9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
  "summary": { "id": "9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c", "subject": "Re: Autumn offer", "message_count": 2, "last_direction": "inbound", "…": "…" },
  "items": [
    {
      "type": "outbound",
      "id": "msg_Lx3kQ9aZ0bC4dE5fG",
      "parent_id": null,
      "at": "2026-11-07T08:00:02.000Z",
      "message": { "id": "msg_Lx3kQ9aZ0bC4dE5fG", "status": "delivered", "from": "news@shop.example.com", "to": ["maria@efood.gr"], "subject": "Autumn offer", "created_at": "2026-11-07T08:00:02.000Z", "delivered_at": "2026-11-07T08:00:04.310Z" }
    },
    {
      "type": "inbound",
      "id": "6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55",
      "parent_id": "msg_Lx3kQ9aZ0bC4dE5fG",
      "at": "2026-11-08T09:12:44.120Z",
      "inbound": { "id": "6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55", "from": "Maria Papadopoulou <maria@efood.gr>", "subject": "Re: Autumn offer", "text": "Hi, is the 20% discount also valid for the annual plan?", "thread_id": "9b2f6a1c-3d4e-4f5a-8b6c-7d8e9f0a1b2c", "…": "…" }
    }
  ],
  "has_more": false,
  "next_cursor": null
}