Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Received emails

Retrieve a conversation

GET/v1/threads/{id}

A conversation: its state (participants, counts, last message, awaiting_reply, unread, metadata) and its received and sent emails, oldest first.

Requires a full-access key.

awaiting_reply: the last email a person wrote came in (automated mail does not count). unread: something was received after read_at (set with PATCH /threads/{id}).

Threads are derived from the standard In-Reply-To / References headers: no setup. Every received email, webhook email.received and send response carries its thread_id.

Refused messages are not part of a thread. At most 500 emails are listed (has_more); fetch bodies with GET /emails/receiving/{id} and GET /emails/{id}/content.

Emails received before 2026-10-23 have a thread id but are not listed here.

Path parameters

idstring (UUID)required
Thread id (thread_id of any email in it)

Errors

restricted_api_keyHTTP 403
not_foundHTTP 404
thread not found (or past your plan's log retention)
GET/v1/threads/{id}
curl 'https://zapsmtp.xyz/v1/threads/3f1c9a52-6b0e-5d4f-8a71-2c9e0b4d6f13' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "thread",
  "id": "3f1c9a52-6b0e-5d4f-8a71-2c9e0b4d6f13",
  "subject": "Where is my order?",
  "participants": [
    "jane@example.org",
    "support@acme.com"
  ],
  "message_count": 3,
  "inbound_count": 2,
  "outbound_count": 1,
  "has_attachments": false,
  "first_message_at": "2026-10-21T15:10:02.904Z",
  "last_message_at": "2026-10-21T16:02:13.540Z",
  "last_inbound_at": "2026-10-21T16:02:13.540Z",
  "last_message": {
    "id": "019a1f52-0c1d-7f2e-8a3b-4c5d6e7f8091",
    "direction": "inbound",
    "from": "jane@example.org",
    "subject": "Re: Where is my order?"
  },
  "awaiting_reply": true,
  "unread": true,
  "read_at": null,
  "metadata": {
    "ticket": "T-1042"
  },
  "has_more": false,
  "data": [
    {
      "object": "email",
      "direction": "inbound",
      "id": "019a1f30-1d4e-7a6b-8c2d-3e4f5a6b7c8d",
      "created_at": "2026-10-21T15:10:02.904Z",
      "from": "jane@example.org",
      "to": [
        "support@acme.com"
      ],
      "cc": [],
      "subject": "Where is my order?",
      "message_id": "<CAF=abc123@mail.example.org>"
    },
    {
      "object": "email",
      "direction": "outbound",
      "id": "019a1f41-8b2c-7e3d-9f40-5a6b7c8d9e0f",
      "created_at": "2026-10-21T15:20:41.112Z",
      "from": "Acme Support <support@acme.com>",
      "to": [
        "jane@example.org"
      ],
      "cc": [],
      "subject": "Re: Where is my order?"
    },
    {
      "object": "email",
      "direction": "inbound",
      "id": "019a1f52-0c1d-7f2e-8a3b-4c5d6e7f8091",
      "created_at": "2026-10-21T16:02:13.540Z",
      "from": "jane@example.org",
      "to": [
        "support@acme.com"
      ],
      "cc": [],
      "subject": "Automatic reply: Where is my order?",
      "message_id": "<CAF=def456@mail.example.org>",
      "automated": "out_of_office"
    }
  ]
}