List and search messages
Retrieve a list of messages with advanced search and filtering capabilities. This endpoint supports pagination and comprehensive search across message content, headers, flags, and metadata. You can search by folder, flags, content, headers, date ranges, size, and more.
Request
- Base URL: https://api.forwardemail.net
- URL: https://api.forwardemail.net/v1/messages
- Auth: HTTP basic
Query parameters
Page of results to return. If not specified, value will be 1. Must be a number greater than or equal to 1.
Number of results to return per page. Defaults to 25 if not specified. Must be a number greater than or equal to 1, and less than or equal to 100.
Filter messages by folder path
Filter by read status
Filter by flagged status
Filter by deleted status
Filter by draft status
Filter by junk/spam status
Filter by copied status
Filter by encryption status (PGP/MIME or S/MIME)
Filter by searchable status
Filter by expired status
Filter by attachment presence
Filter by attachment presence (alias for has_attachments)
Search in message subject
Search in message body/text
Search in message text (alias for body)
Search in all message headers
Search by Message-ID header
General search across headers and text
General search (alias for search)
Filter messages since this date (ISO 8601 format)
Filter messages before this date (ISO 8601 format)
Filter messages with minimum size in bytes
Filter messages with maximum size in bytes
Search by From header
Search by To header
Search by CC header
Search by BCC header
Search by Date header
Search by Reply-To header
When set to "true", returns metadata-only responses without nodemailer or raw fields. This significantly improves performance by skipping full MIME tree reconstruction and attachment body fetching. Useful for building message lists where only metadata (subject, flags, dates, folder, size) is needed.
Response
Messages retrieved successfully
Example response
[
{
"id": "message123",
"root_id": "root123",
"folder_id": "folder123",
"folder_path": "INBOX",
"thread_id": "thread123",
"header_message_id": "<message123@example.com>",
"is_unread": true,
"is_flagged": false,
"is_deleted": false,
"is_draft": false,
"is_junk": false,
"is_copied": false,
"is_encrypted": false,
"is_searchable": true,
"is_expired": false,
"has_attachment": false,
"retention_date": null,
"internal_date": "2025-01-01T00:00:00.000Z",
"header_date": "2025-01-01T00:00:00.000Z",
"subject": "Test Message",
"flags": [
"\\Seen"
],
"size": 1024,
"uid": 1,
"modseq": 1,
"transaction": "API",
"remote_address": "127.0.0.1",
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:00:00.000Z",
"object": "message"
}
]Changes
No recorded changes to this operation across all 1 revision of this API.