Answer a borrower email
An inbound email becomes a case-linked conversation with the communications agent’s read on what it is about and a scheduled follow-up — and the reply clears its own compliance check before it sends.
Maya replies to a servicing email: “I was short this month because of a medical bill — can I get a few extra days?” Nothing about that sentence is structured. Ninety seconds later it is: a case-linked interaction, a hardship signal, and a scheduled follow-up.
- Signed gateway eventthe original message kept as evidence
- The communications agent resolves and classifiescase, intent, request, scheduled task
- The agent sends the replyconsent, quiet hours and restrictions checked at send
The signed event arrives
Connector contractThe email gateway’s normalizer delivers a provider-neutral event under its signature — never raw provider payloads, never caller-chosen storage references:
curl -X POST "$BASE/v1/servicing/channel-events/AWS_SES" \
-H "X-LendEasy-Gateway-Signature: $GATEWAY_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"schemaVersion": "1",
"gatewayEventRef": "evt-ses-91h44a",
"gatewayCode": "AWS_SES",
"eventType": "EMAIL_RECEIVED",
"occurredAt": "2027-05-02T16:42:11Z",
"envelope": { "mailFrom": "maya@example.test", "recipients": ["support@demo-lender.test"] },
"contentRef": { "type": "AWS_SES_S3_OBJECT", "locator": "opaque-signed-locator", "sizeBytes": 48231, "sha256": "base64url-digest" }
}'{ "gatewayEventRef": "evt-ses-91h44a", "status": "ACCEPTED", "deduplicated": false }Sender and thread resolution is deterministic — an unknown sender lands in review intake rather than being guessed onto an account — and a replayed event deduplicates on its gateway identity.
Read what the communications agent made of it
Prose → workcurl "$BASE/v1/servicing/interactions?caseId=1001&channel=EMAIL" \
-H "Authorization: Bearer $TOKEN" \
-H "LendEasy-Tenant: demo-lender"{
"items": [
{
"interactionId": 3002,
"channel": "EMAIL",
"direction": "INBOUND",
"caseId": 1001,
"threadRef": "thr-hbr-support-12",
"classification": { "signal": "HARDSHIP", "confidence": "HIGH" },
"extracted": { "requestType": "PAYMENT_EXTENSION", "reason": "MEDICAL" },
"createdTaskId": 2004,
"occurredAt": "2027-05-02T16:42:11Z"
}
]
}The communications agent resolved Maya to her existing collections case, extracted the request, and scheduled task 2004 — the workflow’s next step exists before anyone opens an inbox. Her classification is attributable AI output under normal review; an attachment would have gone to the document agent.
Send the compliant reply
Checked at sendThe communications agent composes the reply — acknowledgment, the assistance options Maya can actually use, no improvised terms — and queues it into the same thread Maya started:
curl -X POST "$BASE/v1/servicing/email-threads/12/reply" \
-H "Authorization: Bearer $TOKEN" \
-H "LendEasy-Tenant: demo-lender" \
-H "Idempotency-Key: reply-3002-2027-05-02" \
-H "Content-Type: application/json" \
-d '{
"caseId": 1001,
"reasonCode": "SERVICING_RESPONSE",
"subject": "Re: A few extra days on this month'"'"'s payment",
"body": "Thanks for letting us know, Maya. Here are the assistance options available on your loan..."
}'{ "status": "QUEUED" }The reply operation resolves consent, quiet hours, and restrictions at send time, against the loan the message is about — a blocked reply comes back with its decision and reasons, never silently dropped. Delivery reconciles through the outbox to a terminal delivered-or-failed state in the same RFC thread Maya started.