WaitForController

Wait or return list of emails that match simple matching patterns

Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

post/waitForMatchingEmails

Request

  • Base URL: https://api.mailslurp.com
  • URL: https://api.mailslurp.com/waitForMatchingEmails
  • Auth: API key in header x-api-key

Query parameters

inboxIdstring uuid required

Id of the inbox we are fetching emails from

countinteger required

Number of emails to wait for. Must be greater or equal to 1

beforestring date-time

Filter for emails that were received before the given timestamp

sincestring date-time

Filter for emails that were received after the given timestamp

sort'ASC' | 'DESC'

Sort direction

delayinteger

Max milliseconds delay between calls

timeoutinteger

Max milliseconds to wait

unreadOnlyboolean

Optional filter for unread only

Request body

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.