# Web Cloud › Email and Collaborative Solutions › Microsoft Exchange › Private Exchange › 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

> 17 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/private-exchange/domains/

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

## Operations

- `GET /email/exchange/{organizationName}/service/{exchangeService}/domain` — List domains
- `GET /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}` — Get a domain
- `POST /email/exchange/{organizationName}/service/{exchangeService}/domain` — Add a domain
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}` — Remove a domain
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}` — Update a domain
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/changeDefaultSBR` — Change the default sender-based routing
- `GET /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim` — List DKIM selectors
- `GET /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}` — Get a DKIM selector
- `POST /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim` — Create a DKIM selector
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}` — Delete a DKIM selector
- `POST /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}/disable` — Disable DKIM signing
- `POST /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}/enable` — Enable DKIM signing
- `GET /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkimSelector` — List available DKIM selectors
- `GET /msServices/{serviceName}/upnSuffix` — List UPN suffixes
- `GET /msServices/{serviceName}/upnSuffix/{suffix}` — Get a UPN suffix
- `POST /msServices/{serviceName}/upnSuffix` — Create a UPN suffix
- `DELETE /msServices/{serviceName}/upnSuffix/{suffix}` — Delete a UPN suffix

## List domains

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/domain/get`

List domains. Returns the names of the domains of the service. Filter them by `state`, or set `main` to get the main domain only.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `main` | query | boolean |  | Filter the value of main property (like) |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `state` | query | email.exchange.ObjectStateEnum |  | Filter the value of state property (=) — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain");

print_r($result);
?>
```

## Get a domain

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/domain/get`

Get a domain. Returns the type, state and validation status of the domain, its expected and configured MX, SPF and SRV records, and its DKIM diagnostics.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.exchange.Domain | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameToCheck` | string | read-only | Cname that will be checked to prove the domain ownership |
| `dkimDiagnostics` | email.exchange.DomainDkimDiagnostics | read-only | DKIM diagnostics on this domain |
| `dkimDiagnostics.errorCode` | integer |  |  |
| `dkimDiagnostics.message` | string |  |  |
| `dkimDiagnostics.state` | email.exchange.DomainDkimDiagnosticsStateEnum |  | Domain DKIM state — 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 |
| `main` | boolean | read-only | If true this is an organization (Exchange 2010 only) |
| `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 |
| `organization2010` | string | read-only | If specified, indicates to which organization this domain belongs (Exchange 2010 only) |
| `sbrDefault` | string | read-only | Relay domain address that will be used to all newly created accounts |
| `sendConnectorIdDefault` | integer | read-only | Send connector id that will be used to all newly created accounts |
| `spfIsValid` | boolean | read-only | Wether your SPF record is valid |
| `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.exchange.ObjectStateEnum | read-only | Domain state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Pending taks id |
| `type` | email.exchange.DomainTypeEnum |  | 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,
  "main": true,
  "mxIsValid": true,
  "mxRecord": [
    "string"
  ],
  "mxRelay": "string",
  "name": "string",
  "organization2010": "string",
  "sbrDefault": "string",
  "sendConnectorIdDefault": 0,
  "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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}");

print_r($result);
?>
```

## Add a domain

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain`

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

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

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange 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) |
| `main` | boolean |  | This newly created domain will be an organization (Exchange 2010 only) |
| `mxRelay` | string |  | If specified, emails to not existing address will be redirected to that domain |
| `name` | string | yes | Domain to install on server |
| `organization2010` | string |  | If specified, indicates which organization this newly created domain will be part of (Exchange 2010 only) |
| `sbrDefault` | string |  | Default Sender base routing destination domain applied on all new created accounts |
| `sendConnectorIdDefault` | integer |  | Default Sender Connector id applied on all new created accounts |
| `type` | email.exchange.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,
  "main": true,
  "mxRelay": "string",
  "name": "string",
  "organization2010": "string",
  "sbrDefault": "string",
  "sendConnectorIdDefault": 0,
  "type": "authoritative"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.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": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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)
	main = None, # This newly created domain will be an organization (Exchange 2010 only) (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)
	organization2010 = None, # If specified, indicates which organization this newly created domain will be part of (Exchange 2010 only) (type: string, nullable)
	sbrDefault = None, # Default Sender base routing destination domain applied on all new created accounts (type: string, nullable)
	sendConnectorIdDefault = None, # Default Sender Connector id applied on all new created accounts (type: long, nullable)
	type = None, # Type of domain that You want to install (type: email.exchange.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/exchange/{organizationName}/service/{exchangeService}/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)
	main => null, // This newly created domain will be an organization (Exchange 2010 only) (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)
	organization2010 => null, // If specified, indicates which organization this newly created domain will be part of (Exchange 2010 only) (type: string, nullable)
	sbrDefault => null, // Default Sender base routing destination domain applied on all new created accounts (type: string, nullable)
	sendConnectorIdDefault => null, // Default Sender Connector id applied on all new created accounts (type: long, nullable)
	type => null, // Type of domain that You want to install (type: email.exchange.DomainTypeEnum)
));

print_r($result);
?>
```

## Remove a domain

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}`

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

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

Remove a domain. Detaches the domain from the Exchange 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 |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.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": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}");

print_r($result);
?>
```

## Update a domain

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}`

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

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

Update a domain. Updates the type of the domain and `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 |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Request body (required)

Type: `email.exchange.Domain`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameToCheck` | string | read-only | Cname that will be checked to prove the domain ownership |
| `dkimDiagnostics` | email.exchange.DomainDkimDiagnostics | read-only | DKIM diagnostics on this domain |
| `dkimDiagnostics.errorCode` | integer |  |  |
| `dkimDiagnostics.message` | string |  |  |
| `dkimDiagnostics.state` | email.exchange.DomainDkimDiagnosticsStateEnum |  | Domain DKIM state — 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 |
| `main` | boolean | read-only | If true this is an organization (Exchange 2010 only) |
| `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 |
| `organization2010` | string | read-only | If specified, indicates to which organization this domain belongs (Exchange 2010 only) |
| `sbrDefault` | string | read-only | Relay domain address that will be used to all newly created accounts |
| `sendConnectorIdDefault` | integer | read-only | Send connector id that will be used to all newly created accounts |
| `spfIsValid` | boolean | read-only | Wether your SPF record is valid |
| `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.exchange.ObjectStateEnum | read-only | Domain state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Pending taks id |
| `type` | email.exchange.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/exchange/{organizationName}/service/{exchangeService}/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.exchange.Domain
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/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.exchange.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.exchange.Domain
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/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.exchange.DomainTypeEnum)
));

print_r($result);
?>
```

## Change the default sender-based routing

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/changeDefaultSBR`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/domain/changeDefaultSBR`

Change the default sender-based routing. Sets the destination domain (`sbrDefault`) and the send connector (`sendConnectorIdDefault`) applied to all new accounts of the domain.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sbrDefault` | string |  | Default Sender base routing destination domain applied on all new created accounts |
| `sendConnectorIdDefault` | integer |  | Default Sender Connector id applied on all new created accounts |

```json
{
  "sbrDefault": "string",
  "sendConnectorIdDefault": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/changeDefaultSBR" \
  -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.put("/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/changeDefaultSBR",
	sbrDefault = None, # Default Sender base routing destination domain applied on all new created accounts (type: string, nullable)
	sendConnectorIdDefault = None, # Default Sender Connector id applied on all new created accounts (type: long, nullable)
)

# 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->put("/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/changeDefaultSBR", array(
	sbrDefault => null, // Default Sender base routing destination domain applied on all new created accounts (type: string, nullable)
	sendConnectorIdDefault => null, // Default Sender Connector id applied on all new created accounts (type: long, nullable)
));

print_r($result);
?>
```

## List DKIM selectors

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/domain/dkim/get`

List DKIM selectors. 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 |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim");

print_r($result);
?>
```

## Get a DKIM selector

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/domain/dkim/get`

Get a DKIM selector. Returns the status of the DKIM selector, the DNS record to create (name, type and target) and whether the CNAME record is valid.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.exchange.dkim | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameIsValid` | boolean | read-only | If true your dns cname configuration is valid |
| `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` | string | read-only | Record type of the customer record |
| `selectorName` | string | read-only | selectorName |
| `status` | email.exchange.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": "string",
  "selectorName": "string",
  "status": "deleting",
  "targetRecord": "string",
  "taskPendingId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}");

print_r($result);
?>
```

## Create a DKIM selector

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim`

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

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

Create a DKIM selector. Creates a DKIM selector on the domain and returns the task. For a domain hosted by OVHcloud, `configureDkim` creates the DNS record and `autoEnableDKIM` enables the selector once configured.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange 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.exchange.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.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": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}`

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

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

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

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.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": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}");

print_r($result);
?>
```

## Disable DKIM signing

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}/disable`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/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 |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `selectorName` | path | string | yes | selectorName |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.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": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}/disable");

print_r($result);
?>
```

## Enable DKIM signing

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}/enable`

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

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

Enable DKIM signing. Enables DKIM signing with the selector, or switches the selector in use to this one, and returns the task.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.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": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkim/{selectorName}/enable");

print_r($result);
?>
```

## List available DKIM selectors

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkimSelector`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/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 |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/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/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/dkimSelector");

print_r($result);
?>
```

## List UPN suffixes

`GET /1.0/msServices/{serviceName}/upnSuffix`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/domains/#get-msservices-servicename-upnsuffix

**Status:** Stable production version  
**IAM actions:** `microsoftServices:apiovh:upnSuffix/get`

List UPN suffixes. Returns the UPN suffixes of the Active Directory service. Get one to read its state and the CNAME to check.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your Active Directory organization |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/msServices/{serviceName}/upnSuffix" \
  -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("/msServices/{serviceName}/upnSuffix")

# 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("/msServices/{serviceName}/upnSuffix");

print_r($result);
?>
```

## Get a UPN suffix

`GET /1.0/msServices/{serviceName}/upnSuffix/{suffix}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/domains/#get-msservices-servicename-upnsuffix-suffix

**Status:** Stable production version  
**IAM actions:** `microsoftServices:apiovh:upnSuffix/get`

Get a UPN suffix. Returns the state of the UPN suffix, the CNAME record used to verify it and whether its ownership is validated.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your Active Directory organization |
| `suffix` | path | string | yes | UPN suffix |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | msServices.upnSuffix | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cnameToCheck` | string | read-only | Cname record used for UPN suffix verification |
| `ownershipValidated` | boolean | read-only | Ownership for upn suffix confirmed |
| `state` | msServices.UPNStateEnum | read-only | UPN suffix state — one of `creating`, `deleting`, `ok` |
| `suffix` | string | read-only | UPN suffix |
| `taskPendingId` | integer | read-only | Pending task for this upnSuffix |

```json
{
  "cnameToCheck": "string",
  "ownershipValidated": true,
  "state": "creating",
  "suffix": "string",
  "taskPendingId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/msServices/{serviceName}/upnSuffix/{suffix}" \
  -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("/msServices/{serviceName}/upnSuffix/{suffix}")

# 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("/msServices/{serviceName}/upnSuffix/{suffix}");

print_r($result);
?>
```

## Create a UPN suffix

`POST /1.0/msServices/{serviceName}/upnSuffix`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/domains/#post-msservices-servicename-upnsuffix

**Status:** Stable production version  
**IAM actions:** `microsoftServices:apiovh:upnSuffix/create`

Create a UPN suffix. Adds a UPN suffix to the Active Directory service and returns the task. Its ownership is verified with the CNAME record given in `cnameToCheck`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your Active Directory organization |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `suffix` | string | yes | UPN suffix to create |

```json
{
  "suffix": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | msServices.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | msServices.TaskFunctionEnum | read-only | Function name — one of `activateADSync`, `activateSharepoint`, `addADAccount`, `addADOU`, `addADSyncAccount`, `addADUPNSuffix`, `alterMfaOnAllUsers`, `changeADPassword`, `changeADSyncPassword`, `deactivateADSync`, `delADOU`, `deleteADAccount`, … |
| `id` | integer | read-only | Task id |
| `status` | msServices.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": "activateADSync",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/msServices/{serviceName}/upnSuffix" \
  -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("/msServices/{serviceName}/upnSuffix",
	suffix = None, # UPN suffix to create (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("/msServices/{serviceName}/upnSuffix", array(
	suffix => null, // UPN suffix to create (type: string)
));

print_r($result);
?>
```

## Delete a UPN suffix

`DELETE /1.0/msServices/{serviceName}/upnSuffix/{suffix}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/domains/#delete-msservices-servicename-upnsuffix-suffix

**Status:** Stable production version  
**IAM actions:** `microsoftServices:apiovh:upnSuffix/delete`

Delete a UPN suffix. Removes the UPN suffix from the Active Directory service, so that user names can no longer use it, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your Active Directory organization |
| `suffix` | path | string | yes | UPN suffix |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | msServices.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | msServices.TaskFunctionEnum | read-only | Function name — one of `activateADSync`, `activateSharepoint`, `addADAccount`, `addADOU`, `addADSyncAccount`, `addADUPNSuffix`, `alterMfaOnAllUsers`, `changeADPassword`, `changeADSyncPassword`, `deactivateADSync`, `delADOU`, `deleteADAccount`, … |
| `id` | integer | read-only | Task id |
| `status` | msServices.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": "activateADSync",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/msServices/{serviceName}/upnSuffix/{suffix}" \
  -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("/msServices/{serviceName}/upnSuffix/{suffix}")

# 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("/msServices/{serviceName}/upnSuffix/{suffix}");

print_r($result);
?>
```
