# 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.

TIP

Calling this endpoint yourself is optional. If you don't, eConnect automatically acknowledges the sender with an AB 5 minutes after the document was received. Call this endpoint yourself only if you want to reply sooner or with a more specific status, for example AP.

# 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

A RE reply can include one or more lines, each with a statusReasonCode:

Code Meaning
BV Business rule violation, fatal
BW Business rule violation, warning
FD Failure of delivery
SV Syntax violation

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

Only one MLS reply is allowed per document. A first call returns 200 OK:

{
  "id": "08c55b6f-4456-4c3a-bf17-af3450e9ccde"
}

A second call returns 400 Bad Request. This also applies to a call made after eConnect already sent the automatic AB:

{
  "id": "c775f6ab-8525-4b68-bf89-fb0ff081557f",
  "helpLink": "https://accp-psb.econnect.eu/endpoints/v1-beta/Generic.html#send-generic-response",
  "message": "MLS cannot be sent because an MLS reply was already sent for this document.",
  "code": "API400.MLS02",
  "requestId": "b8ffed4bb5ab0d0be29c714611c0e902",
  "dateTime": "2026-08-18T20:49:57.7069931+00:00"
}

# 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:12345678",
  "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.