Add a document to a container (tenant:dms:write)
POST /api/dms/v1/containers/{id}/items
Module: DMS · operationId: addContainerItem · Tag: Containers · Auth: access token (Authorization: Bearer <accessToken>)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes |
Request body
application/json (required)
documentId(string (uuid), required): Document to additemRole(string): Role of the document in the container (default"ATTACHMENT")sortOrder(integer): Position in the container
Example:
{
"documentId": "7e9a1c3e-5f7a-4b9c-8d1e-3f5a7b9c1d3e",
"itemRole": "ATTACHMENT",
"sortOrder": 2
}
Responses
- 200 The container with its items (
application/json) - 400 Error (
application/json) - 404 Error (
application/json)
Fields of the 200 answer:
containerNumber(string, required): Per-tenant, per-year container numbercontainerType(string, required): Kind of container, an upper-case codecreatedAt(string (date-time), required): Creation timecreatedBy(string, required): Who created the containercustomerNo(string, required): Customer number of the tenantid(string (uuid), required): Container idretentionYears(integer, required): Retention period in yearssourceChannel(string, required): Where the container came from, an upper-case codetenantName(string, required): Tenant nametitle(string, required): TitleupdatedAt(string (date-time), required): Time of the last changeemlDocumentId(string (uuid)): The original mail (EML item), if anyitems(array of DocumentContainerItem): The documents of the container (detail only)containerId(string (uuid), required): Container idcreatedAt(string (date-time), required): Time the document was addedcustomerNo(string, required): Customer number of the tenantdocumentId(string (uuid), required): Document idid(string (uuid), required): Item iditemRole(string, required):EML,ATTACHMENTor another codesortOrder(integer, required): Position in the containertenantName(string, required): Tenant namedocument(Document)confidentialLevel(ConfidentialLevel, required)createdAt(string (date-time), required): Upload timecurrentVersion(integer, required): Current version numbercustomerNo(string, required): Customer number of the tenantdocumentNumber(string, required): Per-tenant, per-year document numberextraction(Extraction, required)fileName(string, required): File name of the current versionfileSize(integer (int64), required): Size of the current versionid(string (uuid), required): Document idisArchived(boolean, required): Same asisLockedisEncrypted(boolean, required): Content is client-side encryptedisLocked(boolean, required): WORM lock (same asisArchived)isPortalVisible(boolean, required): Visible in the customer portallegalHold(boolean, required): A legal hold blocks deletion regardless of retentionmimeType(string, required): MIME type of the current versionretentionYears(integer, required): Retention period in years (from the document type)s3Bucket(string, required): Storage bucket of the current versions3Key(string, required): Storage key of the current versions3Path(string, required): Same ass3KeyscanStatus(ScanStatus, required)sha256Hash(string, required): Same ashashSha256(empty when unknown)sizeBytes(integer (int64), required): Size of the current version (same asfileSize)tenantName(string, required): Tenant nametitle(string, required): Defaults to the file nameupdatedAt(string (date-time), required): Time of the last changeuploadedBy(string, required): Who uploaded the documentversion(integer, required): Current version number (same ascurrentVersion)category(string): Document type codeclassificationStatus(string): Document classifier: type taken over automatically, proposal waiting for review, or chosen by a person; omitted when never classified (one ofclassified,needs_review,confirmed)deletedAt(string (date-time)): Time of the soft deleteencryptionAlgorithm(string): Only for encrypted documentsfolderId(string (uuid)): Folder the document is filed in; omitted when it has nonefolderPath(array of FolderRef): The folder and its ancestors, top level first (detail only)hashSha256(string): SHA-256 (hex) of the current versionlinks(array of DocumentLink): Omitted when the document has nonelockRetentionUntil(string (date-time)): End of the WORM lockmetadata(object): Free metadata (JSON object)retentionUntil(string (date-time)): End of the retention period; deletion is refused beforesource(string): How the document entered the DMS (one ofupload,mail,internal,api)versions(array of DocumentVersion): Only in the detail and after a version upload
metadata(object): Free metadata (JSON object)sourceReference(string): Reference in the source, e.g. a Message-ID
Example 200 answer:
{
"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"
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/dms/v1/containers/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/items' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"documentId":"7e9a1c3e-5f7a-4b9c-8d1e-3f5a7b9c1d3e","itemRole":"ATTACHMENT","sortOrder":2}'