POST api/2.0/mail/filters
Creates a new filter with the parameters specified in the request.
Name |
Description |
Type |
Example |
filter
sent in body
|
Filter parameters: ID, name, position, enabled, conditions, actions, options
|
ASC.Mail.Data.Contracts.MailSieveFilterData
|
|
POST api/2.0/mail/filters
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
{
"filter": {
"id": 1,
"name": "name",
"position": 2,
"enabled": true,
"conditions": [
{
"key": 1,
"operation": 1,
"value": "value"
}
],
"actions": [
{
"action": 1,
"data": "data"
}
],
"options": [
{
"matchMultiConditions": 1,
"applyTo": {
"folders": [
1
],
"mailboxes": [
1
],
"withAttachments": 1
},
"ignoreOther": true
}
]
}
}
application/json
{
"status": 0,
"response": {
"id": 1,
"name": "name",
"position": 2,
"enabled": true,
"conditions": [
{
"key": 1,
"operation": 1,
"value": "value"
}
],
"actions": [
{
"action": 1,
"data": "data"
}
],
"options": [
{
"matchMultiConditions": 1,
"applyTo": {
"folders": [
1
],
"mailboxes": [
1
],
"withAttachments": 1
},
"ignoreOther": true
}
]
}
}
text/xml
<result>
<status>0</status>
<response>
<id>1</id>
<name>name</name>
<position>2</position>
<enabled>True</enabled>
<conditions>
<key>1</key>
<operation>1</operation>
<value>value</value>
</conditions>
<actions>
<action>1</action>
<data>data</data>
</actions>
<options>
<matchMultiConditions>1</matchMultiConditions>
<applyTo>
<folders>1</folders>
<mailboxes>1</mailboxes>
<withAttachments>1</withAttachments>
</applyTo>
<ignoreOther>True</ignoreOther>
</options>
</response>
</result>