Skip to content

Registered mail

An electronic registered mail (LRE) is sent from a verified sender account to one or more recipients. Each recipient gets an item with its own status, timeline and legal proofs (deposit, delivery, refusal, negligence, content).

Each item goes through:

draft → sending → sent → deposited → delivered
├───────► refused recipient refused
├───────► neglected not accepted in time
├───────► bounced email undeliverable
└───────► failed refused by the vendor (retryable if before acceptance)

The mail itself has an aggregated status: draft, sending, in_progress (at least one item not final), completed (all final, none failed), partially_failed, failed, or canceled. progress counts the items per outcome.

The sender must be identified at the vendor (the registered mail service). Sender accounts are shared by an entity; create one once (registered_mail.manage):

POST /v1/registered-mails/sender-accounts
{
"entityId": "0192f3a1-7c2e-7b4d-9a61-200000000002",
"mode": "create",
"label": "Cabinet Bernard - LRE",
"email": "claire.bernard@cabinet-bernard.fr",
"firstName": "Claire",
"lastName": "Bernard",
"company": "Cabinet Bernard Immobilier",
"kind": "professional"
}

mode: "link" associates an existing vendor account by email instead. The vendor then verifies the identity: verification goes from pending to verified (POST …/refresh reads it again). For qualified mail, also store the OTP secret of the account with PUT …/otp-secret (write-only).

  1. Create a draft with the recipients (50 max) and the content. Nothing is sent yet.

    Terminal window
    curl -s -X POST "$MLT_API_URL/v1/registered-mails" \
    -H "Authorization: Bearer $MLT_TOKEN" -H "Content-Type: application/json" \
    -d '{
    "entityId": "0192f3a1-7c2e-7b4d-9a61-200000000002",
    "type": "qualified",
    "subject": "Mise en demeure - Loyers impayés Lot 12",
    "clientReference": "DOSSIER-8841",
    "contentHtml": "<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>",
    "senderAccountId": "0192f3a1-7c2e-7b4d-9a61-510000000001",
    "recipients": [{ "firstName": "Marie", "lastName": "Durand", "email": "marie.durand@example.fr", "kind": "individual" }]
    }'
  2. Attach PDFs one by one with POST /v1/registered-mails/{id}/attachments (multipart file, see Files & uploads).

  3. Send with an idempotency key you generate and keep for retries:

    Terminal window
    curl -s -X POST "$MLT_API_URL/v1/registered-mails/$MAIL_ID/send" \
    -H "Authorization: Bearer $MLT_TOKEN" -H "Content-Type: application/json" \
    -d "{\"idempotencyKey\": \"$(uuidgen)\"}"

    The mail moves to sending then in_progress. Each item counts against the registered mail quota of the entity (403 quota_exceeded when it is reached and blocking).

Subscribe to registered_mail.delivered, registered_mail.refused, registered_mail.neglected and registered_mail.failed (webhooks): one event per item reaching a final status. GET /v1/registered-mails/{id} returns each item with its timeline (status, date, source) and proofs.

  • Failed items: an item that failed before the vendor accepted it has retryable: true; retry it alone with POST …/items/{itemId}/retry.
  • Address change: a recipient can ask to receive the mail at another address. The request appears in items[].recipientUpdates with status: pending; accept or refuse it with POST …/items/{itemId}/recipient-updates/{updateId} and { "accept": true }.

GET /v1/registered-mails/{id}/items/{itemId}/proofs/{kind} returns the PDF proof (deposit, delivery, refusal, negligence, content) once available. The SHA-256 of each stored proof is listed in items[].proofs.

Until it is sent, a draft can be changed with PATCH (lists are replaced entirely), its attachments added or removed, or canceled with POST …/cancel. A sent mail cannot be canceled.