## List containers, newest first (tenant:dms:read)

`GET /api/dms/v1/containers`

Module: DMS · operationId: `listContainers` · Tag: Containers · Auth: access token (`Authorization: Bearer <accessToken>`)

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `limit` | query | integer |  | Page size; another value than 1–100 is a `400 invalid` (`field: limit`) (default `50`; max 100) |
| `offset` | query | integer |  | Items to skip; a negative value is a `400 invalid` (default `0`) |

### Responses

- **200** A page of containers with their items (`application/json`)

Fields of the 200 answer:

- `items` (array of DocumentContainer, required): Containers of the page, newest first
  - `containerNumber` (string, required): Per-tenant, per-year container number
  - `containerType` (string, required): Kind of container, an upper-case code
  - `createdAt` (string (date-time), required): Creation time
  - `createdBy` (string, required): Who created the container
  - `customerNo` (string, required): Customer number of the tenant
  - `id` (string (uuid), required): Container id
  - `retentionYears` (integer, required): Retention period in years
  - `sourceChannel` (string, required): Where the container came from, an upper-case code
  - `tenantName` (string, required): Tenant name
  - `title` (string, required): Title
  - `updatedAt` (string (date-time), required): Time of the last change
  - `emlDocumentId` (string (uuid)): The original mail (EML item), if any
  - `items` (array of DocumentContainerItem): The documents of the container (detail only)
    - `containerId` (string (uuid), required): Container id
    - `createdAt` (string (date-time), required): Time the document was added
    - `customerNo` (string, required): Customer number of the tenant
    - `documentId` (string (uuid), required): Document id
    - `id` (string (uuid), required): Item id
    - `itemRole` (string, required): `EML`, `ATTACHMENT` or another code
    - `sortOrder` (integer, required): Position in the container
    - `tenantName` (string, required): Tenant name
    - `document` (Document)
  - `metadata` (object): Free metadata (JSON object)
  - `sourceReference` (string): Reference in the source, e.g. a Message-ID
- `total` (integer, required): Number of containers of the tenant

Example 200 answer:

```json
{
  "items": [
    {
      "containerNumber": "CNT-2026-000007",
      "containerType": "EMAIL",
      "createdAt": "2026-09-30T08:40:12Z",
      "createdBy": "christina.adler@muster-it.example",
      "customerNo": "99999",
      "emlDocumentId": "2e4a6c8e-0f2a-4b4c-8d6e-8f0a2b4c6d8e",
      "id": "0c2e4a6c-8d0e-4f2a-9b4c-6d8e0f2a4b6c",
      "items": [
        {
          "containerId": "0c2e4a6c-8d0e-4f2a-9b4c-6d8e0f2a4b6c",
          "createdAt": "2026-09-30T08:40:12Z",
          "customerNo": "99999",
          "documentId": "2e4a6c8e-0f2a-4b4c-8d6e-8f0a2b4c6d8e",
          "id": "4a6c8e0a-2b4c-4d6e-8f0a-0b2c4d6e8f0a",
          "itemRole": "EML",
          "sortOrder": 0,
          "tenantName": "DEMO"
        },
        {
          "containerId": "0c2e4a6c-8d0e-4f2a-9b4c-6d8e0f2a4b6c",
          "createdAt": "2026-09-30T08:40:12Z",
          "customerNo": "99999",
          "documentId": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7a9c1f42",
          "id": "6c8e0a2c-4d6e-4f8a-9b2c-2d4e6f8a0b2c",
          "itemRole": "ATTACHMENT",
          "sortOrder": 1,
          "tenantName": "DEMO"
        }
      ],
      "metadata": {
        "from": "rechnungen@nordlicht-distribution.example"
      },
      "retentionYears": 10,
      "sourceChannel": "MAIL",
      "sourceReference": "\u003c20260930064512.4711@nordlicht-distribution.example\u003e",
      "tenantName": "DEMO",
      "title": "Rechnung RE-482117 zu Ihrer Bestellung BE-2026-0815",
      "updatedAt": "2026-09-30T08:40:12Z"
    }
  ],
  "total": 1
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/dms/v1/containers' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
