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

> 23 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/trusted-exchange/security/

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

## Operations

- `GET /email/exchange/{organizationName}/service/{exchangeService}/authenticationPolicy` — List authentication policies
- `GET /email/exchange/{organizationName}/service/{exchangeService}/authenticationPolicy/{id}` — Get an authentication policy
- `GET /email/exchange/{organizationName}/service/{exchangeService}/authorizedIp` — List authorized IPs
- `GET /email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}` — Get an authorized IP
- `POST /email/exchange/{organizationName}/service/{exchangeService}/authorizedIp` — Add an authorized IP
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}` — Delete an authorized IP
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}` — Update an authorized IP
- `GET /email/exchange/{organizationName}/service/{exchangeService}/customIsolation` — List custom isolations
- `GET /email/exchange/{organizationName}/service/{exchangeService}/customIsolation/{name}` — Get a custom isolation
- `POST /email/exchange/{organizationName}/service/{exchangeService}/customIsolation` — Create a custom isolation
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/customIsolation/{name}` — Delete a custom isolation
- `GET /email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser` — Get the impersonated user
- `POST /email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser` — Create the impersonated user
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser` — Delete the impersonated user
- `POST /email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser/changePassword` — Change the impersonated user password
- `GET /email/exchange/{organizationName}/service/{exchangeService}/impersonationPasswordPolicy` — Get the impersonation password policy
- `GET /email/exchange/{organizationName}/service/{exchangeService}/protocol` — Get the service protocols
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/protocol` — Update the service protocols
- `GET /email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification` — List ActiveSync notified accounts
- `GET /email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification/{notifiedAccountId}` — Get an ActiveSync notified account
- `POST /email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification` — Add an ActiveSync notified account
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification/{notifiedAccountId}` — Remove an ActiveSync notified account
- `POST /email/exchange/{organizationName}/service/{exchangeService}/updateFlagsOnAllAccounts` — Update spam and virus flags

## List authentication policies

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

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

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

List authentication policies. Returns the IDs of the authentication policies. Filter them by the legacy or modern authentication blocked on a protocol, such as `blockLegacyAuthImap`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `blockLegacyAuthActiveSync` | query | boolean |  | Filter the value of blockLegacyAuthActiveSync property (=) |
| `blockLegacyAuthAutodiscover` | query | boolean |  | Filter the value of blockLegacyAuthAutodiscover property (=) |
| `blockLegacyAuthImap` | query | boolean |  | Filter the value of blockLegacyAuthImap property (=) |
| `blockLegacyAuthMapi` | query | boolean |  | Filter the value of blockLegacyAuthMapi property (=) |
| `blockLegacyAuthOfflineAddressBook` | query | boolean |  | Filter the value of blockLegacyAuthOfflineAddressBook property (=) |
| `blockLegacyAuthPop` | query | boolean |  | Filter the value of blockLegacyAuthPop property (=) |
| `blockLegacyAuthWebServices` | query | boolean |  | Filter the value of blockLegacyAuthWebServices property (=) |
| `blockModernAuthActiveSync` | query | boolean |  | Filter the value of blockModernAuthActiveSync property (=) |
| `blockModernAuthAutodiscover` | query | boolean |  | Filter the value of blockModernAuthAutodiscover property (=) |
| `blockModernAuthImap` | query | boolean |  | Filter the value of blockModernAuthImap property (=) |
| `blockModernAuthMapi` | query | boolean |  | Filter the value of blockModernAuthMapi property (=) |
| `blockModernAuthOfflineAddressBook` | query | boolean |  | Filter the value of blockModernAuthOfflineAddressBook property (=) |
| `blockModernAuthPop` | query | boolean |  | Filter the value of blockModernAuthPop property (=) |
| `blockModernAuthWebServices` | query | boolean |  | Filter the value of blockModernAuthWebServices property (=) |
| `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 | integer[] | successful operation |

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get an authentication policy

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/authenticationPolicy/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#get-email-exchange-organizationname-service-exchangeservice-authenticationpolicy-id

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

Get an authentication policy. Returns, for each protocol, whether legacy and modern authentication are blocked: ActiveSync, Autodiscover, IMAP, MAPI, offline address book, POP and web services.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | path | integer | yes | Authentication policy id |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `blockLegacyAuthActiveSync` | boolean | read-only | Block legacy authentication on ActiveSync |
| `blockLegacyAuthAutodiscover` | boolean | read-only | Block legacy authentication on Autodiscover |
| `blockLegacyAuthImap` | boolean | read-only | Block legacy authentication on Imap |
| `blockLegacyAuthMapi` | boolean | read-only | Block legacy authentication on Mapi |
| `blockLegacyAuthOfflineAddressBook` | boolean | read-only | Block legacy authentication on Offline Address Book |
| `blockLegacyAuthPop` | boolean | read-only | Block legacy authentication on Pop |
| `blockLegacyAuthWebServices` | boolean | read-only | Block legacy authentication on Web Services |
| `blockModernAuthActiveSync` | boolean | read-only | Block modern authentication on ActiveSync |
| `blockModernAuthAutodiscover` | boolean | read-only | Block modern authentication on Autodiscover |
| `blockModernAuthImap` | boolean | read-only | Block modern authentication on Imap |
| `blockModernAuthMapi` | boolean | read-only | Block modern authentication on Mapi |
| `blockModernAuthOfflineAddressBook` | boolean | read-only | Block modern authentication on Offline Address Book |
| `blockModernAuthPop` | boolean | read-only | Block modern authentication on Pop |
| `blockModernAuthWebServices` | boolean | read-only | Block modern authentication on Web Services |
| `id` | integer | read-only | Authentication policy id |

```json
{
  "blockLegacyAuthActiveSync": true,
  "blockLegacyAuthAutodiscover": true,
  "blockLegacyAuthImap": true,
  "blockLegacyAuthMapi": true,
  "blockLegacyAuthOfflineAddressBook": true,
  "blockLegacyAuthPop": true,
  "blockLegacyAuthWebServices": true,
  "blockModernAuthActiveSync": true,
  "blockModernAuthAutodiscover": true,
  "blockModernAuthImap": true,
  "blockModernAuthMapi": true,
  "blockModernAuthOfflineAddressBook": true,
  "blockModernAuthPop": true,
  "blockModernAuthWebServices": true,
  "id": 0
}
```

### Example

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

# 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}/authenticationPolicy/{id}");

print_r($result);
?>
```

## List authorized IPs

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

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

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

List authorized IPs. Returns the IP blocks allowed to access the service over POP, IMAP, SMTP or HTTPS, with or without SSL.

### 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 |

### Responses

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

```json
[
  "192.0.2.0/24"
]
```

### Example

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

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

print_r($result);
?>
```

## Get an authorized IP

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#get-email-exchange-organizationname-service-exchangeservice-authorizedip-ip

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

Get an authorized IP. Returns the display name and status of the IP block, and the accesses it is allowed: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `ip` | path | ipv4Block | yes | Allowed IP |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `HTTPS` | boolean |  | Webmail,outlook,web Service(EWS) and active sync access (port 443) |
| `IMAP` | boolean |  | IMAP access (port 143) |
| `IMAPS` | boolean |  | IMAPS access (port 993) |
| `POP` | boolean |  | POP access (port 110) |
| `POPS` | boolean |  | POPS access (port 995) |
| `SMTP` | boolean |  | SMTP access (port 25) |
| `SMTPS` | boolean |  | SMTPS access (port 587) |
| `creationDate` | string (date-time) | read-only | Creation date |
| `displayName` | string |  | display name |
| `ip` | ipv4Block | read-only | Allowed IP |
| `status` | email.exchange.authorizedIpStatusEnum | read-only | Authorized IP status — one of `creating`, `deleting`, `ok` |
| `updateDate` | string (date-time) | read-only | Last update date |

```json
{
  "HTTPS": true,
  "IMAP": true,
  "IMAPS": true,
  "POP": true,
  "POPS": true,
  "SMTP": true,
  "SMTPS": true,
  "creationDate": "2024-01-01T12:00:00Z",
  "displayName": "string",
  "ip": "192.0.2.0/24",
  "status": "creating",
  "updateDate": "2024-01-01T12:00:00Z"
}
```

### Example

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

# 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}/authorizedIp/{ip}");

print_r($result);
?>
```

## Add an authorized IP

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

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

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

Add an authorized IP. Allows an IP block to access the service over the selected protocols: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS. Returns the task.

### 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 |
| --- | --- | --- | --- |
| `HTTPS` | boolean |  | Webmail,outlook,web Service(EWS) and active sync access (port 443) |
| `IMAP` | boolean |  | IMAP access (port 143) |
| `IMAPS` | boolean |  | IMAPS access (port 993) |
| `IP` | ipv4Block | yes | Authorized IP |
| `POP` | boolean |  | POP access (port 110) |
| `POPS` | boolean |  | POPS access (port 995) |
| `SMTP` | boolean |  | SMTP access (port 25) |
| `SMTPS` | boolean |  | SMTPS access (port 587) |
| `displayName` | string |  | display name information |

```json
{
  "HTTPS": true,
  "IMAP": true,
  "IMAPS": true,
  "IP": "192.0.2.0/24",
  "POP": true,
  "POPS": true,
  "SMTP": true,
  "SMTPS": true,
  "displayName": "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}/authorizedIp" \
  -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}/authorizedIp",
	HTTPS = None, # Webmail,outlook,web Service(EWS) and active sync access (port 443) (type: boolean, nullable)
	IMAP = None, # IMAP access (port 143) (type: boolean, nullable)
	IMAPS = None, # IMAPS access (port 993) (type: boolean, nullable)
	IP = None, # Authorized IP (type: ipv4Block)
	POP = None, # POP access (port 110) (type: boolean, nullable)
	POPS = None, # POPS access (port 995) (type: boolean, nullable)
	SMTP = None, # SMTP access (port 25) (type: boolean, nullable)
	SMTPS = None, # SMTPS access (port 587) (type: boolean, nullable)
	displayName = None, # display name information (type: 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: string
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp", array(
	HTTPS => null, // Webmail,outlook,web Service(EWS) and active sync access (port 443) (type: boolean, nullable)
	IMAP => null, // IMAP access (port 143) (type: boolean, nullable)
	IMAPS => null, // IMAPS access (port 993) (type: boolean, nullable)
	IP => null, // Authorized IP (type: ipv4Block)
	POP => null, // POP access (port 110) (type: boolean, nullable)
	POPS => null, // POPS access (port 995) (type: boolean, nullable)
	SMTP => null, // SMTP access (port 25) (type: boolean, nullable)
	SMTPS => null, // SMTPS access (port 587) (type: boolean, nullable)
	displayName => null, // display name information (type: string, nullable)
));

print_r($result);
?>
```

## Delete an authorized IP

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#delete-email-exchange-organizationname-service-exchangeservice-authorizedip-ip

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

Delete an authorized IP. Removes the IP block from the IPs allowed to reach the service, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `ip` | path | ipv4Block | yes | Allowed IP |
| `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}/authorizedIp/{ip}" \
  -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}/authorizedIp/{ip}")

# 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}/authorizedIp/{ip}");

print_r($result);
?>
```

## Update an authorized IP

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#put-email-exchange-organizationname-service-exchangeservice-authorizedip-ip

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

Update an authorized IP. Updates the display name of the IP block and the accesses it is allowed: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `ip` | path | ipv4Block | yes | Allowed IP |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Request body (required)

Type: `email.exchange.exchangeServiceAuthorizedIp`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `HTTPS` | boolean |  | Webmail,outlook,web Service(EWS) and active sync access (port 443) |
| `IMAP` | boolean |  | IMAP access (port 143) |
| `IMAPS` | boolean |  | IMAPS access (port 993) |
| `POP` | boolean |  | POP access (port 110) |
| `POPS` | boolean |  | POPS access (port 995) |
| `SMTP` | boolean |  | SMTP access (port 25) |
| `SMTPS` | boolean |  | SMTPS access (port 587) |
| `creationDate` | string (date-time) | read-only | Creation date |
| `displayName` | string |  | display name |
| `ip` | ipv4Block | read-only | Allowed IP |
| `status` | email.exchange.authorizedIpStatusEnum | read-only | Authorized IP status — one of `creating`, `deleting`, `ok` |
| `updateDate` | string (date-time) | read-only | Last update date |

```json
{
  "HTTPS": true,
  "IMAP": true,
  "IMAPS": true,
  "POP": true,
  "POPS": true,
  "SMTP": true,
  "SMTPS": true,
  "displayName": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}" \
  -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.exchangeServiceAuthorizedIp
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}",
	HTTPS = None, # Webmail,outlook,web Service(EWS) and active sync access (port 443) (type: boolean)
	IMAP = None, # IMAP access (port 143) (type: boolean)
	IMAPS = None, # IMAPS access (port 993) (type: boolean)
	POP = None, # POP access (port 110) (type: boolean)
	POPS = None, # POPS access (port 995) (type: boolean)
	SMTP = None, # SMTP access (port 25) (type: boolean)
	SMTPS = None, # SMTPS access (port 587) (type: boolean)
	displayName = None, # display name (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: email.exchange.exchangeServiceAuthorizedIp
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/authorizedIp/{ip}", array(
	HTTPS => null, // Webmail,outlook,web Service(EWS) and active sync access (port 443) (type: boolean)
	IMAP => null, // IMAP access (port 143) (type: boolean)
	IMAPS => null, // IMAPS access (port 993) (type: boolean)
	POP => null, // POP access (port 110) (type: boolean)
	POPS => null, // POPS access (port 995) (type: boolean)
	SMTP => null, // SMTP access (port 25) (type: boolean)
	SMTPS => null, // SMTPS access (port 587) (type: boolean)
	displayName => null, // display name (type: string)
));

print_r($result);
?>
```

## List custom isolations

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

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

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

List custom isolations. Returns the names of the custom isolations. Filter them by `name`, `isolationField` or `isolationValue`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `isolationField` | query | email.exchange.OvhCustomIsolationFieldEnum |  | Filter the value of isolationField property (=) — one of `company`, `country` |
| `isolationValue` | query | string |  | Filter the value of isolationValue property (like) |
| `name` | query | string |  | Filter the value of name property (like) |
| `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}/customIsolation" \
  -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}/customIsolation")

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

print_r($result);
?>
```

## Get a custom isolation

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/customIsolation/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#get-email-exchange-organizationname-service-exchangeservice-customisolation-name

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

Get a custom isolation. Returns the name of the custom isolation, the field and value it isolates on, its status and creation date.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `isolationField` | email.exchange.OvhCustomIsolationFieldEnum | read-only | Field used for isolation — one of `company`, `country` |
| `isolationValue` | string | read-only | Isolation field value |
| `name` | string | read-only | Name of the custom isolation |
| `status` | email.exchange.ObjectStateEnum | read-only | Custom isolation status — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "isolationField": "company",
  "isolationValue": "string",
  "name": "string",
  "status": "creating"
}
```

### Example

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

# 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}/customIsolation/{name}");

print_r($result);
?>
```

## Create a custom isolation

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

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

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

Create a custom isolation. Creates a custom isolation from a `name`, an `isolationField` (company or country) and an `isolationValue`, and returns the task.

### 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 |
| --- | --- | --- | --- |
| `isolationField` | email.exchange.OvhCustomIsolationFieldEnum | yes | field use for isolation — one of `company`, `country` |
| `isolationValue` | string | yes | value used for isolation |
| `name` | string | yes | display name of isolation |

```json
{
  "isolationField": "company",
  "isolationValue": "string",
  "name": "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}/customIsolation" \
  -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}/customIsolation",
	isolationField = None, # field use for isolation (type: email.exchange.OvhCustomIsolationFieldEnum)
	isolationValue = None, # value used for isolation (type: string)
	name = None, # display name of isolation (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}/customIsolation", array(
	isolationField => null, // field use for isolation (type: email.exchange.OvhCustomIsolationFieldEnum)
	isolationValue => null, // value used for isolation (type: string)
	name => null, // display name of isolation (type: string)
));

print_r($result);
?>
```

## Delete a custom isolation

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/customIsolation/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#delete-email-exchange-organizationname-service-exchangeservice-customisolation-name

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

Delete a custom isolation. Removes the custom isolation from the Exchange service, so that its field no longer isolates users, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `name` | path | string | yes | Name of the custom isolation |
| `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}/customIsolation/{name}" \
  -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}/customIsolation/{name}")

# 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}/customIsolation/{name}");

print_r($result);
?>
```

## Get the impersonated user

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

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

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

Get the impersonated user. Returns the UPN, state, creation date and last password change of the user with impersonation rights on all mailboxes.

### 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 |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `lastPasswordChange` | string (date-time) | read-only | Last password update date |
| `state` | email.exchange.ObjectStateEnum | read-only | User state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Pending task id |
| `upn` | string | read-only | User Principal Name |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "lastPasswordChange": "2024-01-01T12:00:00Z",
  "state": "creating",
  "taskPendingId": 0,
  "upn": "string"
}
```

### Example

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

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

print_r($result);
?>
```

## Create the impersonated user

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

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

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

Create the impersonated user. Creates a user with impersonation rights on all mailboxes of the service, with the given `password`, and returns the task.

### 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 |
| --- | --- | --- | --- |
| `password` | string (password) | yes | password for the user |

```json
{
  "password": "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}/impersonatedUser" \
  -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: password
result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser",
	password = None, # password for the user (type: password)
)

# 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: password
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser", array(
	password => null, // password for the user (type: password)
));

print_r($result);
?>
```

## Delete the impersonated user

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#delete-email-exchange-organizationname-service-exchangeservice-impersonateduser

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

Delete the impersonated user. Deletes the user with impersonation rights on all mailboxes, and returns the task.

### 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 |

### 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}/impersonatedUser" \
  -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}/impersonatedUser")

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

print_r($result);
?>
```

## Change the impersonated user password

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#post-email-exchange-organizationname-service-exchangeservice-impersonateduser-changepassword

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/impersonatedUser/changePassword`

Change the impersonated user password. Sets the new `password` of the impersonated user of the service, and returns the task.

### 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 |
| --- | --- | --- | --- |
| `password` | string (password) | yes | new password |

```json
{
  "password": "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}/impersonatedUser/changePassword" \
  -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: password
result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser/changePassword",
	password = None, # new password (type: password)
)

# 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: password
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/impersonatedUser/changePassword", array(
	password => null, // new password (type: password)
));

print_r($result);
?>
```

## Get the impersonation password policy

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

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

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

Get the impersonation password policy. Returns the password policy of the impersonated user: complexity, minimum length, password age, history and lockout settings.

### 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 |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `complexityEnabled` | boolean |  | enable policy for strong and secure passwords |
| `lockoutDuration` | integer |  | number of minutes account will remain locked if it occurs |
| `lockoutThreshold` | integer |  | number of attempts before account is locked |
| `maxPasswordAge` | integer |  | maximum number of days that account's password is valid before expiration |
| `minPasswordAge` | integer |  | minimum number of days before being able to change account's password |
| `minPasswordLength` | integer |  | minimum number of characters password must contain |
| `passwordHistoryCount` | integer |  | number of historical passwords that cannot be reused |

```json
{
  "complexityEnabled": true,
  "lockoutDuration": 0,
  "lockoutThreshold": 0,
  "maxPasswordAge": 0,
  "minPasswordAge": 0,
  "minPasswordLength": 0,
  "passwordHistoryCount": 0
}
```

### Example

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

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

print_r($result);
?>
```

## Get the service protocols

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

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

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

Get the service protocols. Returns whether POP, IMAP, webmail and ActiveSync are enabled on the service, and the ActiveSync policy applied to new devices.

### 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 |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `IMAP` | boolean |  | IMAP protocol enabled on this Exchange service |
| `POP` | boolean |  | POP protocol enabled on this Exchange service |
| `activeSync` | boolean |  | ActiveSync protocol enabled on this Exchange service |
| `activeSyncPolicy` | email.exchange.ActiveSyncPolicyEnum |  | ActiveSync policy to apply at device's first connection — one of `allow`, `block`, `quarantine` |
| `creationDate` | string (date-time) | read-only | Creation date |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `taskPendingId` | integer | read-only | Pending task id |
| `webMail` | boolean |  | Web mail protocol enabled on this Exchange service |

```json
{
  "IMAP": true,
  "POP": true,
  "activeSync": true,
  "activeSyncPolicy": "allow",
  "creationDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "taskPendingId": 0,
  "webMail": true
}
```

### Example

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

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

print_r($result);
?>
```

## Update the service protocols

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/protocol`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#put-email-exchange-organizationname-service-exchangeservice-protocol

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

Update the service protocols. Enables or disables POP, IMAP, webmail and ActiveSync on the service, and sets the ActiveSync policy applied to new devices: allow, block or quarantine.

### 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: `email.exchange.exchangeServiceProtocol`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `IMAP` | boolean |  | IMAP protocol enabled on this Exchange service |
| `POP` | boolean |  | POP protocol enabled on this Exchange service |
| `activeSync` | boolean |  | ActiveSync protocol enabled on this Exchange service |
| `activeSyncPolicy` | email.exchange.ActiveSyncPolicyEnum |  | ActiveSync policy to apply at device's first connection — one of `allow`, `block`, `quarantine` |
| `creationDate` | string (date-time) | read-only | Creation date |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `taskPendingId` | integer | read-only | Pending task id |
| `webMail` | boolean |  | Web mail protocol enabled on this Exchange service |

```json
{
  "IMAP": true,
  "POP": true,
  "activeSync": true,
  "activeSyncPolicy": "allow",
  "webMail": true
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/protocol" \
  -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.exchangeServiceProtocol
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/protocol",
	IMAP = None, # IMAP protocol enabled on this Exchange service (type: boolean)
	POP = None, # POP protocol enabled on this Exchange service (type: boolean)
	activeSync = None, # ActiveSync protocol enabled on this Exchange service (type: boolean)
	activeSyncPolicy = None, # ActiveSync policy to apply at device's first connection (type: email.exchange.ActiveSyncPolicyEnum)
	webMail = None, # Web mail protocol enabled on this Exchange service (type: boolean)
)

# 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.exchangeServiceProtocol
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/protocol", array(
	IMAP => null, // IMAP protocol enabled on this Exchange service (type: boolean)
	POP => null, // POP protocol enabled on this Exchange service (type: boolean)
	activeSync => null, // ActiveSync protocol enabled on this Exchange service (type: boolean)
	activeSyncPolicy => null, // ActiveSync policy to apply at device's first connection (type: email.exchange.ActiveSyncPolicyEnum)
	webMail => null, // Web mail protocol enabled on this Exchange service (type: boolean)
));

print_r($result);
?>
```

## List ActiveSync notified accounts

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#get-email-exchange-organizationname-service-exchangeservice-protocol-activesyncmailnotification

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

List ActiveSync notified accounts. Returns the IDs of the accounts that receive the ActiveSync quarantine notifications.

### 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 |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get an ActiveSync notified account

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification/{notifiedAccountId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#get-email-exchange-organizationname-service-exchangeservice-protocol-activesyncmailnotification-notifiedaccountid

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

Get an ActiveSync notified account. Returns the email address and state of an account that receives the ActiveSync quarantine notifications.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `notifiedAccountId` | path | integer | yes | Notified Account Id |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `notifiedAccountId` | integer | read-only | Notified Account Id |
| `primaryEmailAddress` | string | read-only | Primary email address for notified account |
| `state` | email.exchange.activeSyncNotificationStateEnum | read-only | Email state — one of `creating`, `deleting`, `ok` |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "notifiedAccountId": 0,
  "primaryEmailAddress": "string",
  "state": "creating"
}
```

### Example

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

# 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}/protocol/activeSyncMailNotification/{notifiedAccountId}");

print_r($result);
?>
```

## Add an ActiveSync notified account

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#post-email-exchange-organizationname-service-exchangeservice-protocol-activesyncmailnotification

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

Add an ActiveSync notified account. Subscribes the account given by `notifiedAccountId` to the ActiveSync quarantine notifications, and returns the task.

### 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 |
| --- | --- | --- | --- |
| `notifiedAccountId` | integer | yes | Exchange Account Id |

```json
{
  "notifiedAccountId": 0
}
```

### 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}/protocol/activeSyncMailNotification" \
  -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: long
result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification",
	notifiedAccountId = None, # Exchange Account Id (type: long)
)

# 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: long
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification", array(
	notifiedAccountId => null, // Exchange Account Id (type: long)
));

print_r($result);
?>
```

## Remove an ActiveSync notified account

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification/{notifiedAccountId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/trusted-exchange/security/#delete-email-exchange-organizationname-service-exchangeservice-protocol-activesyncmailnotification-notifiedaccountid

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

Remove an ActiveSync notified account. Unsubscribes the account from the ActiveSync quarantine notifications, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `notifiedAccountId` | path | integer | yes | Notified Account Id |
| `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}/protocol/activeSyncMailNotification/{notifiedAccountId}" \
  -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}/protocol/activeSyncMailNotification/{notifiedAccountId}")

# 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}/protocol/activeSyncMailNotification/{notifiedAccountId}");

print_r($result);
?>
```

## Update spam and virus flags

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

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/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 |
| --- | --- | --- | --- | --- |
| `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 | — | successful operation |

### Example

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

print_r($result);
?>
```
