# Web Cloud › Email and Collaborative Solutions › Microsoft Exchange › Private Exchange › Remote Mailboxes API

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

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

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/

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

## Operations

- `GET /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox` — List remote mailboxes
- `GET /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}` — Get a remote mailbox
- `POST /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox` — Create a remote mailbox
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}` — Delete a remote mailbox
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}` — Update a remote mailbox
- `GET /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias` — List remote mailbox aliases
- `GET /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias/{alias}` — Get a remote mailbox alias
- `POST /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias` — Create a remote mailbox alias
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias/{alias}` — Delete a remote mailbox alias
- `POST /email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/changePassword` — Change a remote mailbox password

## List remote mailboxes

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

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

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

List remote mailboxes. Returns the primary email addresses of the remote mailboxes. Filter them by `primaryEmailAddress` or `id`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | query | integer |  | Filter the value of id property (like) |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `primaryEmailAddress` | query | string |  | Filter the value of primaryEmailAddress property (like) |

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

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

print_r($result);
?>
```

## Get a remote mailbox

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}`

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

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

Get a remote mailbox. Returns the login, names, type, remote routing address, state, spam settings and contact details of the remote mailbox.

### 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 |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SAMAccountName` | string | read-only | SAM account name |
| `city` | string |  | city |
| `company` | string |  | Company name |
| `countryCode` | email.exchange.CountryCodeEnum |  | Country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `creationDate` | string (date-time) | read-only | Creation date |
| `description` | string |  | Description |
| `displayName` | string |  | Remote mailbox display name |
| `domain` | string |  | Remote mailbox domain |
| `exchangeGuid` | string | read-only | exchangeGuid for manual configuration |
| `fax` | phoneNumber |  | Fax number |
| `firstName` | string |  | Remote mailbox first name |
| `guid` | string | read-only | GUID for user in active directory |
| `hiddenFromGAL` | boolean |  | Hide remote mailbox in Global Address List |
| `id` | integer | read-only | Remote mailbox id |
| `initial` | string |  | Remote mailbox initials |
| `jobDepartment` | string |  | Job Department |
| `jobTitle` | string |  | Job title |
| `lastName` | string |  | Remote mailbox last name |
| `login` | string |  | Remote mailbox login |
| `mobile` | phoneNumber |  | Mobile phone |
| `numberOfAliases` | integer | read-only | Count the number of related aliases attached to this account |
| `office` | string |  | Job office |
| `phone` | phoneNumber |  | Phone number |
| `postalCode` | string |  | Postal code |
| `primaryEmailAddress` | string | read-only | Default email for this mailbox |
| `region` | string |  | region |
| `remoteRoutingAddress` | string | read-only | Email address of associated mailbox |
| `spamAndVirusConfiguration` | email.exchange.spamAndVirusConfiguration |  | Spam and Antivirus configuration |
| `spamAndVirusConfiguration.checkDKIM` | boolean |  | Check DKIM of message |
| `spamAndVirusConfiguration.checkSPF` | boolean |  | Check SPF of message |
| `spamAndVirusConfiguration.deleteSpam` | boolean |  | If message is a spam delete it |
| `spamAndVirusConfiguration.deleteVirus` | boolean |  | If message is a virus delete it |
| `spamAndVirusConfiguration.putInJunk` | boolean |  | If message is a spam or virus put in junk. Overridden by deleteSpam or deleteVirus |
| `spamAndVirusConfiguration.tagSpam` | boolean |  | If message is a spam change its subject |
| `spamAndVirusConfiguration.tagVirus` | boolean |  | If message is a virus change its subject |
| `state` | email.exchange.ObjectStateEnum | read-only | Remote mailbox state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `streetAddress` | string |  | Street address |
| `taskPendingId` | integer | read-only | Pending task for this remote mailbox |
| `type` | email.exchange.ExchangeRemoteMailboxTypeEnum | read-only | Type of mailbox — one of `equipment`, `regular`, `room` |

```json
{
  "SAMAccountName": "string",
  "city": "string",
  "company": "string",
  "countryCode": "AC",
  "creationDate": "2024-01-01T12:00:00Z",
  "description": "string",
  "displayName": "string",
  "domain": "string",
  "exchangeGuid": "string",
  "fax": "string",
  "firstName": "string",
  "guid": "string",
  "hiddenFromGAL": true,
  "id": 0,
  "initial": "string",
  "jobDepartment": "string",
  "jobTitle": "string",
  "lastName": "string",
  "login": "string",
  "mobile": "string",
  "numberOfAliases": 0,
  "office": "string",
  "phone": "string",
  "postalCode": "string",
  "primaryEmailAddress": "string",
  "region": "string",
  "remoteRoutingAddress": "string",
  "spamAndVirusConfiguration": {
    "checkDKIM": true,
    "checkSPF": true,
    "deleteSpam": true,
    "deleteVirus": true,
    "putInJunk": true,
    "tagSpam": true,
    "tagVirus": true
  },
  "state": "creating",
  "streetAddress": "string",
  "taskPendingId": 0,
  "type": "equipment"
}
```

### Example

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

# 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}/remoteMailbox/{primaryEmailAddress}");

print_r($result);
?>
```

## Create a remote mailbox

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

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

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

Create a remote mailbox. Creates a regular, room or equipment remote mailbox from a `login`, a `domain`, a `password`, an `exchangeGuid` and the `remoteRoutingAddress` of the associated mailbox, 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 |
| --- | --- | --- | --- |
| `city` | string |  | City |
| `company` | string |  | Company name |
| `countryCode` | email.exchange.CountryCodeEnum |  | Country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `description` | string |  | Description |
| `displayName` | string |  | Display name |
| `domain` | string | yes | Email domain |
| `exchangeGuid` | string | yes | Remote exchangeGuid |
| `fax` | phoneNumber |  | Fax number |
| `firstName` | string |  | First name |
| `hiddenFromGAL` | boolean |  | Hide the remote mailbox in Global Address List |
| `initials` | string |  | Initials |
| `jobDepartment` | string |  | Job department |
| `jobTitle` | string |  | Job title |
| `lastName` | string |  | Last name |
| `login` | string | yes | Login |
| `mobile` | phoneNumber |  | Mobile phone number |
| `office` | string |  | Office |
| `password` | string (password) | yes | Password |
| `phone` | phoneNumber |  | Phone Number |
| `postalCode` | string |  | Postal code |
| `region` | string |  | Region |
| `remoteRoutingAddress` | string | yes | Address of associated mailbox |
| `spamAndVirusConfiguration` | email.exchange.spamAndVirusConfiguration |  | Antispam and Antivirus configuration |
| `spamAndVirusConfiguration.checkDKIM` | boolean |  | Check DKIM of message |
| `spamAndVirusConfiguration.checkSPF` | boolean |  | Check SPF of message |
| `spamAndVirusConfiguration.deleteSpam` | boolean |  | If message is a spam delete it |
| `spamAndVirusConfiguration.deleteVirus` | boolean |  | If message is a virus delete it |
| `spamAndVirusConfiguration.putInJunk` | boolean |  | If message is a spam or virus put in junk. Overridden by deleteSpam or deleteVirus |
| `spamAndVirusConfiguration.tagSpam` | boolean |  | If message is a spam change its subject |
| `spamAndVirusConfiguration.tagVirus` | boolean |  | If message is a virus change its subject |
| `streetAddress` | string |  | Street address |
| `type` | email.exchange.ExchangeRemoteMailboxTypeEnum | yes | Type of mailbox — one of `equipment`, `regular`, `room` |

```json
{
  "city": "string",
  "company": "string",
  "countryCode": "AC",
  "description": "string",
  "displayName": "string",
  "domain": "string",
  "exchangeGuid": "string",
  "fax": "string",
  "firstName": "string",
  "hiddenFromGAL": true,
  "initials": "string",
  "jobDepartment": "string",
  "jobTitle": "string",
  "lastName": "string",
  "login": "string",
  "mobile": "string",
  "office": "string",
  "password": "string",
  "phone": "string",
  "postalCode": "string",
  "region": "string",
  "remoteRoutingAddress": "string",
  "spamAndVirusConfiguration": {
    "checkDKIM": true,
    "checkSPF": true,
    "deleteSpam": true,
    "deleteVirus": true,
    "putInJunk": true,
    "tagSpam": true,
    "tagVirus": true
  },
  "streetAddress": "string",
  "type": "equipment"
}
```

### 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}/remoteMailbox" \
  -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.ExchangeRemoteMailboxTypeEnum
result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox",
	city = None, # City (type: string, nullable)
	company = None, # Company name (type: string, nullable)
	countryCode = None, # Country code (type: email.exchange.CountryCodeEnum, nullable)
	description = None, # Description (type: string, nullable)
	displayName = None, # Display name (type: string, nullable)
	domain = None, # Email domain (type: string)
	exchangeGuid = None, # Remote exchangeGuid (type: string)
	fax = None, # Fax number (type: phoneNumber, nullable)
	firstName = None, # First name (type: string, nullable)
	hiddenFromGAL = None, # Hide the remote mailbox in Global Address List (type: boolean, nullable)
	initials = None, # Initials (type: string, nullable)
	jobDepartment = None, # Job department (type: string, nullable)
	jobTitle = None, # Job title (type: string, nullable)
	lastName = None, # Last name (type: string, nullable)
	login = None, # Login (type: string)
	mobile = None, # Mobile phone number (type: phoneNumber, nullable)
	office = None, # Office (type: string, nullable)
	password = None, # Password (type: password)
	phone = None, # Phone Number (type: phoneNumber, nullable)
	postalCode = None, # Postal code (type: string, nullable)
	region = None, # Region (type: string, nullable)
	remoteRoutingAddress = None, # Address of associated mailbox (type: string)
	spamAndVirusConfiguration = None, # Antispam and Antivirus configuration (type: email.exchange.spamAndVirusConfiguration, nullable)
	streetAddress = None, # Street address (type: string, nullable)
	type = None, # Type of mailbox (type: email.exchange.ExchangeRemoteMailboxTypeEnum)
)

# 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.ExchangeRemoteMailboxTypeEnum
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox", array(
	city => null, // City (type: string, nullable)
	company => null, // Company name (type: string, nullable)
	countryCode => null, // Country code (type: email.exchange.CountryCodeEnum, nullable)
	description => null, // Description (type: string, nullable)
	displayName => null, // Display name (type: string, nullable)
	domain => null, // Email domain (type: string)
	exchangeGuid => null, // Remote exchangeGuid (type: string)
	fax => null, // Fax number (type: phoneNumber, nullable)
	firstName => null, // First name (type: string, nullable)
	hiddenFromGAL => null, // Hide the remote mailbox in Global Address List (type: boolean, nullable)
	initials => null, // Initials (type: string, nullable)
	jobDepartment => null, // Job department (type: string, nullable)
	jobTitle => null, // Job title (type: string, nullable)
	lastName => null, // Last name (type: string, nullable)
	login => null, // Login (type: string)
	mobile => null, // Mobile phone number (type: phoneNumber, nullable)
	office => null, // Office (type: string, nullable)
	password => null, // Password (type: password)
	phone => null, // Phone Number (type: phoneNumber, nullable)
	postalCode => null, // Postal code (type: string, nullable)
	region => null, // Region (type: string, nullable)
	remoteRoutingAddress => null, // Address of associated mailbox (type: string)
	spamAndVirusConfiguration => null, // Antispam and Antivirus configuration (type: email.exchange.spamAndVirusConfiguration, nullable)
	streetAddress => null, // Street address (type: string, nullable)
	type => null, // Type of mailbox (type: email.exchange.ExchangeRemoteMailboxTypeEnum)
));

print_r($result);
?>
```

## Delete a remote mailbox

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#delete-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress

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

Delete a remote mailbox. Removes the remote mailbox from the Exchange service and returns the task. Its aliases are removed with it.

### 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 |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### 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}/remoteMailbox/{primaryEmailAddress}" \
  -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}/remoteMailbox/{primaryEmailAddress}")

# 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}/remoteMailbox/{primaryEmailAddress}");

print_r($result);
?>
```

## Update a remote mailbox

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#put-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress

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

Update a remote mailbox. Updates the names, display name, spam settings, Global Address List visibility and contact details of the remote mailbox.

### 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 |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### Request body (required)

Type: `email.exchange.exchangeRemoteMailbox`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SAMAccountName` | string | read-only | SAM account name |
| `city` | string |  | city |
| `company` | string |  | Company name |
| `countryCode` | email.exchange.CountryCodeEnum |  | Country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `creationDate` | string (date-time) | read-only | Creation date |
| `description` | string |  | Description |
| `displayName` | string |  | Remote mailbox display name |
| `domain` | string |  | Remote mailbox domain |
| `exchangeGuid` | string | read-only | exchangeGuid for manual configuration |
| `fax` | phoneNumber |  | Fax number |
| `firstName` | string |  | Remote mailbox first name |
| `guid` | string | read-only | GUID for user in active directory |
| `hiddenFromGAL` | boolean |  | Hide remote mailbox in Global Address List |
| `id` | integer | read-only | Remote mailbox id |
| `initial` | string |  | Remote mailbox initials |
| `jobDepartment` | string |  | Job Department |
| `jobTitle` | string |  | Job title |
| `lastName` | string |  | Remote mailbox last name |
| `login` | string |  | Remote mailbox login |
| `mobile` | phoneNumber |  | Mobile phone |
| `numberOfAliases` | integer | read-only | Count the number of related aliases attached to this account |
| `office` | string |  | Job office |
| `phone` | phoneNumber |  | Phone number |
| `postalCode` | string |  | Postal code |
| `primaryEmailAddress` | string | read-only | Default email for this mailbox |
| `region` | string |  | region |
| `remoteRoutingAddress` | string | read-only | Email address of associated mailbox |
| `spamAndVirusConfiguration` | email.exchange.spamAndVirusConfiguration |  | Spam and Antivirus configuration |
| `spamAndVirusConfiguration.checkDKIM` | boolean |  | Check DKIM of message |
| `spamAndVirusConfiguration.checkSPF` | boolean |  | Check SPF of message |
| `spamAndVirusConfiguration.deleteSpam` | boolean |  | If message is a spam delete it |
| `spamAndVirusConfiguration.deleteVirus` | boolean |  | If message is a virus delete it |
| `spamAndVirusConfiguration.putInJunk` | boolean |  | If message is a spam or virus put in junk. Overridden by deleteSpam or deleteVirus |
| `spamAndVirusConfiguration.tagSpam` | boolean |  | If message is a spam change its subject |
| `spamAndVirusConfiguration.tagVirus` | boolean |  | If message is a virus change its subject |
| `state` | email.exchange.ObjectStateEnum | read-only | Remote mailbox state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `streetAddress` | string |  | Street address |
| `taskPendingId` | integer | read-only | Pending task for this remote mailbox |
| `type` | email.exchange.ExchangeRemoteMailboxTypeEnum | read-only | Type of mailbox — one of `equipment`, `regular`, `room` |

```json
{
  "city": "string",
  "company": "string",
  "countryCode": "AC",
  "description": "string",
  "displayName": "string",
  "domain": "string",
  "fax": "string",
  "firstName": "string",
  "hiddenFromGAL": true,
  "initial": "string",
  "jobDepartment": "string",
  "jobTitle": "string",
  "lastName": "string",
  "login": "string",
  "mobile": "string",
  "office": "string",
  "phone": "string",
  "postalCode": "string",
  "region": "string",
  "spamAndVirusConfiguration": {
    "checkDKIM": true,
    "checkSPF": true,
    "deleteSpam": true,
    "deleteVirus": true,
    "putInJunk": true,
    "tagSpam": true,
    "tagVirus": true
  },
  "streetAddress": "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}/remoteMailbox/{primaryEmailAddress}" \
  -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.exchangeRemoteMailbox
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}",
	city = None, # city (type: string, nullable)
	company = None, # Company name (type: string, nullable)
	countryCode = None, # Country code (type: email.exchange.CountryCodeEnum, nullable)
	description = None, # Description (type: string, nullable)
	displayName = None, # Remote mailbox display name (type: string, nullable)
	domain = None, # Remote mailbox domain (type: string)
	fax = None, # Fax number (type: phoneNumber, nullable)
	firstName = None, # Remote mailbox first name (type: string, nullable)
	hiddenFromGAL = None, # Hide remote mailbox  in Global Address List (type: boolean)
	initial = None, # Remote mailbox initials (type: string, nullable)
	jobDepartment = None, # Job Department (type: string, nullable)
	jobTitle = None, # Job title (type: string, nullable)
	lastName = None, # Remote mailbox last name (type: string, nullable)
	login = None, # Remote mailbox login (type: string)
	mobile = None, # Mobile phone (type: phoneNumber, nullable)
	office = None, # Job office (type: string, nullable)
	phone = None, # Phone number (type: phoneNumber, nullable)
	postalCode = None, # Postal code (type: string, nullable)
	region = None, # region (type: string, nullable)
	spamAndVirusConfiguration = None, # Spam and Antivirus configuration (type: email.exchange.spamAndVirusConfiguration)
	streetAddress = None, # Street address (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: email.exchange.exchangeRemoteMailbox
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}", array(
	city => null, // city (type: string, nullable)
	company => null, // Company name (type: string, nullable)
	countryCode => null, // Country code (type: email.exchange.CountryCodeEnum, nullable)
	description => null, // Description (type: string, nullable)
	displayName => null, // Remote mailbox display name (type: string, nullable)
	domain => null, // Remote mailbox domain (type: string)
	fax => null, // Fax number (type: phoneNumber, nullable)
	firstName => null, // Remote mailbox first name (type: string, nullable)
	hiddenFromGAL => null, // Hide remote mailbox  in Global Address List (type: boolean)
	initial => null, // Remote mailbox initials (type: string, nullable)
	jobDepartment => null, // Job Department (type: string, nullable)
	jobTitle => null, // Job title (type: string, nullable)
	lastName => null, // Remote mailbox last name (type: string, nullable)
	login => null, // Remote mailbox login (type: string)
	mobile => null, // Mobile phone (type: phoneNumber, nullable)
	office => null, // Job office (type: string, nullable)
	phone => null, // Phone number (type: phoneNumber, nullable)
	postalCode => null, // Postal code (type: string, nullable)
	region => null, // region (type: string, nullable)
	spamAndVirusConfiguration => null, // Spam and Antivirus configuration (type: email.exchange.spamAndVirusConfiguration)
	streetAddress => null, // Street address (type: string, nullable)
));

print_r($result);
?>
```

## List remote mailbox aliases

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#get-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress-alias

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

List remote mailbox aliases. Returns the aliases of the remote mailbox: extra addresses that deliver to the same mailbox.

### 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 |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### 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}/remoteMailbox/{primaryEmailAddress}/alias" \
  -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}/remoteMailbox/{primaryEmailAddress}/alias")

# 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}/remoteMailbox/{primaryEmailAddress}/alias");

print_r($result);
?>
```

## Get a remote mailbox alias

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias/{alias}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#get-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress-alias-alias

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

Get a remote mailbox alias. Returns the alias address, its creation date and the ID of its pending task, if any (`taskPendingId`).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `alias` | path | string | yes | Alias |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alias` | string | read-only | Alias |
| `creationDate` | string (date-time) | read-only | Creation date |
| `taskPendingId` | integer | read-only | Pending task id |

```json
{
  "alias": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "taskPendingId": 0
}
```

### Example

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

# 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}/remoteMailbox/{primaryEmailAddress}/alias/{alias}");

print_r($result);
?>
```

## Create a remote mailbox alias

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#post-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress-alias

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

Create a remote mailbox alias. Adds the `alias` address to the remote mailbox, so that it receives its emails, 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 |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alias` | string | yes | Alias |

```json
{
  "alias": "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}/remoteMailbox/{primaryEmailAddress}/alias" \
  -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}/remoteMailbox/{primaryEmailAddress}/alias",
	alias = None, # Alias (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}/remoteMailbox/{primaryEmailAddress}/alias", array(
	alias => null, // Alias (type: string)
));

print_r($result);
?>
```

## Delete a remote mailbox alias

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/alias/{alias}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#delete-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress-alias-alias

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

Delete a remote mailbox alias. Removes the alias address from the remote mailbox, which no longer receives its emails, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `alias` | path | string | yes | Alias |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### 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}/remoteMailbox/{primaryEmailAddress}/alias/{alias}" \
  -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}/remoteMailbox/{primaryEmailAddress}/alias/{alias}")

# 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}/remoteMailbox/{primaryEmailAddress}/alias/{alias}");

print_r($result);
?>
```

## Change a remote mailbox password

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/remote-mailboxes/#post-email-exchange-organizationname-service-exchangeservice-remotemailbox-primaryemailaddress-changepassword

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

Change a remote mailbox password. Changes the password and returns the task. Set `forcePasswordChangeAtNextLogon` to make the user change it at the next logon.

### 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 |
| `primaryEmailAddress` | path | string | yes | Default email for this mailbox |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `forcePasswordChangeAtNextLogon` | boolean |  | The password will need to be changed at the next time you log on |
| `password` | string (password) |  | New password |

```json
{
  "forcePasswordChangeAtNextLogon": true,
  "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}/remoteMailbox/{primaryEmailAddress}/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
)

result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/changePassword",
	forcePasswordChangeAtNextLogon = None, # The password will need to be changed at the next time you log on (type: boolean, nullable)
	password = None, # New password (type: password, nullable)
)

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

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

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

$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/remoteMailbox/{primaryEmailAddress}/changePassword", array(
	forcePasswordChangeAtNextLogon => null, // The password will need to be changed at the next time you log on (type: boolean, nullable)
	password => null, // New password (type: password, nullable)
));

print_r($result);
?>
```
