# Web Cloud › Email and Collaborative Solutions › Microsoft Exchange › Email Pro › Domains API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 12 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains.json?format=openapi3

## Operations

- `GET /email/pro/{service}/domain` — List domains
- `GET /email/pro/{service}/domain/{domainName}` — Get a domain
- `POST /email/pro/{service}/domain` — Add a domain
- `DELETE /email/pro/{service}/domain/{domainName}` — Remove a domain
- `PUT /email/pro/{service}/domain/{domainName}` — Update a domain
- `GET /email/pro/{service}/domain/{domainName}/dkim` — List DKIM selectors
- `GET /email/pro/{service}/domain/{domainName}/dkim/{selectorName}` — Get a DKIM selector
- `POST /email/pro/{service}/domain/{domainName}/dkim` — Create a DKIM selector
- `DELETE /email/pro/{service}/domain/{domainName}/dkim/{selectorName}` — Delete a DKIM selector
- `POST /email/pro/{service}/domain/{domainName}/dkim/{selectorName}/disable` — Disable DKIM signing
- `POST /email/pro/{service}/domain/{domainName}/dkim/{selectorName}/enable` — Enable DKIM signing
- `GET /email/pro/{service}/domain/{domainName}/dkimSelector` — List available DKIM selectors

## List domains

`GET /1.0/email/pro/{service}/domain`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#get-email-pro-service-domain

**Status:** Alpha version  
**IAM actions:** `emailPro:apiovh:domain/get`

Returns the names of the domains attached to the service. Filter them by `state`, such as ok or suspended.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `service` | path | string | yes | Service |
| `state` | query | email.pro.ObjectStateEnum |  | Filter the value of state property (=) — one of `creating`, `deleting`, `ok`, `reopening`, `suspended`, `suspending`, `unknown` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/email/pro/{service}/domain")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/email/pro/{service}/domain");

print_r($result);
?>
```

## Get a domain

`GET /1.0/email/pro/{service}/domain/{domainName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#get-email-pro-service-domain-domainname

**Status:** Alpha version  
**IAM actions:** `emailPro:apiovh:domain/get`

Returns the type and state of the domain, its MX, SRV and SPF records with their validation status, the expected records, its DKIM diagnostics, its MX relay and its aliases.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `service` | path | string | yes | Service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.DomainNative | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameToCheck` | string | read-only | Cname that will be checked to prove the domain ownership |
| `dkimDiagnostics` | email.pro.DomainDkimDiagnostics | read-only | Dkim selectors and DNS configuration state |
| `dkimDiagnostics.errorCode` | integer | read-only | Error code related to misconfiguration of DKIM, if exists |
| `dkimDiagnostics.message` | string | read-only | DKIM misconfiguration description, if exists |
| `dkimDiagnostics.state` | email.pro.DomainDkimDiagnosticsStateEnum | read-only | State of DKIM selectors — one of `active`, `disabled`, `error`, `inProgress`, `toConfigure` |
| `domainAliases` | string[] | read-only | List of aliases for this domain |
| `domainValidated` | boolean | read-only | Domain validation status |
| `expectedAutodiscoverSRV` | string | read-only | Expected SRV record on this domain |
| `expectedMX` | string[] | read-only | Expected MX record(s) on this domain |
| `expectedSPF` | string | read-only | Expected SPF record on this domain |
| `isAliasDomain` | boolean | read-only | Indicate if this domain is an alias for another domain |
| `mxIsValid` | boolean | read-only | If true your DNS MX configuration is valid |
| `mxRecord` | string[] | read-only | Domain MX record configured in DNS |
| `mxRelay` | string | read-only | If specified, emails to not existing address will be redirected to that domain |
| `name` | string | read-only | Domain name |
| `spfIsValid` | boolean | read-only | SPF record validation passed |
| `spfRecord` | string[] | read-only | Domain's SPF record configured in the DNS |
| `srvIsValid` | boolean | read-only | If true your DNS SRV record is valid |
| `srvRecord` | string[] | read-only | Domain SRV record configured in DNS |
| `state` | email.pro.ObjectStateEnum | read-only | Domain state — one of `creating`, `deleting`, `ok`, `reopening`, `suspended`, `suspending`, `unknown` |
| `taskPendingId` | integer | read-only | Pending tasks id |
| `type` | email.pro.DomainTypeEnum | read-only | Domain type — one of `authoritative`, `nonAuthoritative` |

```json
{
  "cnameToCheck": "string",
  "dkimDiagnostics": {
    "errorCode": 0,
    "message": "string",
    "state": "active"
  },
  "domainAliases": [
    "string"
  ],
  "domainValidated": true,
  "expectedAutodiscoverSRV": "string",
  "expectedMX": [
    "string"
  ],
  "expectedSPF": "string",
  "isAliasDomain": true,
  "mxIsValid": true,
  "mxRecord": [
    "string"
  ],
  "mxRelay": "string",
  "name": "string",
  "spfIsValid": true,
  "spfRecord": [
    "string"
  ],
  "srvIsValid": true,
  "srvRecord": [
    "string"
  ],
  "state": "creating",
  "taskPendingId": 0,
  "type": "authoritative"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/email/pro/{service}/domain/{domainName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/email/pro/{service}/domain/{domainName}");

print_r($result);
?>
```

## Add a domain

`POST /1.0/email/pro/{service}/domain`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#post-email-pro-service-domain

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/create`

Add a domain. Adds an authoritative or nonAuthoritative domain to the service and returns the task. For a domain hosted by OVHcloud, the MX, autodiscover SRV, SPF and DKIM records can be configured automatically.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `service` | path | string | yes | The internal name of your pro organization |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoEnableDKIM` | boolean |  | Enable DKIM automatically after DKIM configuration |
| `configureAutodiscover` | boolean |  | If you host domain in OVH we can configure autodiscover record automatically |
| `configureDKIM` | boolean |  | Launch configuration of DKIM automatically for the domain |
| `configureMx` | boolean |  | If you host domain in OVH we can configure mx record automatically |
| `configureSPF` | boolean |  | Enable automatic SPF record (only for domains hosted by OVHcloud) |
| `mxRelay` | string |  | If specified, emails to not existing address will be redirected to that domain |
| `name` | string | yes | Domain to install on server |
| `type` | email.pro.DomainTypeEnum | yes | Type of domain that You want to install — one of `authoritative`, `nonAuthoritative` |

```json
{
  "autoEnableDKIM": true,
  "configureAutodiscover": true,
  "configureDKIM": true,
  "configureMx": true,
  "configureSPF": true,
  "mxRelay": "string",
  "name": "string",
  "type": "authoritative"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.pro.TaskFunctionEnum | read-only | Function name — one of `addAccount`, `addAlias`, `addDomain`, `addDomainDKIM`, `addDomainDisclaimer`, `addExternalContact`, `addFullAccess`, `addSendAs`, `addSendOnBehalfTo`, `addServiceAuthorizedIp`, `changeHostname`, `changePassword`, … |
| `id` | integer | read-only | Task id |
| `status` | email.pro.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "addAccount",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/email/pro/{service}/domain",
	autoEnableDKIM = None, # Enable DKIM automatically after DKIM configuration (type: boolean, nullable)
	configureAutodiscover = None, # If you host domain in OVH we can configure autodiscover record automatically (type: boolean, nullable)
	configureDKIM = None, # Launch configuration of DKIM automatically for the domain (type: boolean, nullable)
	configureMx = None, # If you host domain in OVH we can configure mx record automatically (type: boolean, nullable)
	configureSPF = None, # Enable automatic SPF record (only for domains hosted by OVHcloud) (type: boolean, nullable)
	mxRelay = None, # If specified, emails to not existing address will be redirected to that domain (type: string, nullable)
	name = None, # Domain to install on server (type: string)
	type = None, # Type of domain that You want to install (type: email.pro.DomainTypeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/email/pro/{service}/domain", array(
	autoEnableDKIM => null, // Enable DKIM automatically after DKIM configuration (type: boolean, nullable)
	configureAutodiscover => null, // If you host domain in OVH we can configure autodiscover record automatically (type: boolean, nullable)
	configureDKIM => null, // Launch configuration of DKIM automatically for the domain (type: boolean, nullable)
	configureMx => null, // If you host domain in OVH we can configure mx record automatically (type: boolean, nullable)
	configureSPF => null, // Enable automatic SPF record (only for domains hosted by OVHcloud) (type: boolean, nullable)
	mxRelay => null, // If specified, emails to not existing address will be redirected to that domain (type: string, nullable)
	name => null, // Domain to install on server (type: string)
	type => null, // Type of domain that You want to install (type: email.pro.DomainTypeEnum)
));

print_r($result);
?>
```

## Remove a domain

`DELETE /1.0/email/pro/{service}/domain/{domainName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#delete-email-pro-service-domain-domainname

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/delete`

Remove a domain. Detaches the domain from the Email Pro service, which no longer serves email addresses on it, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `service` | path | string | yes | The internal name of your pro organization |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.pro.TaskFunctionEnum | read-only | Function name — one of `addAccount`, `addAlias`, `addDomain`, `addDomainDKIM`, `addDomainDisclaimer`, `addExternalContact`, `addFullAccess`, `addSendAs`, `addSendOnBehalfTo`, `addServiceAuthorizedIp`, `changeHostname`, `changePassword`, … |
| `id` | integer | read-only | Task id |
| `status` | email.pro.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "addAccount",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/email/pro/{service}/domain/{domainName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/email/pro/{service}/domain/{domainName}");

print_r($result);
?>
```

## Update a domain

`PUT /1.0/email/pro/{service}/domain/{domainName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#put-email-pro-service-domain-domainname

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/edit`

Update a domain. Updates the `type` of the domain, authoritative or nonAuthoritative, and its `mxRelay`, the domain that receives the emails sent to addresses that do not exist.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `service` | path | string | yes | The internal name of your pro organization |

### Request body (required)

Type: `email.pro.Domain`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameToCheck` | string | read-only | Cname that will be checked to prove the domain ownership |
| `domainAliases` | string[] | read-only | List of aliases for this domain |
| `domainValidated` | boolean | read-only | Domain validation status |
| `isAliasDomain` | boolean | read-only | Indicate if this domain is an alias for another domain |
| `mxIsValid` | boolean | read-only | If true your dns mx configuration is valid |
| `mxRecord` | string[] | read-only | Domain MX record configured in DNS |
| `mxRelay` | string |  | If specified, emails to not existing address will be redirected to that domain |
| `name` | string | read-only | Domain name |
| `srvIsValid` | boolean | read-only | If true your dns srv record is valid |
| `srvRecord` | string[] | read-only | Domain SRV record configured in DNS |
| `state` | email.pro.ObjectStateEnum | read-only | Domain state — one of `creating`, `deleting`, `ok`, `reopening`, `suspended`, `suspending`, `unknown` |
| `taskPendingId` | integer | read-only | Pending taks id |
| `type` | email.pro.DomainTypeEnum |  | Domain type — one of `authoritative`, `nonAuthoritative` |

```json
{
  "mxRelay": "string",
  "type": "authoritative"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: email.pro.Domain
result = client.put("/email/pro/{service}/domain/{domainName}",
	mxRelay = None, # If specified, emails to not existing address will be redirected to that domain (type: string, nullable)
	type = None, # Domain type (type: email.pro.DomainTypeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: email.pro.Domain
$result = $ovh->put("/email/pro/{service}/domain/{domainName}", array(
	mxRelay => null, // If specified, emails to not existing address will be redirected to that domain (type: string, nullable)
	type => null, // Domain type (type: email.pro.DomainTypeEnum)
));

print_r($result);
?>
```

## List DKIM selectors

`GET /1.0/email/pro/{service}/domain/{domainName}/dkim`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#get-email-pro-service-domain-domainname-dkim

**Status:** Alpha version  
**IAM actions:** `emailPro:apiovh:domain/dkim/get`

Returns the names of the DKIM selectors of the domain. Get one to read its DNS record and its status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `service` | path | string | yes | Service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkim" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/email/pro/{service}/domain/{domainName}/dkim")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/email/pro/{service}/domain/{domainName}/dkim");

print_r($result);
?>
```

## Get a DKIM selector

`GET /1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#get-email-pro-service-domain-domainname-dkim-selectorname

**Status:** Alpha version  
**IAM actions:** `emailPro:apiovh:domain/dkim/get`

Returns the status of the DKIM selector, the CNAME record to add to the DNS zone with its target and validation status, and the header used for the DKIM signature.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `selectorName` | path | string | yes | Selector name |
| `service` | path | string | yes | Service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Dkim | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameIsValid` | boolean | read-only | DNS CNAME validation passed |
| `customerRecord` | string | read-only | Customer DNS record |
| `header` | string | read-only | Header used for DKIM signature |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `recordType` | email.pro.DkimRecordTypeEnum | read-only | Record type of the customer record — one of `CNAME` |
| `selectorName` | string | read-only | Selector name |
| `status` | email.pro.DkimStatusEnum | read-only | DKIM status — one of `deleting`, `disabling`, `enabling`, `inProduction`, `ready`, `todo`, `waitingRecord` |
| `targetRecord` | string | read-only | Target of the customer record |
| `taskPendingId` | integer | read-only | Pending task for this DKIM |

```json
{
  "cnameIsValid": true,
  "customerRecord": "string",
  "header": "string",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "recordType": "CNAME",
  "selectorName": "string",
  "status": "deleting",
  "targetRecord": "string",
  "taskPendingId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}");

print_r($result);
?>
```

## Create a DKIM selector

`POST /1.0/email/pro/{service}/domain/{domainName}/dkim`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#post-email-pro-service-domain-domainname-dkim

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/dkim/create`

Create a DKIM selector. Creates the DKIM selector `selectorName` on the domain and returns the task. Set `configureDkim` to configure its DNS record when the domain is hosted by OVHcloud, and `autoEnableDKIM` to enable it once configured.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `service` | path | string | yes | The internal name of your pro organization |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoEnableDKIM` | boolean |  | Enable DKIM automatically after DKIM configuration |
| `configureDkim` | boolean |  | If you host domain in OVH we can configure dkim dns record automatically |
| `selectorName` | string | yes | selector name for DKIM |

```json
{
  "autoEnableDKIM": true,
  "configureDkim": true,
  "selectorName": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.pro.TaskFunctionEnum | read-only | Function name — one of `addAccount`, `addAlias`, `addDomain`, `addDomainDKIM`, `addDomainDisclaimer`, `addExternalContact`, `addFullAccess`, `addSendAs`, `addSendOnBehalfTo`, `addServiceAuthorizedIp`, `changeHostname`, `changePassword`, … |
| `id` | integer | read-only | Task id |
| `status` | email.pro.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "addAccount",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkim" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/email/pro/{service}/domain/{domainName}/dkim",
	autoEnableDKIM = None, # Enable DKIM automatically after DKIM configuration (type: boolean, nullable)
	configureDkim = None, # If you host domain in OVH we can configure dkim dns record automatically (type: boolean, nullable)
	selectorName = None, # selector name for DKIM (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/email/pro/{service}/domain/{domainName}/dkim", array(
	autoEnableDKIM => null, // Enable DKIM automatically after DKIM configuration (type: boolean, nullable)
	configureDkim => null, // If you host domain in OVH we can configure dkim dns record automatically (type: boolean, nullable)
	selectorName => null, // selector name for DKIM (type: string)
));

print_r($result);
?>
```

## Delete a DKIM selector

`DELETE /1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#delete-email-pro-service-domain-domainname-dkim-selectorname

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/dkim/delete`

Delete a DKIM selector. Removes the DKIM selector and its key from the domain of the Email Pro service, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `selectorName` | path | string | yes | selectorName |
| `service` | path | string | yes | The internal name of your pro organization |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.pro.TaskFunctionEnum | read-only | Function name — one of `addAccount`, `addAlias`, `addDomain`, `addDomainDKIM`, `addDomainDisclaimer`, `addExternalContact`, `addFullAccess`, `addSendAs`, `addSendOnBehalfTo`, `addServiceAuthorizedIp`, `changeHostname`, `changePassword`, … |
| `id` | integer | read-only | Task id |
| `status` | email.pro.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "addAccount",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}");

print_r($result);
?>
```

## Disable DKIM signing

`POST /1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/disable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#post-email-pro-service-domain-domainname-dkim-selectorname-disable

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/dkim/disable`

Disable DKIM signing. Stops signing the emails of the domain with this DKIM selector, and returns the task. The selector is kept.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `selectorName` | path | string | yes | selectorName |
| `service` | path | string | yes | The internal name of your pro organization |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.pro.TaskFunctionEnum | read-only | Function name — one of `addAccount`, `addAlias`, `addDomain`, `addDomainDKIM`, `addDomainDisclaimer`, `addExternalContact`, `addFullAccess`, `addSendAs`, `addSendOnBehalfTo`, `addServiceAuthorizedIp`, `changeHostname`, `changePassword`, … |
| `id` | integer | read-only | Task id |
| `status` | email.pro.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "addAccount",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/disable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/disable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/disable");

print_r($result);
?>
```

## Enable DKIM signing

`POST /1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/enable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#post-email-pro-service-domain-domainname-dkim-selectorname-enable

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/dkim/enable`

Enable DKIM signing. Signs the emails of the domain with the DKIM selector, or switches to it from the selector in use, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `selectorName` | path | string | yes | selectorName |
| `service` | path | string | yes | The internal name of your pro organization |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.pro.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.pro.TaskFunctionEnum | read-only | Function name — one of `addAccount`, `addAlias`, `addDomain`, `addDomainDKIM`, `addDomainDisclaimer`, `addExternalContact`, `addFullAccess`, `addSendAs`, `addSendOnBehalfTo`, `addServiceAuthorizedIp`, `changeHostname`, `changePassword`, … |
| `id` | integer | read-only | Task id |
| `status` | email.pro.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "addAccount",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/enable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/enable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/email/pro/{service}/domain/{domainName}/dkim/{selectorName}/enable");

print_r($result);
?>
```

## List available DKIM selectors

`GET /1.0/email/pro/{service}/domain/{domainName}/dkimSelector`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/domains/#get-email-pro-service-domain-domainname-dkimselector

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:domain/dkimSelector/get`

List available DKIM selectors. Returns the selector names that can be used to create a DKIM selector on the domain.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `service` | path | string | yes | The internal name of your pro organization |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/domain/{domainName}/dkimSelector" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/email/pro/{service}/domain/{domainName}/dkimSelector")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/email/pro/{service}/domain/{domainName}/dkimSelector");

print_r($result);
?>
```
