--- type: API title: Inbound messages API description: Poll, read and triage inbound mail (support flows) — list with domain/local-part/status filters, full body with reply context, raw EML, handled/answered marking. resource: https://euromailing.com/api/v1/messages tags: [inbound, support, messages, api] timestamp: 2026-08-05T00:00:00Z --- # Inbound messages API Built for support agents that poll for new mail, draft a reply, send it via the [transactional API](transactional-emails.md) and mark the message answered. Works across every inbound domain and address on the account. Scopes: `messages:read`, `messages:write`. ## Poll for new mail ``` GET /api/v1/messages?status=open&domain=ledenboek.nl&local_part=support ``` Filters (all optional, combine freely): `status` (`open` | `handled` | `answered`), `domain` (inbound domain), `local_part` (the part before the @ — so one call per address, or omit for all), `since` (ISO 8601, for incremental polling), `page`/`per_page`. Triage state lives server-side: `open` → nobody claimed it, `handled` → claimed, `answered` → a reply went out. Two agent sessions can't double-answer if they claim (`PATCH … handled: true`) before drafting. ## Read one message `GET /api/v1/messages/:id` returns the full `text_body`/`html_body`, attachment metadata, and the **reply context**: - `reply_to_address` — where the answer should go (the sender) - `reply_from_address` — the address the customer wrote to; use it as the `from` of your reply so the thread stays consistent - `message_id_header` — put this in the reply's `In-Reply-To` and `References` headers (via the transactional API's `headers` object) `GET /api/v1/messages/:id/raw` returns the pristine original as `message/rfc822` when the parsed body isn't enough. ## Mark progress ``` PATCH /api/v1/messages/:id { "handled": true } PATCH /api/v1/messages/:id { "answered": true, "note": "replied: password reset link sent" } ``` ## The full support loop 1. `GET /messages?status=open` — anything new? 2. `PATCH { handled: true }` — claim it. 3. Draft the reply; send via `POST /transactional_emails` with `from = reply_from_address`, `to = reply_to_address`, and `headers: { "In-Reply-To": message_id_header, "References": message_id_header }`. 4. `PATCH { answered: true, note: "…" }`. Etiquette for autonomous agents: never reply to bounces, auto-replies (`Auto-Submitted` headers) or no-reply addresses, and cap replies per sender per day.