/mail/filters/apply
POST
/mail/filters/apply
const url = 'https://example.com/api/v1/mail/filters/apply';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"rule":{"name":"example","enabled":true,"match":"all","conditions":[{"type":"header","header":"example","operator":"contains","value":""}],"actions":[{"type":"fileinto","folder":"example"}],"stop":true},"folder":"INBOX"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/mail/filters/apply \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "rule": { "name": "example", "enabled": true, "match": "all", "conditions": [ { "type": "header", "header": "example", "operator": "contains", "value": "" } ], "actions": [ { "type": "fileinto", "folder": "example" } ], "stop": true }, "folder": "INBOX" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
rule
required
object
name
required
string
enabled
boolean
match
string
conditions
required
Array
One of:
object
type
required
string
header
required
string
operator
required
string
value
string
object
type
required
string
header
required
string
part
string
operator
required
string
value
required
string
object
type
required
string
part
string
operator
required
string
value
required
string
object
type
required
string
object
type
required
string
object
type
required
string
operator
required
string
value
required
string
object
type
required
string
object
type
required
string
operator
required
string
value
required
string
object
type
required
string
value
required
string
object
type
required
string
object
type
required
string
operator
required
string
value
required
integer
object
type
required
string
object
type
required
string
days
required
Array<integer>
zone
string
object
type
required
string
from
required
string
to
required
string
zone
string
object
type
required
string
operator
required
string
value
required
string
object
type
required
string
operator
required
string
value
required
integer
actions
required
Array
One of:
object
type
required
string
folder
required
string
object
type
required
string
folder
required
string
object
type
required
string
address
required
string
object
type
required
string
address
required
string
object
type
required
string
flag
required
string
object
type
required
string
object
type
required
string
object
type
required
string
object
type
required
string
object
type
required
string
keyword
required
string
object
type
required
string
object
type
required
string
object
type
required
string
object
type
required
string
subject
string
body
required
string
object
type
required
string
reason
required
string
stop
boolean
folder
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
folder
required
string
total
required
integer
examined
required
integer
matched
required
integer
skipped
required
Array<string>
Example
{ "skipped": [ "redirect" ]}