## Mails received by a mailbox, newest first (comms:read; desk:admin its ticket mailboxes, hr:recruiting:manage its applicant mailboxes – another module's mailbox answers 404)

`GET /api/comms/v1/mailboxes/{id}/mails`

Module: Comms · operationId: `listMailboxMails` · Tag: Mailboxes · Auth: access token (`Authorization: Bearer <accessToken>`)

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `state` | query | string |  | Comma-separated states, e.g. PENDING,REJECTED_FINAL |
| `limit` | query | integer |  | 1–200; anything else is 400 invalid (default `50`; max 200) |
| `offset` | query | integer |  | 0–10000; anything else is 400 invalid (default `0`; max 10000) |
| `id` | path | string | yes |  |

### Responses

- **200** Mails (`application/json`)
- **400** Error (`application/json`)
- **404** Error (`application/json`)

Fields of the 200 answer:

- `items` (array of InboundMail): Mails of the page
  - `attachments` (array of string): File names of the attachments
  - `channelId` (string): Microsoft 365 connection (msgraph only)
  - `consumer` (string): The module the mail goes to (one of `invoice`, `desk`, `recruiting`)
  - `createdAt` (string (date-time)): When the mail was imported
  - `lastError` (string): Why the mail was rejected or failed
  - `mailbox` (string): The mailbox or platform address the mail came in on
  - `mailboxId` (string (uuid)): The mailbox that received the mail
  - `messageId` (string): Graph message id or SES message id
  - `receivedAt` (string (date-time)): When the mail was received
  - `selectedClassification` (string): Document type from "[CC:380]" in the subject
  - `sender` (string): Sender address
  - `source` (string): msgraph: a Microsoft 365 mailbox; ses: the platform address (one of `msgraph`, `ses`)
  - `state` (string): Import state; PENDING waits for the consumer (one of `PENDING`, `RETRY_MANUAL`, `ARCHIVED`, `REJECTED`, `DEAD_LETTER`, `COMPLETED`, `REJECTED_FINAL`)
  - `subject` (string): Subject
  - `updatedAt` (string (date-time)): Time of the last state change
- `total` (integer): Number of matching mails

Example 200 answer:

```json
{
  "items": [
    {
      "attachments": [
        "ap-restaurant.jpg"
      ],
      "channelId": "5e7a9c1b-3d4f-4a6b-9c8d-0e1f2a3b4c5d",
      "consumer": "desk",
      "createdAt": "2026-11-18T08:00:02Z",
      "mailbox": "support@muster-it.example",
      "mailboxId": "3d5f7a9b-1c2e-4f4a-8b6c-8d0e1f2a3b4c",
      "messageId": "AAMkAGI2THVSAAA=",
      "receivedAt": "2026-11-18T07:58:41Z",
      "sender": "it@alpenhotel-seeblick.example",
      "source": "msgraph",
      "state": "COMPLETED",
      "subject": "WLAN im Restaurant fällt aus",
      "updatedAt": "2026-11-18T08:00:05Z"
    }
  ],
  "total": 1
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/comms/v1/mailboxes/string/mails' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
