mailpit unofficial
GET/api/v1/search

Search messages

Returns messages matching a search, sorted by received date (descending).

4 parameters
querystringrequired
Search query
startstringoptional
Pagination offset
Default:0
limitstringoptional
Limit results
Default:50
tzstringoptional
Optional [timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used only for `before:` & `after:` searches (eg: "Pacific/Auckland").

2 status codes
200Summary of messages
messagesarray<object>optional
Messages summary
messages_countintegeroptional
Total number of messages matching current query
messages_unreadintegeroptional
Total number of unread messages matching current query
startintegeroptional
Pagination offset
tagsarray<string>optional
All current tags
totalintegeroptional
Total number of messages in mailbox
unreadintegeroptional
Total number of unread messages in mailbox
400Server error will return with a 400 status code with the error message in the body

Error handling

A 400 is returned: Server error will return with a 400 status code with the error message in the body.