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

> 9 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/hosted-exchange/resources/

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

## Operations

- `GET /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount` — List resource accounts
- `GET /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}` — Get a resource account
- `POST /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount` — Create a resource account
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}` — Delete a resource account
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}` — Update a resource account
- `GET /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate` — List resource account delegates
- `GET /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}` — Get a resource account delegate
- `POST /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate` — Add a resource account delegate
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}` — Remove a resource account delegate

## List resource accounts

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

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

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

List resource accounts. Returns the email addresses of the room and equipment resource accounts. Filter them by `resourceEmailAddress` or `company`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `company` | query | string |  | Filter the value of company property (like) |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `resourceEmailAddress` | query | string |  | Filter the value of resourceEmailAddress 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}/resourceAccount" \
  -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}/resourceAccount")

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

print_r($result);
?>
```

## Get a resource account

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#get-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress

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

Get a resource account. Returns the type, capacity, location, booking settings and state of the room or equipment resource account.

### 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 |
| `resourceEmailAddress` | path | string | yes | resource as email |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `addOrganizerToSubject` | boolean |  | meeting organizer's name is used as the subject of the meeting request |
| `allowConflict` | boolean |  | resource can be scheduled by more than one person during the same time period |
| `bookingWindow` | integer |  | maximum number of days in advance that the resource can be reserved |
| `capacity` | integer |  | number of the same equipment or capacity of a room |
| `company` | string |  | Company name |
| `creationDate` | string (date-time) | read-only | Creation date |
| `deleteComments` | boolean |  | remove any text in the message body of incoming meeting requests on resourceAccount |
| `deleteSubject` | boolean |  | remove email subject of incoming meeting requests on resourceAccount |
| `displayName` | string |  | name of resource |
| `location` | string |  | resource location name |
| `maximumDuration` | integer |  | maximum duration in minutes for meeting requests |
| `resourceEmailAddress` | string |  | resource as email |
| `showMeetingDetails` | email.exchange.ShowMeetingDetailsEnum |  | granted right on a calendar of that resourceAccount — one of `availabilityOnly`, `limitedDetails`, `reviewer` |
| `state` | email.exchange.ObjectStateEnum | read-only | account state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | task pending id |
| `type` | email.exchange.ResourceTypeEnum | read-only | resource type — one of `equipment`, `room` |

```json
{
  "addOrganizerToSubject": true,
  "allowConflict": true,
  "bookingWindow": 0,
  "capacity": 0,
  "company": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "deleteComments": true,
  "deleteSubject": true,
  "displayName": "string",
  "location": "string",
  "maximumDuration": 0,
  "resourceEmailAddress": "string",
  "showMeetingDetails": "availabilityOnly",
  "state": "creating",
  "taskPendingId": 0,
  "type": "equipment"
}
```

### Example

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

# 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}/resourceAccount/{resourceEmailAddress}");

print_r($result);
?>
```

## Create a resource account

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

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

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

Create a resource account. Creates a room or equipment resource account from its `resourceEmailAddress` and `capacity`, 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 |
| --- | --- | --- | --- |
| `addOrganizerToSubject` | boolean |  | meeting organizer's name is used as the subject of the meeting request |
| `allowConflict` | boolean |  | resource can be scheduled by more than one person during the same time period |
| `bookingWindow` | integer |  | maximum number of days in advance that the resource can be reserved |
| `capacity` | integer | yes | number of the same equipment or capacity of a room |
| `company` | string |  | Company name |
| `deleteComments` | boolean |  | remove any text in the message body of incoming meeting requests on resourceAccount |
| `deleteSubject` | boolean |  | remove email subject of incoming meeting requests on resourceAccount |
| `displayName` | string |  | resource account display name |
| `location` | string |  | resource location |
| `maximumDuration` | integer |  | maximum duration in minutes for meeting requests |
| `resourceEmailAddress` | string | yes | resource address |
| `showMeetingDetails` | email.exchange.ShowMeetingDetailsEnum |  | granted right on a calendar of that resourceAccount — one of `availabilityOnly`, `limitedDetails`, `reviewer` |
| `type` | email.exchange.ResourceTypeEnum | yes | type of your reservation — one of `equipment`, `room` |

```json
{
  "addOrganizerToSubject": true,
  "allowConflict": true,
  "bookingWindow": 0,
  "capacity": 0,
  "company": "string",
  "deleteComments": true,
  "deleteSubject": true,
  "displayName": "string",
  "location": "string",
  "maximumDuration": 0,
  "resourceEmailAddress": "string",
  "showMeetingDetails": "availabilityOnly",
  "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}/resourceAccount" \
  -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.ResourceTypeEnum
result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount",
	addOrganizerToSubject = None, # meeting organizer's name is used as the subject of the meeting request (type: boolean, nullable)
	allowConflict = None, # resource can be scheduled by more than one person during the same time period (type: boolean, nullable)
	bookingWindow = None, # maximum number of days in advance that the resource can be reserved (type: long, nullable)
	capacity = None, # number of the same equipment or capacity of a room (type: long)
	company = None, # Company name (type: string, nullable)
	deleteComments = None, # remove any text in the message body of incoming meeting requests on resourceAccount (type: boolean, nullable)
	deleteSubject = None, # remove email subject of incoming meeting requests on resourceAccount (type: boolean, nullable)
	displayName = None, # resource account display name (type: string, nullable)
	location = None, # resource location (type: string, nullable)
	maximumDuration = None, # maximum duration in minutes for meeting requests (type: long, nullable)
	resourceEmailAddress = None, # resource address (type: string)
	showMeetingDetails = None, # granted right on a calendar of that resourceAccount (type: email.exchange.ShowMeetingDetailsEnum, nullable)
	type = None, # type of your reservation (type: email.exchange.ResourceTypeEnum)
)

# 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.ResourceTypeEnum
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount", array(
	addOrganizerToSubject => null, // meeting organizer's name is used as the subject of the meeting request (type: boolean, nullable)
	allowConflict => null, // resource can be scheduled by more than one person during the same time period (type: boolean, nullable)
	bookingWindow => null, // maximum number of days in advance that the resource can be reserved (type: long, nullable)
	capacity => null, // number of the same equipment or capacity of a room (type: long)
	company => null, // Company name (type: string, nullable)
	deleteComments => null, // remove any text in the message body of incoming meeting requests on resourceAccount (type: boolean, nullable)
	deleteSubject => null, // remove email subject of incoming meeting requests on resourceAccount (type: boolean, nullable)
	displayName => null, // resource account display name (type: string, nullable)
	location => null, // resource location (type: string, nullable)
	maximumDuration => null, // maximum duration in minutes for meeting requests (type: long, nullable)
	resourceEmailAddress => null, // resource address (type: string)
	showMeetingDetails => null, // granted right on a calendar of that resourceAccount (type: email.exchange.ShowMeetingDetailsEnum, nullable)
	type => null, // type of your reservation (type: email.exchange.ResourceTypeEnum)
));

print_r($result);
?>
```

## Delete a resource account

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#delete-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress

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

Delete a resource account. Deletes the resource account (room or equipment) and its delegates, 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 |
| `resourceEmailAddress` | path | string | yes | resource as email |

### 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}/resourceAccount/{resourceEmailAddress}" \
  -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}/resourceAccount/{resourceEmailAddress}")

# 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}/resourceAccount/{resourceEmailAddress}");

print_r($result);
?>
```

## Update a resource account

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#put-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress

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

Update a resource account. Updates the display name, capacity, location and booking settings of the resource account, such as `allowConflict`, `bookingWindow` or `maximumDuration`.

### 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 |
| `resourceEmailAddress` | path | string | yes | resource as email |

### Request body (required)

Type: `email.exchange.resourceAccount`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `addOrganizerToSubject` | boolean |  | meeting organizer's name is used as the subject of the meeting request |
| `allowConflict` | boolean |  | resource can be scheduled by more than one person during the same time period |
| `bookingWindow` | integer |  | maximum number of days in advance that the resource can be reserved |
| `capacity` | integer |  | number of the same equipment or capacity of a room |
| `company` | string |  | Company name |
| `creationDate` | string (date-time) | read-only | Creation date |
| `deleteComments` | boolean |  | remove any text in the message body of incoming meeting requests on resourceAccount |
| `deleteSubject` | boolean |  | remove email subject of incoming meeting requests on resourceAccount |
| `displayName` | string |  | name of resource |
| `location` | string |  | resource location name |
| `maximumDuration` | integer |  | maximum duration in minutes for meeting requests |
| `resourceEmailAddress` | string |  | resource as email |
| `showMeetingDetails` | email.exchange.ShowMeetingDetailsEnum |  | granted right on a calendar of that resourceAccount — one of `availabilityOnly`, `limitedDetails`, `reviewer` |
| `state` | email.exchange.ObjectStateEnum | read-only | account state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | task pending id |
| `type` | email.exchange.ResourceTypeEnum | read-only | resource type — one of `equipment`, `room` |

```json
{
  "addOrganizerToSubject": true,
  "allowConflict": true,
  "bookingWindow": 0,
  "capacity": 0,
  "company": "string",
  "deleteComments": true,
  "deleteSubject": true,
  "displayName": "string",
  "location": "string",
  "maximumDuration": 0,
  "resourceEmailAddress": "string",
  "showMeetingDetails": "availabilityOnly"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}" \
  -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.resourceAccount
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}",
	addOrganizerToSubject = None, # meeting organizer's name is used as the subject of the meeting request (type: boolean)
	allowConflict = None, # resource can be scheduled by more than one person during the same time period (type: boolean)
	bookingWindow = None, # maximum number of days in advance that the resource can be reserved (type: integer)
	capacity = None, # number of the same equipment or capacity of a room (type: integer)
	company = None, # Company name (type: string, nullable)
	deleteComments = None, # remove any text in the message body of incoming meeting requests on resourceAccount (type: boolean)
	deleteSubject = None, # remove email subject of incoming meeting requests on resourceAccount (type: boolean)
	displayName = None, # name of resource (type: string)
	location = None, # resource location name (type: string)
	maximumDuration = None, # maximum duration in minutes for meeting requests (type: integer)
	resourceEmailAddress = None, # resource as email (type: string)
	showMeetingDetails = None, # granted right on a calendar of that resourceAccount (type: email.exchange.ShowMeetingDetailsEnum)
)

# 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.resourceAccount
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}", array(
	addOrganizerToSubject => null, // meeting organizer's name is used as the subject of the meeting request (type: boolean)
	allowConflict => null, // resource can be scheduled by more than one person during the same time period (type: boolean)
	bookingWindow => null, // maximum number of days in advance that the resource can be reserved (type: integer)
	capacity => null, // number of the same equipment or capacity of a room (type: integer)
	company => null, // Company name (type: string, nullable)
	deleteComments => null, // remove any text in the message body of incoming meeting requests on resourceAccount (type: boolean)
	deleteSubject => null, // remove email subject of incoming meeting requests on resourceAccount (type: boolean)
	displayName => null, // name of resource (type: string)
	location => null, // resource location name (type: string)
	maximumDuration => null, // maximum duration in minutes for meeting requests (type: integer)
	resourceEmailAddress => null, // resource as email (type: string)
	showMeetingDetails => null, // granted right on a calendar of that resourceAccount (type: email.exchange.ShowMeetingDetailsEnum)
));

print_r($result);
?>
```

## List resource account delegates

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#get-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress-delegate

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

List resource account delegates. Returns the IDs of the accounts that are delegates of the resource account.

### 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 |
| `resourceEmailAddress` | path | string | yes | resource as email |

### 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}/resourceAccount/{resourceEmailAddress}/delegate" \
  -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}/resourceAccount/{resourceEmailAddress}/delegate")

# 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}/resourceAccount/{resourceEmailAddress}/delegate");

print_r($result);
?>
```

## Get a resource account delegate

`GET /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#get-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress-delegate-allowedaccountid

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

Get a resource account delegate. Returns the ID and the email address of the account that manages the bookings of the resource.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `allowedAccountId` | path | integer | yes | delegate's account id |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `resourceEmailAddress` | path | string | yes | resource as email |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedAccountId` | integer | read-only | delegate's account id |
| `creationDate` | string (date-time) | read-only | Creation date |
| `delegateEmailAddress` | string | read-only | Delegate account primaryEmailAddress |
| `taskPendingId` | integer | read-only | task pending id |

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

### Example

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

# 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}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}");

print_r($result);
?>
```

## Add a resource account delegate

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#post-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress-delegate

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

Add a resource account delegate. Adds the account given by `allowedAccountId` as a delegate of the resource account, 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 |
| `resourceEmailAddress` | path | string | yes | resource as email |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedAccountId` | integer | yes | delegate's account id |

```json
{
  "allowedAccountId": 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}/resourceAccount/{resourceEmailAddress}/delegate" \
  -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}/resourceAccount/{resourceEmailAddress}/delegate",
	allowedAccountId = None, # delegate's 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}/resourceAccount/{resourceEmailAddress}/delegate", array(
	allowedAccountId => null, // delegate's account id (type: long)
));

print_r($result);
?>
```

## Remove a resource account delegate

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/hosted-exchange/resources/#delete-email-exchange-organizationname-service-exchangeservice-resourceaccount-resourceemailaddress-delegate-allowedaccountid

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

Remove a resource account delegate. Withdraws from the email account the management of the bookings of the resource, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `allowedAccountId` | path | integer | yes | delegate's account id |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `organizationName` | path | string | yes | The internal name of your exchange organization |
| `resourceEmailAddress` | path | string | yes | resource as email |

### 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}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}" \
  -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}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}")

# 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}/resourceAccount/{resourceEmailAddress}/delegate/{allowedAccountId}");

print_r($result);
?>
```
