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

> 12 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/connectors/

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

## Operations

- `GET /email/exchange/{organizationName}/service/{exchangeService}/receiveConnector` — List receive connectors
- `GET /email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}` — Get a receive connector
- `POST /email/exchange/{organizationName}/service/{exchangeService}/receiveConnector` — Create a receive connector
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}` — Delete a receive connector
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}` — Update a receive connector
- `PATCH /email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}` — Partially update a receive connector
- `GET /email/exchange/{organizationName}/service/{exchangeService}/sendConnector` — List send connectors
- `GET /email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}` — Get a send connector
- `POST /email/exchange/{organizationName}/service/{exchangeService}/sendConnector` — Create a send connector
- `DELETE /email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}` — Delete a send connector
- `PUT /email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}` — Update a send connector
- `POST /email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}/changeAuthentication` — Change send connector authentication

## List receive connectors

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

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

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

Returns the IDs of the receive connectors of the service.

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get a receive connector

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

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

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

Returns the name, status, remote IP ranges, maximum message size and TLS requirement of the receive connector, and whether it is the default one.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `default` | boolean | read-only | Whether this is the default receive connector owned by Exchange. Read-only: only its status can be changed, and it cannot be deleted |
| `enabled` | boolean |  | Whether the receive connector is enabled |
| `id` | integer | read-only | Id of this receive connector |
| `maxMessageSize` | integer |  | The maximum message size to state, in megabytes. |
| `name` | string |  | Name of your receive connector, in 255 characters at most |
| `remoteIpRanges` | string[] |  | List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most |
| `requireTls` | boolean |  | All messages received through this connector must be transmitted using TLS |

```json
{
  "default": true,
  "enabled": true,
  "id": 0,
  "maxMessageSize": 0,
  "name": "string",
  "remoteIpRanges": [
    "string"
  ],
  "requireTls": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

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

result = client.get("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}")

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

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

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

$result = $ovh->get("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}");

print_r($result);
?>
```

## Create a receive connector

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

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

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

Creates a receive connector for the senders in `remoteIpRanges` and returns the task. A remote IP entry already declared by another receive connector of the service is refused. The connector is disabled unless `enabled` is true.

### Parameters

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

### Request body (required)

Type: `email.exchange.ReceiveConnectorCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  | Whether the receive connector must be enabled. Defaults to false |
| `maxMessageSize` | integer |  | The maximum message size to state, in megabytes. |
| `name` | string | yes | Name of your receive connector, in 255 characters at most |
| `remoteIpRanges` | string[] | yes | List of remote IP entries. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most |
| `requireTls` | boolean | yes | All messages received through this connector must be transmitted using TLS |

```json
{
  "enabled": true,
  "maxMessageSize": 0,
  "name": "string",
  "remoteIpRanges": [
    "string"
  ],
  "requireTls": true
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `completedAt` | string (date-time) | read-only | Completion date, null while the task is still running |
| `createdAt` | string (date-time) | read-only | Creation date |
| `function` | string | read-only | The operation the task performs |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |

```json
{
  "completedAt": "2024-01-01T12:00:00Z",
  "createdAt": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector" \
  -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.ReceiveConnectorCreation
result = client.post("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector",
	enabled = None, # Whether the receive connector must be enabled. Defaults to false (type: boolean)
	maxMessageSize = None, # The maximum message size to state, in megabytes. (type: integer)
	name = None, # Name of your receive connector, in 255 characters at most (type: string)
	remoteIpRanges = None, # List of remote IP entries. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (type: array)
	requireTls = None, # All messages received through this connector must be transmitted using TLS (type: boolean)
)

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

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

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

// Request body type: email.exchange.ReceiveConnectorCreation
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector", array(
	enabled => null, // Whether the receive connector must be enabled. Defaults to false (type: boolean)
	maxMessageSize => null, // The maximum message size to state, in megabytes. (type: integer)
	name => null, // Name of your receive connector, in 255 characters at most (type: string)
	remoteIpRanges => null, // List of remote IP entries. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (type: array)
	requireTls => null, // All messages received through this connector must be transmitted using TLS (type: boolean)
));

print_r($result);
?>
```

## Delete a receive connector

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}`

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

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

Deletes the receive connector and returns the task. The default receive connector cannot be deleted. When the last non-default connector is deleted, the default one is enabled again unless `enableDefaultReceiveConnector` is false.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `enableDefaultReceiveConnector` | query | boolean |  | When the deleted connector is the last non-default connector of the service, re-enable the default receive connector once it is removed. Defaults to true |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | path | integer | yes | Id |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `completedAt` | string (date-time) | read-only | Completion date, null while the task is still running |
| `createdAt` | string (date-time) | read-only | Creation date |
| `function` | string | read-only | The operation the task performs |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |

```json
{
  "completedAt": "2024-01-01T12:00:00Z",
  "createdAt": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "status": "cancelled"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

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

result = client.delete("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}")

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

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

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

$result = $ovh->delete("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}");

print_r($result);
?>
```

## Update a receive connector

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}`

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

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

Replaces the whole configuration of the receive connector and returns the task. `name`, `remoteIpRanges`, `requireTls` and `enabled` are all required: use PATCH to change only some of them. The default receive connector accepts `enabled` only, so it always refuses a PUT.

### Parameters

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

### Request body (required)

Type: `email.exchange.ReceiveConnectorUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | yes | Whether the receive connector is enabled |
| `maxMessageSize` | integer | yes | The maximum message size to state, in megabytes. |
| `name` | string | yes | Name of your receive connector, in 255 characters at most |
| `remoteIpRanges` | string[] | yes | List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most |
| `requireTls` | boolean | yes | All messages received through this connector must be transmitted using TLS |

```json
{
  "enabled": true,
  "maxMessageSize": 0,
  "name": "string",
  "remoteIpRanges": [
    "string"
  ],
  "requireTls": true
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `completedAt` | string (date-time) | read-only | Completion date, null while the task is still running |
| `createdAt` | string (date-time) | read-only | Creation date |
| `function` | string | read-only | The operation the task performs |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |

```json
{
  "completedAt": "2024-01-01T12:00:00Z",
  "createdAt": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "status": "cancelled"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}" \
  -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.ReceiveConnectorUpdate
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}",
	enabled = None, # Whether the receive connector is enabled (type: boolean)
	maxMessageSize = None, # The maximum message size to state, in megabytes. (type: integer)
	name = None, # Name of your receive connector, in 255 characters at most (type: string)
	remoteIpRanges = None, # List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (type: array)
	requireTls = None, # All messages received through this connector must be transmitted using TLS (type: boolean)
)

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

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

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

// Request body type: email.exchange.ReceiveConnectorUpdate
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}", array(
	enabled => null, // Whether the receive connector is enabled (type: boolean)
	maxMessageSize => null, // The maximum message size to state, in megabytes. (type: integer)
	name => null, // Name of your receive connector, in 255 characters at most (type: string)
	remoteIpRanges => null, // List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (type: array)
	requireTls => null, // All messages received through this connector must be transmitted using TLS (type: boolean)
));

print_r($result);
?>
```

## Partially update a receive connector

`PATCH /1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/microsoft-exchange/private-exchange/connectors/#patch-email-exchange-organizationname-service-exchangeservice-receiveconnector-id

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

Updates only the given properties and returns the task: the others keep their value, and an omitted `enabled` leaves the status unchanged. At least one property must be given. The default receive connector accepts `enabled` only.

### Parameters

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

### Request body (required)

Type: `email.exchange.ReceiveConnector`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `default` | boolean | read-only | Whether this is the default receive connector owned by Exchange. Read-only: only its status can be changed, and it cannot be deleted |
| `enabled` | boolean |  | Whether the receive connector is enabled |
| `id` | integer | read-only | Id of this receive connector |
| `maxMessageSize` | integer |  | The maximum message size to state, in megabytes. |
| `name` | string |  | Name of your receive connector, in 255 characters at most |
| `remoteIpRanges` | string[] |  | List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most |
| `requireTls` | boolean |  | All messages received through this connector must be transmitted using TLS |

```json
{
  "enabled": true,
  "maxMessageSize": 0,
  "name": "string",
  "remoteIpRanges": [
    "string"
  ],
  "requireTls": true
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `completedAt` | string (date-time) | read-only | Completion date, null while the task is still running |
| `createdAt` | string (date-time) | read-only | Creation date |
| `function` | string | read-only | The operation the task performs |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |

```json
{
  "completedAt": "2024-01-01T12:00:00Z",
  "createdAt": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "status": "cancelled"
}
```

### Example

```bash
curl -X PATCH \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}" \
  -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.ReceiveConnector
result = client.patch("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}",
	enabled = None, # Whether the receive connector is enabled (type: boolean)
	maxMessageSize = None, # The maximum message size to state, in megabytes. (type: integer)
	name = None, # Name of your receive connector, in 255 characters at most (type: string)
	remoteIpRanges = None, # List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (type: array)
	requireTls = None, # All messages received through this connector must be transmitted using TLS (type: boolean)
)

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

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

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

// Request body type: email.exchange.ReceiveConnector
$result = $ovh->patch("/email/exchange/{organizationName}/service/{exchangeService}/receiveConnector/{id}", array(
	enabled => null, // Whether the receive connector is enabled (type: boolean)
	maxMessageSize => null, // The maximum message size to state, in megabytes. (type: integer)
	name => null, // Name of your receive connector, in 255 characters at most (type: string)
	remoteIpRanges => null, // List of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (type: array)
	requireTls => null, // All messages received through this connector must be transmitted using TLS (type: boolean)
));

print_r($result);
?>
```

## List send connectors

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

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

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

List send connectors. Returns the IDs of the send connectors of the service, which relay outgoing emails through a smart host.

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get a send connector

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

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

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

Get a send connector. Returns the smart host, port, authentication mechanism, TLS requirement, size limit, DNS routing and state of the send connector.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | path | integer | yes | Id of this send connector |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean | read-only | Default send connector, which is used to send all e-mails that are not handled by other send connectors that have been custom-created |
| `displayName` | string |  | Name of your send connector |
| `dnsRouting` | boolean |  | Use dns MX record to route emails via this send connector |
| `id` | integer | read-only | Id of this send connector |
| `lastUpdateDate` | string (date-time) | read-only | Last update date |
| `maxSendSize` | integer |  | Maximum send size in MB |
| `port` | integer |  | Port adress that will be used to all e-mails send via this send connector |
| `requireTLS` | boolean |  | All messages sent through this connector will be transmitted using TLS |
| `smartHost` | string |  | Relay domain address that will be used to all e-mails send via this send connector |
| `smartHostAuthMechanism` | email.exchange.smartHostAuthMechanismEnum | read-only | Authentication mechanism to use for authentication with a smart host — one of `basicAuth`, `basicAuthRequireTLS`, `none` |
| `state` | email.exchange.ObjectStateEnum | read-only | Send connector state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Pending task for this send connector |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "default": true,
  "displayName": "string",
  "dnsRouting": true,
  "id": 0,
  "lastUpdateDate": "2024-01-01T12:00:00Z",
  "maxSendSize": 0,
  "port": 0,
  "requireTLS": true,
  "smartHost": "string",
  "smartHostAuthMechanism": "basicAuth",
  "state": "creating",
  "taskPendingId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

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

result = client.get("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}")

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

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

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

$result = $ovh->get("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}");

print_r($result);
?>
```

## Create a send connector

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

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

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

Create a send connector. Creates a send connector that relays emails through a `smartHost`, with an optional port, TLS and authentication, 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 |
| --- | --- | --- | --- |
| `displayName` | string | yes | Name of your send connector |
| `maxSendSize` | integer |  | Maximum message size allowd on that send connector |
| `password` | string (password) |  | Password that will be used to connect to smartHost |
| `port` | integer |  | Port adress that will be used to all e-mails send via this send connector |
| `requireTLS` | boolean |  | All messages sent through this connector will be transmitted using TLS |
| `smartHost` | string | yes | Relay domain address that will be used to all e-mails send via this send connector |
| `smartHostAuthMechanism` | email.exchange.smartHostAuthMechanismEnum |  | Authentication mechanism to use for authentication with a smart host — one of `basicAuth`, `basicAuthRequireTLS`, `none` |
| `user` | string |  | User that will be used to connect to smartHost |

```json
{
  "displayName": "string",
  "maxSendSize": 0,
  "password": "string",
  "port": 0,
  "requireTLS": true,
  "smartHost": "string",
  "smartHostAuthMechanism": "basicAuth",
  "user": "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}/sendConnector" \
  -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}/sendConnector",
	displayName = None, # Name of your send connector (type: string)
	maxSendSize = None, # Maximum message size allowd on that send connector (type: long, nullable)
	password = None, # Password that will be used to connect to smartHost (type: password, nullable)
	port = None, # Port adress that will be used to all e-mails send via this send connector (type: long, nullable)
	requireTLS = None, # All messages sent through this connector will be transmitted using TLS (type: boolean, nullable)
	smartHost = None, # Relay domain address that will be used to all e-mails send via this send connector (type: string)
	smartHostAuthMechanism = None, # Authentication mechanism to use for authentication with a smart host (type: email.exchange.smartHostAuthMechanismEnum, nullable)
	user = None, # User that will be used to connect to smartHost (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

$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector", array(
	displayName => null, // Name of your send connector (type: string)
	maxSendSize => null, // Maximum message size allowd on that send connector (type: long, nullable)
	password => null, // Password that will be used to connect to smartHost (type: password, nullable)
	port => null, // Port adress that will be used to all e-mails send via this send connector (type: long, nullable)
	requireTLS => null, // All messages sent through this connector will be transmitted using TLS (type: boolean, nullable)
	smartHost => null, // Relay domain address that will be used to all e-mails send via this send connector (type: string)
	smartHostAuthMechanism => null, // Authentication mechanism to use for authentication with a smart host (type: email.exchange.smartHostAuthMechanismEnum, nullable)
	user => null, // User that will be used to connect to smartHost (type: string, nullable)
));

print_r($result);
?>
```

## Delete a send connector

`DELETE /1.0/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}`

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

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

Delete a send connector. Deletes the send connector, so that outgoing emails no longer go through its smart host, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | path | integer | yes | Id of this send connector |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `finishDate` | string (date-time) | read-only | Completion date |
| `function` | email.exchange.TaskFunctionEnum | read-only | Function name — one of `activateSharepoint`, `addAccount`, `addAccountArchive`, `addAccountImpersonation`, `addActiveSyncMailNotification`, `addAlias`, `addDistributionGroup`, `addDistributionGroupManager`, `addDistributionGroupMember`, `addDistributionGroupSendAs`, `addDistributionGroupSendOnBehalfTo`, `addDomain`, … |
| `id` | integer | read-only | Task id |
| `status` | email.exchange.TaskStatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Creation date |

```json
{
  "finishDate": "2024-01-01T12:00:00Z",
  "function": "activateSharepoint",
  "id": 0,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

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

result = client.delete("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}")

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

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

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

$result = $ovh->delete("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}");

print_r($result);
?>
```

## Update a send connector

`PUT /1.0/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}`

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

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

Update a send connector. Updates the name, smart host, port, maximum send size, TLS requirement and DNS routing of the send connector.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | path | integer | yes | Id of this send connector |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Request body (required)

Type: `email.exchange.sendConnector`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean | read-only | Default send connector, which is used to send all e-mails that are not handled by other send connectors that have been custom-created |
| `displayName` | string |  | Name of your send connector |
| `dnsRouting` | boolean |  | Use dns MX record to route emails via this send connector |
| `id` | integer | read-only | Id of this send connector |
| `lastUpdateDate` | string (date-time) | read-only | Last update date |
| `maxSendSize` | integer |  | Maximum send size in MB |
| `port` | integer |  | Port adress that will be used to all e-mails send via this send connector |
| `requireTLS` | boolean |  | All messages sent through this connector will be transmitted using TLS |
| `smartHost` | string |  | Relay domain address that will be used to all e-mails send via this send connector |
| `smartHostAuthMechanism` | email.exchange.smartHostAuthMechanismEnum | read-only | Authentication mechanism to use for authentication with a smart host — one of `basicAuth`, `basicAuthRequireTLS`, `none` |
| `state` | email.exchange.ObjectStateEnum | read-only | Send connector state — one of `creating`, `deleting`, `internalMigration`, `ok`, `reopening`, `suspended`, `suspending` |
| `taskPendingId` | integer | read-only | Pending task for this send connector |

```json
{
  "displayName": "string",
  "dnsRouting": true,
  "maxSendSize": 0,
  "port": 0,
  "requireTLS": true,
  "smartHost": "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}/sendConnector/{id}" \
  -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.sendConnector
result = client.put("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}",
	displayName = None, # Name of your send connector (type: string)
	dnsRouting = None, # Use dns MX record to route emails via this send connector (type: boolean)
	maxSendSize = None, # Maximum send size in MB (type: integer)
	port = None, # Port adress that will be used to all e-mails send via this send connector (type: integer)
	requireTLS = None, # All messages sent through this connector will be transmitted using TLS (type: boolean)
	smartHost = None, # Relay domain address that will be used to all e-mails send via this send connector (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.sendConnector
$result = $ovh->put("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}", array(
	displayName => null, // Name of your send connector (type: string)
	dnsRouting => null, // Use dns MX record to route emails via this send connector (type: boolean)
	maxSendSize => null, // Maximum send size in MB (type: integer)
	port => null, // Port adress that will be used to all e-mails send via this send connector (type: integer)
	requireTLS => null, // All messages sent through this connector will be transmitted using TLS (type: boolean)
	smartHost => null, // Relay domain address that will be used to all e-mails send via this send connector (type: string, nullable)
));

print_r($result);
?>
```

## Change send connector authentication

`POST /1.0/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}/changeAuthentication`

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

**Status:** Stable production version  
**IAM actions:** `emailExchange:apiovh:service/sendConnector/changeAuthentication`

Change send connector authentication. Sets the smart host authentication mechanism, user and password of the send connector, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `exchangeService` | path | string | yes | The internal name of your exchange service |
| `id` | path | integer | yes | Id of this send connector |
| `organizationName` | path | string | yes | The internal name of your exchange organization |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) |  | New password |
| `smartHostAuthMechanism` | email.exchange.smartHostAuthMechanismEnum |  | The SmartHostAuthMechanism parameter specifies the smart host authentication mechanism to use for authentication with a remote server — one of `basicAuth`, `basicAuthRequireTLS`, `none` |
| `user` | string |  | User that will be used to connect to smartHost |

```json
{
  "password": "string",
  "smartHostAuthMechanism": "basicAuth",
  "user": "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}/sendConnector/{id}/changeAuthentication" \
  -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}/sendConnector/{id}/changeAuthentication",
	password = None, # New password (type: password, nullable)
	smartHostAuthMechanism = None, # The SmartHostAuthMechanism parameter specifies the smart host authentication mechanism to use for authentication with a remote server (type: email.exchange.smartHostAuthMechanismEnum, nullable)
	user = None, # User that will be used to connect to smartHost (type: string, nullable)
)

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

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

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

// Request body type: string
$result = $ovh->post("/email/exchange/{organizationName}/service/{exchangeService}/sendConnector/{id}/changeAuthentication", array(
	password => null, // New password (type: password, nullable)
	smartHostAuthMechanism => null, // The SmartHostAuthMechanism parameter specifies the smart host authentication mechanism to use for authentication with a remote server (type: email.exchange.smartHostAuthMechanismEnum, nullable)
	user => null, // User that will be used to connect to smartHost (type: string, nullable)
));

print_r($result);
?>
```
