Skip to content

Filters

All operations require authentication.

10 operationsv1/email/domain
Agent setup

List filtersProduction

GET
/1.0/email/domain/{domain}/account/{accountName}/filter

List filters. Returns the names of the filters of the email account. Get one to read its action, its priority and whether it is active.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

Response

200string[]successful operation

Example uses accountName = string, domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get a filterProduction

GET
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}

Get a filter. Returns the account, priority, active state, action (accept, account, delete or redirect) and action parameter of the filter.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

name
required
string

Filter name

Response

200Filtersuccessful operation
action
read-only
DomainFilterActionEnum

Action of filter

Valuesacceptaccountdeleteredirect
actionParam
read-only
string

Action parameter of filter

active
read-only
boolean

If true filter is active

domain
read-only
string

Domain name of filter

name
read-only
string

Filter name

pop
read-only
string

Account name of filter

priority
read-only
integer

Priority of filter

Example uses accountName = string, domain = string, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "action": "accept", "actionParam": "string", "active": true, "domain": "string", "name": "string", "pop": "string", "priority": 0}

Create a filterProduction

POST
/1.0/email/domain/{domain}/account/{accountName}/filter

Create a filter. Creates a filter with a rule on a header (operand and value), an action, a priority and an active state, and returns the task.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

Request body (required)

action
required
DomainFilterActionEnum

Action of filter

Valuesacceptaccountdeleteredirect
actionParam
string

Action parameter of filter

active
required
boolean

If true filter is active

header
required
string

Header to be filtered

name
required
string

Filter name

operand
required
DomainFilterOperandEnum

Rule of filter

ValuescheckspfcontainsnoContains
priority
required
integer

Priority of filter

value
required
string

Rule parameter of filter

Response

200TaskFiltersuccessful operation
account
read-only
string

Account name of task

action
read-only
string

Action of task

domain
read-only
string

Domain name of task

id
read-only
integer

Id of task

timestamp
read-only
stringdate-time

Creation date of task

Example uses accountName = string, domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "account": "string", "action": "string", "domain": "string", "id": 0, "timestamp": "2024-01-01T12:00:00Z"}

Delete a filterProduction

DELETE
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}

Delete a filter. Removes the filter and its rules from the email account, and returns the tasks. Incoming emails are no longer filtered by it.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

name
required
string

Filter name

Response

200TaskFilter[]successful operation
account
read-only
string

Account name of task

action
read-only
string

Action of task

domain
read-only
string

Domain name of task

id
read-only
integer

Id of task

timestamp
read-only
stringdate-time

Creation date of task

Example uses accountName = string, domain = string, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "account": "string", "action": "string", "domain": "string", "id": 0, "timestamp": "2024-01-01T12:00:00Z" }]

Enable or disable a filterProduction

POST
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/changeActivity

Enable or disable a filter. Set activity to true to apply the filter to incoming emails, or to false to suspend it.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

name
required
string

Filter name

Request body (required)

activity
required
boolean

New activity

Response

200TaskFiltersuccessful operation
account
read-only
string

Account name of task

action
read-only
string

Action of task

domain
read-only
string

Domain name of task

id
read-only
integer

Id of task

timestamp
read-only
stringdate-time

Creation date of task

Example uses accountName = string, domain = string, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/changeActivity \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "account": "string", "action": "string", "domain": "string", "id": 0, "timestamp": "2024-01-01T12:00:00Z"}

Change filter priorityProduction

POST
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/changePriority

Change filter priority. Sets the priority of the filter, which gives the order the filters of the account are applied in.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

name
required
string

Filter name

Request body (required)

priority
required
integer

New priority

Response

200TaskFiltersuccessful operation
account
read-only
string

Account name of task

action
read-only
string

Action of task

domain
read-only
string

Domain name of task

id
read-only
integer

Id of task

timestamp
read-only
stringdate-time

Creation date of task

Example uses accountName = string, domain = string, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/changePriority \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "account": "string", "action": "string", "domain": "string", "id": 0, "timestamp": "2024-01-01T12:00:00Z"}

List filter rulesProduction

GET
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule

List filter rules. Returns the IDs of the rules of the filter. Get one to read the header it checks, its operand and its value.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

name
required
string

Filter name

Response

200integer[]successful operation

Example uses accountName = string, domain = string, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a filter ruleProduction

GET
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule/{id}

Get a filter rule. Returns the header, the operand (checkspf, contains or noContains) and the value of the rule.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

id
required
integer
—
name
required
string

Filter name

Response

200Rulesuccessful operation
header
read-only
string

Header to be filtered

id
read-only
integer
—
operand
read-only
DomainFilterOperandEnum

Rule of filter

ValuescheckspfcontainsnoContains
value
read-only
string

Rule parameter of filter

Example uses accountName = string, domain = string, id = 0, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "header": "string", "id": 0, "operand": "checkspf", "value": "string"}

Create a filter ruleProduction

POST
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule

Create a filter rule. Adds a rule to the filter on a header, with an operand (checkspf, contains or noContains) and a value, and returns the task.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

name
required
string

Filter name

Request body (required)

header
required
string

Header to be filtered

operand
required
DomainFilterOperandEnum

Rule of filter

ValuescheckspfcontainsnoContains
value
required
string

Rule parameter of filter

Response

200TaskFiltersuccessful operation
account
read-only
string

Account name of task

action
read-only
string

Action of task

domain
read-only
string

Domain name of task

id
read-only
integer

Id of task

timestamp
read-only
stringdate-time

Creation date of task

Example uses accountName = string, domain = string, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "account": "string", "action": "string", "domain": "string", "id": 0, "timestamp": "2024-01-01T12:00:00Z"}

Delete a filter ruleProduction

DELETE
/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule/{id}

Delete a filter rule. Removes the rule from the filter and returns the tasks. The filter keeps applying its other rules.

Path parameters

accountName
required
string

Name of account

domain
required
string

Name of your domain name

id
required
integer
—
name
required
string

Filter name

Response

200TaskFilter[]successful operation
account
read-only
string

Account name of task

action
read-only
string

Action of task

domain
read-only
string

Domain name of task

id
read-only
integer

Id of task

timestamp
read-only
stringdate-time

Creation date of task

Example uses accountName = string, domain = string, id = 0, name = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/account/{accountName}/filter/{name}/rule/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "account": "string", "action": "string", "domain": "string", "id": 0, "timestamp": "2024-01-01T12:00:00Z" }]