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

> 10 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/general-information/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/general-information.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/general-information.json?format=openapi3

## Operations

- `GET /email/pro` — List Email Pro services
- `GET /email/pro/{service}` — Get the Email Pro service
- `PUT /email/pro/{service}` — Update the Email Pro service
- `GET /email/pro/{service}/billingMigrated` — Get the billing migration status
- `GET /email/pro/{service}/billingPlan` — Get the billing plan
- `POST /email/pro/{service}/changeContact` — Change service contacts
- `GET /email/pro/{service}/server` — Get the server
- `GET /email/pro/{service}/serviceInfos` — Get service information
- `PUT /email/pro/{service}/serviceInfos` — Update service information
- `POST /email/pro/{service}/updateFlagsOnAllAccounts` — Update spam and virus flags

## List Email Pro services

`GET /1.0/email/pro`

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

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

Returns the names of the Email Pro services of the account. Filter them by IAM tags with `iamTags`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/pro" \
  -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")

# 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");

print_r($result);
?>
```

## Get the Email Pro service

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

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

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

Returns the state, offer, hostname and web interface URL of the service, its message size limits, its password and lockout policy, and its spam and virus configuration.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `complexityEnabled` | boolean | read-only | enable policy for strong and secure passwords |
| `displayName` | string | read-only | service displayName |
| `domain` | string | read-only | Domain name of your service |
| `hostname` | string | read-only | Hostname of your service |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `lastUpdateDate` | string (date-time) | read-only | Update date |
| `lockoutDuration` | integer | read-only | number of minutes account will remain locked if it occurs |
| `lockoutObservationWindow` | integer | read-only | number of minutes that must elapse after a failed logon to reset lockout trigger |
| `lockoutThreshold` | integer | read-only | number of attempts before account to be locked |
| `maxPasswordAge` | integer | read-only | maximum number of days that account's password is valid before expiration |
| `maxReceiveSize` | integer | read-only | Maximum message size that You can receive in MB |
| `maxSendSize` | integer | read-only | Maximum message size that You can send in MB |
| `minPasswordAge` | integer | read-only | minimum number of days before able to change account's password |
| `minPasswordLength` | integer | read-only | minimum number of characters password must contain |
| `offer` | email.pro.ServiceOfferEnum | read-only | Type of your offer — one of `emailpro` |
| `spamAndVirusConfiguration` | email.pro.spamAndVirusConfiguration | read-only | Spam and Antivirus configuration |
| `spamAndVirusConfiguration.checkDKIM` | boolean |  | Check DKIM of message |
| `spamAndVirusConfiguration.checkSPF` | boolean |  | Check SPF of message |
| `spamAndVirusConfiguration.deleteSpam` | boolean |  | If message is a spam delete it |
| `spamAndVirusConfiguration.deleteVirus` | boolean |  | If message is a virus delete it |
| `spamAndVirusConfiguration.putInJunk` | boolean |  | If message is a spam or virus put in junk. Overridden by deleteSpam or deleteVirus |
| `spamAndVirusConfiguration.tagSpam` | boolean |  | If message is a spam change its subject |
| `spamAndVirusConfiguration.tagVirus` | boolean |  | If message is a virus change its subject |
| `state` | email.pro.ServiceStateEnum | read-only | State of your service — one of `creating`, `deleting`, `inMaintenance`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Task pending id |
| `webUrl` | string | read-only | URL for web interface |

```json
{
  "complexityEnabled": true,
  "displayName": "string",
  "domain": "string",
  "hostname": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "lastUpdateDate": "2024-01-01T12:00:00Z",
  "lockoutDuration": 0,
  "lockoutObservationWindow": 0,
  "lockoutThreshold": 0,
  "maxPasswordAge": 0,
  "maxReceiveSize": 0,
  "maxSendSize": 0,
  "minPasswordAge": 0,
  "minPasswordLength": 0,
  "offer": "emailpro",
  "spamAndVirusConfiguration": {
    "checkDKIM": true,
    "checkSPF": true,
    "deleteSpam": true,
    "deleteVirus": true,
    "putInJunk": true,
    "tagSpam": true,
    "tagVirus": true
  },
  "state": "creating",
  "taskPendingId": 0,
  "webUrl": "string"
}
```

### Example

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

# 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}");

print_r($result);
?>
```

## Update the Email Pro service

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

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

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:put`

Update the Email Pro service. Updates the display name, message size limits, password and lockout policy, and spam and virus configuration of the service.

### Parameters

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

### Request body (required)

Type: `email.pro.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `complexityEnabled` | boolean |  | enable policy for strong and secure passwords |
| `displayName` | string |  | service displayName |
| `domain` | string | read-only | Domain name of your service |
| `hostname` | string | read-only | Hostname of your service |
| `lastUpdateDate` | string (date-time) | read-only | Update date |
| `lockoutDuration` | integer |  | number of minutes account will remain locked if it occurs |
| `lockoutObservationWindow` | integer |  | number of minutes that must elapse after a failed logon to reset lockout trigger |
| `lockoutThreshold` | integer |  | number of attempts before account to be locked |
| `maxPasswordAge` | integer |  | maximum number of days that account's password is valid before expiration |
| `maxReceiveSize` | integer |  | Maximum message size that You can receive in MB |
| `maxSendSize` | integer |  | Maximum message size that You can send in MB |
| `minPasswordAge` | integer |  | minimum number of days before able to change account's password |
| `minPasswordLength` | integer |  | minimum number of characters password must contain |
| `offer` | email.pro.ServiceOfferEnum | read-only | Type of your offer — one of `emailpro` |
| `spamAndVirusConfiguration` | email.pro.spamAndVirusConfiguration |  | Spam and Antivirus configuration |
| `spamAndVirusConfiguration.checkDKIM` | boolean |  | Check DKIM of message |
| `spamAndVirusConfiguration.checkSPF` | boolean |  | Check SPF of message |
| `spamAndVirusConfiguration.deleteSpam` | boolean |  | If message is a spam delete it |
| `spamAndVirusConfiguration.deleteVirus` | boolean |  | If message is a virus delete it |
| `spamAndVirusConfiguration.putInJunk` | boolean |  | If message is a spam or virus put in junk. Overridden by deleteSpam or deleteVirus |
| `spamAndVirusConfiguration.tagSpam` | boolean |  | If message is a spam change its subject |
| `spamAndVirusConfiguration.tagVirus` | boolean |  | If message is a virus change its subject |
| `state` | email.pro.ServiceStateEnum | read-only | State of your service — one of `creating`, `deleting`, `inMaintenance`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Task pending id |
| `webUrl` | string | read-only | URL for web interface |

```json
{
  "complexityEnabled": true,
  "displayName": "string",
  "lockoutDuration": 0,
  "lockoutObservationWindow": 0,
  "lockoutThreshold": 0,
  "maxPasswordAge": 0,
  "maxReceiveSize": 0,
  "maxSendSize": 0,
  "minPasswordAge": 0,
  "minPasswordLength": 0,
  "spamAndVirusConfiguration": {
    "checkDKIM": true,
    "checkSPF": true,
    "deleteSpam": true,
    "deleteVirus": true,
    "putInJunk": true,
    "tagSpam": true,
    "tagVirus": true
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}" \
  -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.Service
result = client.put("/email/pro/{service}",
	complexityEnabled = None, # enable policy for strong and secure passwords (type: boolean)
	displayName = None, # service displayName (type: string, nullable)
	lockoutDuration = None, # number of minutes account will remain locked if it occurs (type: integer)
	lockoutObservationWindow = None, # number of minutes that must elapse after a failed logon to reset lockout trigger (type: integer)
	lockoutThreshold = None, # number of attempts before account to be locked (type: integer, nullable)
	maxPasswordAge = None, # maximum number of days that account's password is valid before expiration (type: integer, nullable)
	maxReceiveSize = None, # Maximum message size that You can receive in MB (type: integer)
	maxSendSize = None, # Maximum message size that You can send in MB (type: integer)
	minPasswordAge = None, # minimum number of days before able to change account's password (type: integer, nullable)
	minPasswordLength = None, # minimum number of characters password must contain (type: integer, nullable)
	spamAndVirusConfiguration = None, # Spam and Antivirus configuration (type: email.pro.spamAndVirusConfiguration)
)

# 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.Service
$result = $ovh->put("/email/pro/{service}", array(
	complexityEnabled => null, // enable policy for strong and secure passwords (type: boolean)
	displayName => null, // service displayName (type: string, nullable)
	lockoutDuration => null, // number of minutes account will remain locked if it occurs (type: integer)
	lockoutObservationWindow => null, // number of minutes that must elapse after a failed logon to reset lockout trigger (type: integer)
	lockoutThreshold => null, // number of attempts before account to be locked (type: integer, nullable)
	maxPasswordAge => null, // maximum number of days that account's password is valid before expiration (type: integer, nullable)
	maxReceiveSize => null, // Maximum message size that You can receive in MB (type: integer)
	maxSendSize => null, // Maximum message size that You can send in MB (type: integer)
	minPasswordAge => null, // minimum number of days before able to change account's password (type: integer, nullable)
	minPasswordLength => null, // minimum number of characters password must contain (type: integer, nullable)
	spamAndVirusConfiguration => null, // Spam and Antivirus configuration (type: email.pro.spamAndVirusConfiguration)
));

print_r($result);
?>
```

## Get the billing migration status

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

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

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

Returns `true` when the service is billed by the new OVHcloud billing system.

### Parameters

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

### Responses

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

```json
true
```

### Example

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

# 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}/billingMigrated");

print_r($result);
?>
```

## Get the billing plan

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

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

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

Returns the name of the billing plan of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/billingPlan" \
  -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}/billingPlan")

# 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}/billingPlan");

print_r($result);
?>
```

## Change service contacts

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

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

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:changeContact`

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

### 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 |
| --- | --- | --- | --- |
| `contactAdmin` | string |  | The contact to set as admin contact |
| `contactBilling` | string |  | The contact to set as billing contact |
| `contactTech` | string |  | The contact to set as tech contact |

```json
{
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string"
}
```

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/changeContact" \
  -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: coreTypes.AccountId:string
result = client.post("/email/pro/{service}/changeContact",
	contactAdmin = None, # The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling = None, # The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech = None, # The contact to set as tech contact (type: coreTypes.AccountId:string, 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

// Request body type: coreTypes.AccountId:string
$result = $ovh->post("/email/pro/{service}/changeContact", array(
	contactAdmin => null, // The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling => null, // The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech => null, // The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
));

print_r($result);
?>
```

## Get the server

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

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

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

Returns the state, IPv4 and IPv6 addresses, version and disk usage of the server, and whether its A, AAAA and PTR DNS records are valid.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `currentDiskUsage` | integer | read-only | Current disk usage in MB |
| `diskSize` | integer | read-only | Total disk size in MB |
| `ip` | string | read-only | ipV4 |
| `ipV6` | string | read-only | ipV6 |
| `isAValid` | boolean | read-only | If true your dns A record is valid |
| `isAaaaValid` | boolean | read-only | If true your dns AAAA record is valid |
| `isPtrV6Valid` | boolean | read-only | If true your dns ptrV6 record is valid |
| `isPtrValid` | boolean | read-only | If true your dns ptr record is valid |
| `state` | email.pro.ServerStateEnum | read-only | Server state — one of `configurationPending`, `notConfigured`, `ok` |
| `taskPendingId` | integer | read-only | Task pending id |
| `version` | integer | read-only | Server version |

```json
{
  "currentDiskUsage": 0,
  "diskSize": 0,
  "ip": "string",
  "ipV6": "string",
  "isAValid": true,
  "isAaaaValid": true,
  "isPtrV6Valid": true,
  "isPtrValid": true,
  "state": "configurationPending",
  "taskPendingId": 0,
  "version": 0
}
```

### Example

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

# 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}/server");

print_r($result);
?>
```

## Get service information

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

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

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

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

# 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}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/email/pro/{service}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/email-pro/general-information/#put-email-pro-service-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/serviceInfos" \
  -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: services.Service
result = client.put("/email/pro/{service}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, 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

// Request body type: services.Service
$result = $ovh->put("/email/pro/{service}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Update spam and virus flags

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

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

**Status:** Stable production version  
**IAM actions:** `emailPro:apiovh:updateFlagsOnAllAccounts`

Update spam and virus flags. Applies the spam and virus configuration of the service (`spamAndVirusConfiguration`) to all its active email accounts.

### Parameters

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

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/pro/{service}/updateFlagsOnAllAccounts" \
  -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}/updateFlagsOnAllAccounts")

# 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}/updateFlagsOnAllAccounts");

print_r($result);
?>
```
