# Web Cloud › Internet › Pack › Email 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

> 20 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/internet/pack/email/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/internet/pack/email.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/internet/pack/email.json?format=openapi3

## Operations

- `GET /pack/xdsl/{packName}/domain/options/tlds` — List the TLDs for a domain order
- `GET /pack/xdsl/{packName}/domain/services` — List the domain services of an xDSL pack
- `POST /pack/xdsl/{packName}/domain/services` — Create a domain service in an xDSL pack
- `GET /pack/xdsl/{packName}/emailPro/options/domains` — List the domains for an Email Pro activation
- `GET /pack/xdsl/{packName}/emailPro/options/isEmailAvailable` — Get whether an address is available for Email Pro
- `GET /pack/xdsl/{packName}/emailPro/services` — List the Email Pro services of an xDSL pack
- `POST /pack/xdsl/{packName}/emailPro/services` — Create an Email Pro service in an xDSL pack
- `GET /pack/xdsl/{packName}/exchangeAccount/services` — List the Exchange 2013 account services of an xDSL pack
- `GET /pack/xdsl/{packName}/exchangeAccount/services/{domain}` — Get an Exchange 2013 account service of an xDSL pack
- `GET /pack/xdsl/{packName}/exchangeIndividual/options/domains` — List the domains for an Exchange activation
- `GET /pack/xdsl/{packName}/exchangeIndividual/options/isEmailAvailable` — Get whether an address is available for Exchange
- `GET /pack/xdsl/{packName}/exchangeOrganization/services` — List the Exchange 2013 organization services of an xDSL pack
- `GET /pack/xdsl/{packName}/hostedEmail/options/domains` — List the domains for a hosted email activation
- `GET /pack/xdsl/{packName}/hostedEmail/services` — List the hosted email services of an xDSL pack
- `POST /pack/xdsl/{packName}/hostedEmail/services` — Create a hosted email service in an xDSL pack
- `GET /pack/xdsl/{packName}/hostedEmail/services/{domain}` — Get a hosted email service of an xDSL pack
- `DELETE /pack/xdsl/{packName}/hostedEmail/services/{domain}` — Delete a hosted email service of an xDSL pack
- `GET /pack/xdsl/{packName}/hostedEmail/services/{domain}/account` — Get the account of a hosted email service
- `POST /pack/xdsl/{packName}/hostedEmail/services/{domain}/changePassword` — Change the password of a hosted email service
- `GET /pack/xdsl/{packName}/hostedEmail/services/{domain}/configuration` — Get the configuration of a hosted email service

## List the TLDs for a domain order

`GET /1.0/pack/xdsl/{packName}/domain/options/tlds`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-domain-options-tlds

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:domain/options/tlds/get`

List the TLDs for a domain order. Returns the top-level domains that can be ordered as a domain service of the xDSL pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/domain/options/tlds" \
  -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("/pack/xdsl/{packName}/domain/options/tlds")

# 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("/pack/xdsl/{packName}/domain/options/tlds");

print_r($result);
?>
```

## List the domain services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/domain/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-domain-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:domain/services/get`

List the domain services of an xDSL pack. Returns the domain names ordered or transferred as a service of the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/domain/services" \
  -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("/pack/xdsl/{packName}/domain/services")

# 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("/pack/xdsl/{packName}/domain/services");

print_r($result);
?>
```

## Create a domain service in an xDSL pack

`POST /1.0/pack/xdsl/{packName}/domain/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#post-pack-xdsl-packname-domain-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:domain/services/create`

Create a domain service in an xDSL pack. Orders, transfers or triggers the given action on a domain with its TLD, using the auth code for a transfer. Returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | pack.xdsl.DomainActionEnum | yes | Domain action — one of `create`, `trade`, `transfer` |
| `authInfo` | string |  | Needed for transfer from another registrar |
| `domain` | string | yes | Domain name |
| `tld` | string | yes | TLD of the domain |

```json
{
  "action": "create",
  "authInfo": "string",
  "domain": "string",
  "tld": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | string | read-only |  |
| `id` | integer | read-only |  |
| `status` | pack.xdsl.TaskStatusEnum | read-only | Status of a task. — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `updateDate` | string (date-time) | read-only |  |

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/domain/services" \
  -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("/pack/xdsl/{packName}/domain/services",
	action = None, # Domain action (type: pack.xdsl.DomainActionEnum)
	authInfo = None, # Needed for transfer from another registrar (type: string, nullable)
	domain = None, # Domain name (type: string)
	tld = None, # TLD of the domain (type: string)
)

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

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

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

$result = $ovh->post("/pack/xdsl/{packName}/domain/services", array(
	action => null, // Domain action (type: pack.xdsl.DomainActionEnum)
	authInfo => null, // Needed for transfer from another registrar (type: string, nullable)
	domain => null, // Domain name (type: string)
	tld => null, // TLD of the domain (type: string)
));

print_r($result);
?>
```

## List the domains for an Email Pro activation

`GET /1.0/pack/xdsl/{packName}/emailPro/options/domains`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-emailpro-options-domains

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:emailPro/options/domains/get`

List the domains for an Email Pro activation. Returns the domains on which an Email Pro service of the xDSL pack can be activated.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/emailPro/options/domains" \
  -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("/pack/xdsl/{packName}/emailPro/options/domains")

# 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("/pack/xdsl/{packName}/emailPro/options/domains");

print_r($result);
?>
```

## Get whether an address is available for Email Pro

`GET /1.0/pack/xdsl/{packName}/emailPro/options/isEmailAvailable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-emailpro-options-isemailavailable

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:emailPro/options/isEmailAvailable/get`

Get whether an address is available for Email Pro. Returns whether the given email address can be used to activate an Email Pro service of the xDSL pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `email` | query | string | yes | The email address |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

```json
true
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/emailPro/options/isEmailAvailable" \
  -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("/pack/xdsl/{packName}/emailPro/options/isEmailAvailable")

# 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("/pack/xdsl/{packName}/emailPro/options/isEmailAvailable");

print_r($result);
?>
```

## List the Email Pro services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/emailPro/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-emailpro-services

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

List the Email Pro services of an xDSL pack. Returns the domains of the Email Pro services activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/emailPro/services" \
  -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("/pack/xdsl/{packName}/emailPro/services")

# 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("/pack/xdsl/{packName}/emailPro/services");

print_r($result);
?>
```

## Create an Email Pro service in an xDSL pack

`POST /1.0/pack/xdsl/{packName}/emailPro/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#post-pack-xdsl-packname-emailpro-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:emailPro/services/create`

Create an Email Pro service in an xDSL pack. Activates an Email Pro account from an email address and a password. Returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | yes | The email address |
| `password` | string (password) | yes | The password |

```json
{
  "email": "string",
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | string | read-only |  |
| `id` | integer | read-only |  |
| `status` | pack.xdsl.TaskStatusEnum | read-only | Status of a task. — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `updateDate` | string (date-time) | read-only |  |

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/emailPro/services" \
  -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("/pack/xdsl/{packName}/emailPro/services",
	email = None, # The email address (type: string)
	password = None, # The password (type: password)
)

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

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

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

$result = $ovh->post("/pack/xdsl/{packName}/emailPro/services", array(
	email => null, // The email address (type: string)
	password => null, // The password (type: password)
));

print_r($result);
?>
```

## List the Exchange 2013 account services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/exchangeAccount/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-exchangeaccount-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:exchangeAccount/services/get`

List the Exchange 2013 account services of an xDSL pack. Returns the domains of the Exchange 2013 accounts activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/exchangeAccount/services" \
  -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("/pack/xdsl/{packName}/exchangeAccount/services")

# 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("/pack/xdsl/{packName}/exchangeAccount/services");

print_r($result);
?>
```

## Get an Exchange 2013 account service of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/exchangeAccount/services/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-exchangeaccount-services-domain

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:exchangeAccount/services/get`

Get an Exchange 2013 account service of an xDSL pack. Returns the domain, organization and Exchange service of an account activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.ExchangeAccountService | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | read-only |  |
| `exchangeService` | string | read-only |  |
| `organizationName` | string | read-only |  |

```json
{
  "domain": "string",
  "exchangeService": "string",
  "organizationName": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/exchangeAccount/services/{domain}" \
  -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("/pack/xdsl/{packName}/exchangeAccount/services/{domain}")

# 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("/pack/xdsl/{packName}/exchangeAccount/services/{domain}");

print_r($result);
?>
```

## List the domains for an Exchange activation

`GET /1.0/pack/xdsl/{packName}/exchangeIndividual/options/domains`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-exchangeindividual-options-domains

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:exchangeIndividual/options/domains/get`

List the domains for an Exchange activation. Returns the domains on which an Exchange service of the xDSL pack can be activated.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/exchangeIndividual/options/domains" \
  -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("/pack/xdsl/{packName}/exchangeIndividual/options/domains")

# 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("/pack/xdsl/{packName}/exchangeIndividual/options/domains");

print_r($result);
?>
```

## Get whether an address is available for Exchange

`GET /1.0/pack/xdsl/{packName}/exchangeIndividual/options/isEmailAvailable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-exchangeindividual-options-isemailavailable

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:exchangeIndividual/options/isEmailAvailable/get`

Get whether an address is available for Exchange. Returns whether the given email address can be used to activate an Exchange service of the xDSL pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `email` | query | string | yes | Email |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

```json
true
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/exchangeIndividual/options/isEmailAvailable" \
  -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("/pack/xdsl/{packName}/exchangeIndividual/options/isEmailAvailable")

# 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("/pack/xdsl/{packName}/exchangeIndividual/options/isEmailAvailable");

print_r($result);
?>
```

## List the Exchange 2013 organization services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/exchangeOrganization/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-exchangeorganization-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:exchangeOrganization/services/get`

List the Exchange 2013 organization services of an xDSL pack. Returns the domains of the Exchange 2013 organizations of the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/exchangeOrganization/services" \
  -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("/pack/xdsl/{packName}/exchangeOrganization/services")

# 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("/pack/xdsl/{packName}/exchangeOrganization/services");

print_r($result);
?>
```

## List the domains for a hosted email activation

`GET /1.0/pack/xdsl/{packName}/hostedEmail/options/domains`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-hostedemail-options-domains

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/options/domains/get`

List the domains for a hosted email activation. Returns the domains on which a hosted email service of the xDSL pack can be activated.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/options/domains" \
  -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("/pack/xdsl/{packName}/hostedEmail/options/domains")

# 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("/pack/xdsl/{packName}/hostedEmail/options/domains");

print_r($result);
?>
```

## List the hosted email services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/hostedEmail/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-hostedemail-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/get`

List the hosted email services of an xDSL pack. Returns the domains of the hosted email services activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services" \
  -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("/pack/xdsl/{packName}/hostedEmail/services")

# 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("/pack/xdsl/{packName}/hostedEmail/services");

print_r($result);
?>
```

## Create a hosted email service in an xDSL pack

`POST /1.0/pack/xdsl/{packName}/hostedEmail/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#post-pack-xdsl-packname-hostedemail-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/create`

Create a hosted email service in an xDSL pack. Activates a hosted email account from an email address and a password. Returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | yes | Email address |
| `password` | string (password) | yes | Password |

```json
{
  "email": "string",
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | string | read-only |  |
| `id` | integer | read-only |  |
| `status` | pack.xdsl.TaskStatusEnum | read-only | Status of a task. — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `updateDate` | string (date-time) | read-only |  |

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services" \
  -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("/pack/xdsl/{packName}/hostedEmail/services",
	email = None, # Email address (type: string)
	password = None, # Password (type: password)
)

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

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

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

$result = $ovh->post("/pack/xdsl/{packName}/hostedEmail/services", array(
	email => null, // Email address (type: string)
	password => null, // Password (type: password)
));

print_r($result);
?>
```

## Get a hosted email service of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-hostedemail-services-domain

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/get`

Get a hosted email service of an xDSL pack. Returns the domain of a hosted email service activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.HostedEmailService | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | read-only |  |

```json
{
  "domain": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}" \
  -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("/pack/xdsl/{packName}/hostedEmail/services/{domain}")

# 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("/pack/xdsl/{packName}/hostedEmail/services/{domain}");

print_r($result);
?>
```

## Delete a hosted email service of an xDSL pack

`DELETE /1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#delete-pack-xdsl-packname-hostedemail-services-domain

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/delete`

Delete a hosted email service of an xDSL pack. Deletes the hosted email account and its mailbox from the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}" \
  -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("/pack/xdsl/{packName}/hostedEmail/services/{domain}")

# 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("/pack/xdsl/{packName}/hostedEmail/services/{domain}");

print_r($result);
?>
```

## Get the account of a hosted email service

`GET /1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}/account`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-hostedemail-services-domain-account

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/account/get`

Get the account of a hosted email service. Returns the primary address, offer, quota, mailbox size and the anti-spam and anti-virus status of the account.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.HostedEmail.Account | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `antispamEnabled` | boolean |  | Is the anti-spam enabled ? |
| `antivirusEnabled` | boolean |  | Is the anti-virus enabled ? |
| `offer` | pack.xdsl.HostedEmail.AccountOfferEnum |  | Offer name — one of `individual` |
| `primaryEmailAddress` | string |  | Primary email address |
| `quota` | complexType.UnitAndValue_long |  | Quota of the mailbox |
| `quota.unit` | string |  |  |
| `quota.value` | integer |  |  |
| `size` | complexType.UnitAndValue_long |  | Size of the maibox |
| `size.unit` | string |  |  |
| `size.value` | integer |  |  |

```json
{
  "antispamEnabled": true,
  "antivirusEnabled": true,
  "offer": "individual",
  "primaryEmailAddress": "string",
  "quota": {
    "unit": "string",
    "value": 0
  },
  "size": {
    "unit": "string",
    "value": 0
  }
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}/account" \
  -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("/pack/xdsl/{packName}/hostedEmail/services/{domain}/account")

# 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("/pack/xdsl/{packName}/hostedEmail/services/{domain}/account");

print_r($result);
?>
```

## Change the password of a hosted email service

`POST /1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#post-pack-xdsl-packname-hostedemail-services-domain-changepassword

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/changePassword`

Change the password of a hosted email service. Sets a new password for the hosted email account of the xDSL pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | New password |

```json
{
  "password": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}/changePassword" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

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

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

# Request body type: password
result = client.post("/pack/xdsl/{packName}/hostedEmail/services/{domain}/changePassword",
	password = None, # New password (type: password)
)

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

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

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

// Request body type: password
$result = $ovh->post("/pack/xdsl/{packName}/hostedEmail/services/{domain}/changePassword", array(
	password => null, // New password (type: password)
));

print_r($result);
?>
```

## Get the configuration of a hosted email service

`GET /1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}/configuration`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/email/#get-pack-xdsl-packname-hostedemail-services-domain-configuration

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:hostedEmail/services/configuration/get`

Get the configuration of a hosted email service. Returns the webmail URL, the status and the configuration of each service of the hosted email account.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.HostedEmail.Configuration | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `services` | pack.xdsl.HostedEmail.ConfigurationService[] |  | List of services configurations |
| `services[].host` | string |  | Service host |
| `services[].ip` | ip |  | Service IP |
| `services[].port` | integer |  | Service port |
| `services[].service` | pack.xdsl.HostedEmail.ConfigurationServiceEnum |  | Service name — one of `imap`, `imaps`, `pop3`, `pop3s`, `smtp`, `smtps`, `submission` |
| `services[].smtpAuth` | boolean |  | Does the service use SMTP AUTH ? |
| `services[].startTls` | boolean |  | Does the service use STARTTLS ? |
| `status` | pack.xdsl.HostedEmail.ConfigurationStatusEnum |  | Status — one of `active`, `suspended` |
| `webmailUrl` | string |  | Webmail url |

```json
{
  "services": [
    {
      "host": "string",
      "ip": "192.0.2.0",
      "port": 0,
      "service": "imap",
      "smtpAuth": true,
      "startTls": true
    }
  ],
  "status": "active",
  "webmailUrl": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/hostedEmail/services/{domain}/configuration" \
  -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("/pack/xdsl/{packName}/hostedEmail/services/{domain}/configuration")

# 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("/pack/xdsl/{packName}/hostedEmail/services/{domain}/configuration");

print_r($result);
?>
```
