# Tutorial: Sending an "Message Level Response" back to the sender v1-beta

Use this flow when you have received a document and want to send a Peppol Message Level Status (MLS) back to the original sender. An MLS is a technical response that communicates whether the received message was accepted or rejected for further processing.

WARNING

This endpoint is intended for testing. In the normal flow, eConnect sends the MLS automatically after successful delivery.

# Prerequisite

  • You have received a document through eConnect.
  • You know the documentId of that received document.
  • The sender supports receiving MLS messages.

# Step 1: Register hook

Register a hook (opens new window) for the topic MessageLevelStatusSent.

Webhook example:

{
   "id": "mls",
   "name": "mls sent webhook",
   "action": "https://webhook.site/aaaaaa#secureKey",
   "topics": [
     "MessageLevelStatusSent"
   ],
   "isActive": true
}

# Step 2: Send MLS response

Send the MLS by calling POST /api/v1-beta/generic/{documentId}/response.

Replace {documentId} with the documentId of the received document.

This endpoint is also documented on the Generic API endpoint page.

The request body contains the MLS status and an optional description. For example, to accept a document:

{
  "status": "AP",
  "description": "Document delivered."
}

To reject a document, use for example:

{
  "status": "RE",
  "description": "Document could not be delivery due to connectivity errors.",
  "lines": [
    {
        "statusReasonCode": "FD", 
        "description": "Socket exception"
    }
   ]
}

The MLS status values are:

Status Meaning
AB Acknowledge
AP Accepted
RE Rejected

Depending on the response flow, additional line-level details may also be supported.

# Step 3: Receive webhook

Wait for the receiver to return an MLS. When it is received, eConnect sends a webhook like this:

{
  "topic": "MessageLevelStatusSent",
  "partyId": "NL:KVK:ECONNECTTS",
  "hookId": "mls",
  "documentId": "c4a31897-66ac-468c-a7e8-14a24f9af114",
  "refToDocumentId": "be7005ff-5555-41eb-afef-f5ffec2b29ed",
  "message": "'ApplicationResponse' successfully sent: '088762a2-2446-4077-a9b3-d20959b2565c@39wxve.econnect.eu'.",
  "details": {
    "statusCode": "AP",
    "status": "Accept",
    "description": "Document is accepted",
    "id": "4415d6a9-dba0-4fa9-86bb-7c3f6b82ed03@39wxve.econnect.eu",
    "createdBy": "Api",
    "receiver": "SPIS:000052",
    "sender": "SPIS:000052",
    "receiverName": "-",
    "profileId": "urn:peppol:edec:mls",
    "refToMessageId": "4415d6a9-dba0-4fa9-86bb-7c3f6b82ed03@39wxve.econnect.eu",
    "sourceDocumentTypeId": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2::ApplicationResponse##urn:peppol:edec:mls:1.0::2.1",
    "attempt": "1",
    "targetDocumentTypeId": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2::ApplicationResponse##urn:peppol:edec:mls:1.0::2.1",
    "endpoint": "https://accp-ap.econnect.eu/as4/v1/",
    "protocol": "As4",
    "accessPoint": "CN=PNL000052, OU=PEPPOL TEST AP, O=eConnect International B.V., C=NL",
    "processId": "urn:peppol:edec:mls",
    "returnedMessageId": "088762a2-2446-4077-a9b3-d20959b2565c@39wxve.econnect.eu"
  },
  "createdOn": "2026-03-12T21:12:20.1621727+00:00",
  "sentOn": "2026-03-12T21:12:20.3726218+00:00"
}

# See also

© 2026 eConnect International B.V.