Skip to content

DNS

All operations require authentication.

7 operationsv1/email/domain
Agent setup

Get the DKIM configurationProduction

GET
/1.0/email/domain/{domain}/dkim

Get the DKIM configuration. Returns the DKIM status, the active selector, the selectors with their CNAME records, and whether the DNS CNAME configuration is valid.

Path parameters

domain
required
string

Name of your domain name

Response

200dkim_simplifiedsuccessful operation
activeSelector
read-only
string

activeSelector

autoconfig
read-only
boolean

If true your DNS CNAME configuration is valid

selectors
read-only
DKIMSelector[]

DKIM status

status
read-only
DKIMStatusEnum

DKIM status

ValuesdisabledenablederrormodifyingtoConfigure

Example uses domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/dkim \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "activeSelector": "string", "autoconfig": true, "selectors": [ { "cname": "string", "selectorName": "string", "status": "set" } ], "status": "disabled"}

Disable DKIMProduction

PUT
/1.0/email/domain/{domain}/dkim/disable

Disable DKIM. Stops signing the emails sent from the domain with DKIM, and returns the task. Read the result with GET dkim.

Path parameters

domain
required
string

Name of your domain name

Response

200tasksuccessful operation
domain
read-only
string

Domain name of the task

function
read-only
string

Function of the task

id
read-only
integer

Id of the task

status
read-only
TaskStatusEnum

Status of the task

ValuescancelledcustomerErrordoingdoneinitovhErrortodo

Example uses domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/dkim/disable \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "domain": "string", "function": "string", "id": 0, "status": "cancelled"}

Enable DKIMProduction

PUT
/1.0/email/domain/{domain}/dkim/enable

Enable DKIM. Starts signing the emails sent from the domain with DKIM, and returns the task. Read the result with GET dkim.

Path parameters

domain
required
string

Name of your domain name

Response

200tasksuccessful operation
domain
read-only
string

Domain name of the task

function
read-only
string

Function of the task

id
read-only
integer

Id of the task

status
read-only
TaskStatusEnum

Status of the task

ValuescancelledcustomerErrordoingdoneinitovhErrortodo

Example uses domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/dkim/enable \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "domain": "string", "function": "string", "id": 0, "status": "cancelled"}

Get the MX filterProduction

GET
/1.0/email/domain/{domain}/dnsMXFilter

Get the MX filter. Returns the MX filter of the domain, or of subDomain: CUSTOM, FULL_FILTERING, NO_FILTERING, REDIRECT or SIMPLE_FILTERING.

Path parameters

domain
required
string

Name of your domain name

Query parameters

subDomain
string

Sub domain

Response

200DomainMXFilterEnumsuccessful operation

Example uses domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/dnsMXFilter \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
"CUSTOM"

List MX recordsProduction

GET
/1.0/email/domain/{domain}/dnsMXRecords

List MX records. Returns the MX records currently published for the domain. Set subDomain to read those of a subdomain.

Path parameters

domain
required
string

Name of your domain name

Query parameters

subDomain
string

Sub domain

Response

200string[]successful operation

Example uses domain = string

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

List recommended DNS recordsProduction

GET
/1.0/email/domain/{domain}/recommendedDNSRecords

List recommended DNS records. Returns the DNS records recommended for the email domain, with their type, subdomain, target, TTL and zone.

Path parameters

domain
required
string

Name of your domain name

Response

200Record[]successful operation
fieldType
read-only
DnsRecordTypeEnum

Type of DNS record

ValuesAAAAACAACNAMEDKIMDMARCDNAMELOCMXNAPTRNSPTRSPFSRVSSHFPTLSATXT
id
read-only
integer

Id of record

subDomain
read-only
string

subdomain of record

target
read-only
string

Target of DNS record

ttl
read-only
integer

TTL of record

zone
read-only
string

Name of DNS zone

Example uses domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/recommendedDNSRecords \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "fieldType": "A", "id": 0, "subDomain": "string", "target": "string", "ttl": 0, "zone": "string" }]

Change MX filterProduction

POST
/1.0/email/domain/{domain}/changeDnsMXFilter

Change MX filter. Changes the MX DNS records of the domain, or of subDomain, to apply the mxFilter filter. With CUSTOM, customTarget gives the target server.

Path parameters

domain
required
string

Name of your domain name

Request body (required)

customTarget
string

Target server for custom MX

mxFilter
required
DomainMXFilterEnum

New MX filter

ValuesCUSTOMFULL_FILTERINGNO_FILTERINGREDIRECTSIMPLE_FILTERING
subDomain
string

Sub domain

Response

200—successful operation

Example uses domain = string

$ curl https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/changeDnsMXFilter \
  -H "authorization: Bearer $OVH_TOKEN"