A message belongs to an inbox and a thread. Its message_id is its RFC 5322
Message-ID, which is what lets threading work across providers.
Bodies
Three fields, and picking the right one matters:
text string
The plain-text body as it arrived, quoted history and all.
html string
The HTML body.
extracted_text string
The new content with the quoted reply chain stripped.
Read extracted_text when a model is going to reason over a thread. On a
long exchange, text repeats the entire history in every message; feeding that
to a model wastes context and invites it to answer a question from three replies
ago.
Listing
curl "https://api.carlyemail.com/v0/inboxes/$INBOX_ID/messages?limit=50" \
-H "Authorization: Bearer $CARLYEMAIL_API_KEY"
List responses carry a preview rather than a body. Fetch a single message to
get the full content — that keeps a page of fifty messages small.
Spam, trash and unauthenticated mail are excluded by default. Opt in with
include_spam and include_trash.
Searching
/messages/search takes q and covers sender, recipients, subject and body.