Skip to content

/mail/filters/compile

POST
/mail/filters/compile
curl --request POST \
--url https://example.com/api/v1/mail/filters/compile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rules": [ { "name": "example", "enabled": true, "match": "all", "conditions": [ { "type": "header", "header": "example", "operator": "contains", "value": "" } ], "actions": [ { "type": "fileinto", "folder": "example" } ], "stop": true } ] }'
Media typeapplication/json
object
rules
required
Array<object>
<= 100 items
object
name
required
string
>= 1 characters <= 100 characters
enabled
boolean
default: true
match
string
default: all
Allowed values: all any
conditions
required
Array
>= 1 items <= 20 items
One of:
object
type
required
string
Allowed values: header
header
required
string
/^[!-9;-~]{1,64}$/
operator
required
string
Allowed values: contains not_contains is not_is matches not_matches starts_with not_starts_with ends_with not_ends_with regex not_regex exists not_exists
value
string
"" <= 998 characters
actions
required
Array
>= 1 items <= 10 items
One of:
object
type
required
string
Allowed values: fileinto
folder
required
string
>= 1 characters <= 255 characters
stop
boolean
default: true

Default Response

Media typeapplication/json
object
script
required
string
Examplegenerated
{
"script": "example"
}