Inbound rules triggers let you block messages from certain senders. You can block messages by email address or by domain.
Accept |
required application/json |
---|---|
X-Postmark-Server-Token |
required This request requires server level priveledges. This token can be found on the Credentials tab under your Postmark server. |
curl "https://api.postmarkapp.com/triggers/inboundrules?count=50&offset=0" \
-X GET \
-H "Accept: application/json" \
-H "X-Postmark-Server-Token: server token"
count |
required Number of records to return per request. |
---|---|
offset |
required Number of records to skip. |
TotalCount | integer |
Indicates how many triggers match the search criteria you specified. |
---|---|---|
InboundRules | array |
List of objects that each represent each inbound rule. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"TotalCount": 3,
"InboundRules": [
{
"ID": 3,
"Rule": "someone@example.com"
},
{
"ID": 5,
"Rule": "badsender@example.com"
},
{
"ID": 7,
"Rule": "baddomain.com"
}
]
}
Content-Type |
required application/json |
---|---|
Accept |
required application/json |
X-Postmark-Server-Token |
required This request requires server level privileges. This token can be found on the API Tokens tab under your Postmark server. |
curl "https://api.postmarkapp.com/triggers/inboundrules" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Server-Token: server token" \
-d '{
"Rule": "someone@example.com"
}'
Rule | string |
required Email address (or domain) that you would like to block from sending. |
---|
{
"Rule": "someone@example.com",
}
ID | integer |
Unique ID of the trigger |
---|---|---|
Rule | string |
Email address (or domain) that you would like to block from sending. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"ID": 15,
"Rule": "someone@example.com"
}
Accept |
required application/json |
---|---|
X-Postmark-Server-Token |
required This request requires server level priveledges. This token can be found on the Credentials tab under your Postmark server. |
curl "https://api.postmarkapp.com/triggers/inboundrules/{triggerid}" \
-X DELETE \
-H "Accept: application/json" \
-H "X-Postmark-Server-Token: server token"
ErrorCode | integer | |
---|---|---|
Message | string |
Response message |
{
"ErrorCode": 0,
"Message": "Rule someone@example.com removed."
}