Postmark
Postmark API

Inbound Rules

Block email addresses and domains from inbound processing.


List inbound rule triggers

GET
https://api.postmarkapp.com
/triggers/inboundrules

Lists the rules that block senders or domains from inbound processing.

List inbound rule triggers › query Parameters

count
​integer · min: 1 · max: 500 · required

Number of records to return per request. Max 500.

offset
​integer · min: 0 · required

Number of records to skip.

List inbound rule triggers › Responses

A page of inbound rules.

Paged list of inbound rules.
TotalCount
​integer · required

Number of rules on the server.

Example: 2
​InboundRule[] · required

Rules for the requested page.

Example: [{"ID":1234567,"Rule":"someone@example.com"}]

Create an inbound rule trigger

POST
https://api.postmarkapp.com
/triggers/inboundrules

Creates a rule that blocks an email address or domain from inbound processing. Fails with error code 810 if the rule already exists.

Create an inbound rule trigger › Request Body

Rule to create. Field of `CreateInboundRuleRequest`.
Rule
​string · required

Email address or domain to block from inbound processing.

Example: someone@example.com

Create an inbound rule trigger › Responses

The created rule.

An inbound blocking rule.
ID
​integer

Unique ID of the rule.

Example: 1234567
Rule
​string

Email address or domain that is blocked.

Example: someone@example.com

Delete a single trigger

DELETE
https://api.postmarkapp.com
/triggers/inboundrules/{inboundRuleId}

Deletes an inbound rule.

Delete a single trigger › path Parameters

inboundRuleId
​integer · required

Unique ID of the inbound rule trigger.

Delete a single trigger › Responses

The rule was deleted.

Generic response returned by operations that only report a result code and message.
ErrorCode
​integer · required

Postmark API error code. 0 means the request succeeded. See the API error code table in the API description.

Example: 0
Message
​string · required

Human-readable result of the request.

Example: OK