WaitForController

Wait for an SMS message to match the provided filter conditions such as body contains keyword.

Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

post/waitForSms

Request

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

Request body

phoneNumberIdstring uuid required

ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count.

limitinteger nullable

Limit results

countinteger required

Number of results that should match conditions. Either exactly or at least this amount based on the countType. If count condition is not met and the timeout has not been reached the waitFor method will retry the operation.

delayTimeoutinteger nullable

Max time in milliseconds to wait between retries if a timeout is specified.

timeoutinteger required

Max time in milliseconds to retry the waitFor operation until conditions are met.

unreadOnlyboolean nullable

Apply conditions only to unread SMS. All SMS messages begin with read=false. An SMS is marked read=true when an SMS has been returned to the user at least once. For example you have called getSms, or you have viewed the SMS in the dashboard.

countType'EXACTLY' | 'ATLEAST' nullable

How result size should be compared with the expected size. Exactly or at-least matching result?

sortDirection'ASC' | 'DESC' nullable

Direction to sort matching SMSs by created time

sincestring date-time nullable

ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date

beforestring date-time nullable

ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date

Response

OK

Changes

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