Questions · Published 2026-10-21 · Updated 2026-10-21 · AgentiSend
How do I read a reply without the quoted history?
Read a reply without the quoted history from extracted_text, and use extracted_html for that same cut in HTML.
Read a reply without the quoted history from extracted_text, and use extracted_html for that same cut in HTML. Either field is null when the cut could not be produced, and an empty cut is null too.
Where to read it
GET /emails/receiving/{id} returns both fields beside text and html. The email.received webhook carries the same pair. GET /emails/receiving and GET /emails/receiving/threads leave the pair off, so each message is read on its own.
curl -sS -X GET https://api.agentisend.com/emails/receiving/9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42 \
-H "Authorization: Bearer $AGENTISEND_API_KEY"200
{
"attachment_count": -9007199254740991,
"attachments": [],
"bcc": [],
"cc": [],
"created_at": "2026-09-04T09:14:00.000Z",
"extracted_html": "example",
"extracted_text": "example",
"from": "example",
"headers": {},
"held": false,
"html": "example",
"id": "9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42",
"inbound_verdict": {
"reasons": [],
"verdict": "clear"
},
"message_id": "example",
"object": "email",
"reasons": [],
"received_at": "2026-09-04T09:14:00.000Z",
"received_for": [],
"reply_to": [],
"size_bytes": -9007199254740991,
"subject": "example",
"text": "example",
"to": "example",
"verdict": "clear"
}When the field is null
The cut keeps the new reply and drops the quoted history, a signature block, a phone sign-off, an unsubscribe footer and a legal disclaimer. When the field is null, read text, then html. A short note in front of a forwarded message often keeps the note and drops the forwarded part, so text is the copy that still has what was forwarded. A delivery-failure notice is kept whole, including the copy of the message that failed.
POST /webhooks is how you receive the event that already includes the two fields, so a second fetch is only needed when you want headers or attachments.
Next
- Email for AI agents
- How do I receive email at my own domain?
- How do I get the text of an email attachment?
Written by the AgentiSend team.