InboxController

Create an inbox ruleset

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

post/inboxes/{inboxId}/rulesets

Request

  • Base URL: https://api.mailslurp.com
  • URL: https://api.mailslurp.com/inboxes/{inboxId}/rulesets
  • Auth: API key in header x-api-key

Path parameters

inboxIdstring uuid required

inboxId

Request body

scope'RECEIVING_EMAILS' | 'SENDING_EMAILS' | 'RECEIVING_SMS' | 'SENDING_SMS' required

What type of emails actions to apply ruleset to. Either SENDING_EMAILS or RECEIVING_EMAILS will apply action and target to any sending or receiving of emails respectively.

action'BLOCK' | 'ALLOW' | 'FILTER_REMOVE' | 'BOUNCE_SOFT' | 'BOUNCE_HARD' required

Action to be taken when the ruleset matches an email for the given scope. For example: BLOCK action with target * and scope SENDING_EMAILS blocks sending to all recipients. Note ALLOW takes precedent over BLOCK. FILTER_REMOVE is like block but will remove offending email addresses during a send or receive event instead of blocking the action.

targetstring required

Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance *@gmail.com matches all gmail addresses while test@gmail.com matches one address exactly. The target is applied to every recipient field email address when SENDING_EMAILS is the scope and is applied to sender of email when RECEIVING_EMAILS.

Response

OK

Changes

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