Interface Suppressions

All Known Implementing Classes:
SuppressionsImpl

public interface Suppressions
  • Method Details

    • search

      List<SuppressionsResponse> search(long accountId, String email)
      List and search suppressions by email. The endpoint returns up to 1000 suppressions per request.
      Parameters:
      accountId - - unique account ID
      email - - search suppressions for this email
      Returns:
      a list of suppressions
    • search

      List<SuppressionsResponse> search(long accountId, SuppressionListFilter filter)
      List and search suppressions. The endpoint returns up to 1000 suppressions per request; pass the last returned ID as lastId to fetch the next page.
      Parameters:
      accountId - - unique account ID
      filter - - optional filtering and pagination parameters
      Returns:
      a list of suppressions
    • createSuppression

      SuppressionsResponse createSuppression(long accountId, CreateSuppressionRequest request)
      Add an email address to the account's suppression list.
      Parameters:
      accountId - - unique account ID
      request - - request data
      Returns:
      the created suppression
    • deleteSuppression

      SuppressionsResponse deleteSuppression(long accountId, String suppressionId)
      Delete a suppression by ID. Mailtrap will no longer prevent sending to this email unless it's recorded in suppressions again.
      Parameters:
      accountId - - unique account ID
      suppressionId - - unique suppression ID
      Returns:
      the attributes of the deleted suppression