Mailvenue LogoMailvenue
Messages•REST API v1

Read Latest Mails

Fetches the latest incoming emails from your mailbox. Returns a clean, structured payload containing sender, recipients, subject, date, snippet, rendered HTML, plaintext body, and attachments list. Excludes internal folder paths, IMAP flags, and raw headers.

POSThttps://mailvenue.com/api/v1/mails

Request Headers

Content-Typeapplication/json

Request Parameters (JSON Body)

2 required
FieldTypeStatusDefaultDescription
emailstringRequired-Mailbox account address (e.g. [email protected])
passwordstringRequired-Mailbox account password
mailsnumberOptional1Number of latest emails to retrieve (1 = latest single email, max 50)

Response Attributes

KeyTypeDescription
successbooleantrue if fetch succeeded
countnumberTotal emails returned in payload
mailsarrayArray of email objects ordered newest first
mails[].idnumberUnique message identifier (UID)
mails[].fromobjectSender display name and email address
mails[].toarrayList of recipient objects
mails[].subjectstringSubject line of the email
mails[].datestringISO 8601 message timestamp
mails[].snippetstringSanitized plain preview snippet
mails[].htmlstringSanitized HTML message body
mails[].textstringPlain text message body
mails[].readbooleanWhether the message has been opened
mails[].attachmentsarrayAttached files metadata

Status Codes

200
OK: Emails fetched successfully.
400
Bad Request: Missing email/password or invalid email format.
401
Unauthorized: Incorrect email or password.
500
Server Error: IMAP server connection failure or timeout.