# Web Cloud › Email and Collaborative Solutions › MX Plan › Zimbra platform › Mailing Lists 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

> 16 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/mx-plan/zimbra-platform/mailing-lists/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists.json?format=openapi3

## Operations

- `GET /email/domain/mailingListLimits` — Get mailing list limits
- `GET /email/domain/{domain}/mailingList` — List mailing lists
- `GET /email/domain/{domain}/mailingList/{name}` — Get a mailing list
- `POST /email/domain/{domain}/mailingList` — Create a mailing list
- `DELETE /email/domain/{domain}/mailingList/{name}` — Delete a mailing list
- `PUT /email/domain/{domain}/mailingList/{name}` — Update a mailing list
- `POST /email/domain/{domain}/mailingList/{name}/changeOptions` — Change mailing list options
- `GET /email/domain/{domain}/mailingList/{name}/moderator` — List moderators
- `GET /email/domain/{domain}/mailingList/{name}/moderator/{email}` — Get a moderator
- `POST /email/domain/{domain}/mailingList/{name}/moderator` — Add a moderator
- `DELETE /email/domain/{domain}/mailingList/{name}/moderator/{email}` — Remove a moderator
- `POST /email/domain/{domain}/mailingList/{name}/sendListByEmail` — Send member lists by email
- `GET /email/domain/{domain}/mailingList/{name}/subscriber` — List subscribers
- `GET /email/domain/{domain}/mailingList/{name}/subscriber/{email}` — Get a subscriber
- `POST /email/domain/{domain}/mailingList/{name}/subscriber` — Add a subscriber
- `DELETE /email/domain/{domain}/mailingList/{name}/subscriber/{email}` — Remove a subscriber

## Get mailing list limits

`GET /1.0/email/domain/mailingListLimits`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-mailinglistlimits

**Status:** Stable production version  
**Authentication:** none (public operation)

Get mailing list limits. Returns the maximum number of subscribers of a mailing list, with or without message moderation (`moderatorMessage`).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `moderatorMessage` | query | boolean | yes | If true, messages are moderate |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.DomainMlLimits | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `subscribers` | integer |  | Maximum number of subscribers |

```json
{
  "subscribers": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/domain/mailingListLimits" \
  -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/domain/mailingListLimits")

# 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/domain/mailingListLimits");

print_r($result);
?>
```

## List mailing lists

`GET /1.0/email/domain/{domain}/mailingList`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-domain-mailinglist

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/get`

List mailing lists. Returns the names of the mailing lists of the domain. Filter them by `name` to look for a given list.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | query | string |  | Mailing list name |

### Responses

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

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

### Example

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

# 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/domain/{domain}/mailingList");

print_r($result);
?>
```

## Get a mailing list

`GET /1.0/email/domain/{domain}/mailingList/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-domain-mailinglist-name

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/get`

Get a mailing list. Returns the owner email, reply-to address, language, moderation options and number of subscribers of the mailing list.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.MailingList | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Id of mailing list |
| `language` | domain.DomainMlLanguageEnum |  | Language of mailing list — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |
| `name` | string | read-only | Name of mailing list |
| `nbSubscribers` | integer | read-only | Subscribers number of mailing list |
| `nbSubscribersUpdateDate` | string (date-time) | read-only | Last update subscribers |
| `options` | domain.DomainMlOptionsStruct | read-only | Options of mailing list |
| `options.moderatorMessage` | boolean |  | If true, messages are moderate |
| `options.subscribeByModerator` | boolean |  | If true, enabled moderation for subscribe |
| `options.usersPostOnly` | boolean |  | If true, just user can post |
| `ownerEmail` | string |  | Owner email of mailing list |
| `replyTo` | string |  | Email to reply of mailing list |

```json
{
  "id": 0,
  "language": "de",
  "name": "string",
  "nbSubscribers": 0,
  "nbSubscribersUpdateDate": "2024-01-01T12:00:00Z",
  "options": {
    "moderatorMessage": true,
    "subscribeByModerator": true,
    "usersPostOnly": true
  },
  "ownerEmail": "string",
  "replyTo": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.get("/email/domain/{domain}/mailingList/{name}")

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

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

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

$result = $ovh->get("/email/domain/{domain}/mailingList/{name}");

print_r($result);
?>
```

## Create a mailing list

`POST /1.0/email/domain/{domain}/mailingList`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#post-email-domain-domain-mailinglist

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/create`

Create a mailing list. Creates a mailing list with a name, an owner email, a language and moderation options, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `language` | domain.DomainMlLanguageEnum | yes | Language of mailing list — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |
| `name` | string | yes | Mailing list name |
| `options` | domain.DomainMlOptionsStruct | yes | Options of mailing list |
| `options.moderatorMessage` | boolean |  | If true, messages are moderate |
| `options.subscribeByModerator` | boolean |  | If true, enabled moderation for subscribe |
| `options.usersPostOnly` | boolean |  | If true, just user can post |
| `ownerEmail` | string | yes | Owner Email |
| `replyTo` | string |  | Email to reply of mailing list |

```json
{
  "language": "de",
  "name": "string",
  "options": {
    "moderatorMessage": true,
    "subscribeByModerator": true,
    "usersPostOnly": true
  },
  "ownerEmail": "string",
  "replyTo": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList" \
  -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/domain/{domain}/mailingList",
	language = None, # Language of mailing list (type: domain.DomainMlLanguageEnum)
	name = None, # Mailing list name (type: string)
	options = None, # Options of mailing list (type: domain.DomainMlOptionsStruct)
	ownerEmail = None, # Owner Email (type: string)
	replyTo = None, # Email to reply of mailing list (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/domain/{domain}/mailingList", array(
	language => null, // Language of mailing list (type: domain.DomainMlLanguageEnum)
	name => null, // Mailing list name (type: string)
	options => null, // Options of mailing list (type: domain.DomainMlOptionsStruct)
	ownerEmail => null, // Owner Email (type: string)
	replyTo => null, // Email to reply of mailing list (type: string, nullable)
));

print_r($result);
?>
```

## Delete a mailing list

`DELETE /1.0/email/domain/{domain}/mailingList/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#delete-email-domain-domain-mailinglist-name

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/delete`

Delete a mailing list. Deletes the mailing list of the domain with its subscribers and moderators, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.delete("/email/domain/{domain}/mailingList/{name}")

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

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

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

$result = $ovh->delete("/email/domain/{domain}/mailingList/{name}");

print_r($result);
?>
```

## Update a mailing list

`PUT /1.0/email/domain/{domain}/mailingList/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#put-email-domain-domain-mailinglist-name

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/edit`

Update a mailing list. Updates the owner email, the reply-to address or the language of the mailing list.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Request body (required)

Type: `email.domain.MailingList`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Id of mailing list |
| `language` | domain.DomainMlLanguageEnum |  | Language of mailing list — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |
| `name` | string | read-only | Name of mailing list |
| `nbSubscribers` | integer | read-only | Subscribers number of mailing list |
| `nbSubscribersUpdateDate` | string (date-time) | read-only | Last update subscribers |
| `options` | domain.DomainMlOptionsStruct | read-only | Options of mailing list |
| `options.moderatorMessage` | boolean |  | If true, messages are moderate |
| `options.subscribeByModerator` | boolean |  | If true, enabled moderation for subscribe |
| `options.usersPostOnly` | boolean |  | If true, just user can post |
| `ownerEmail` | string |  | Owner email of mailing list |
| `replyTo` | string |  | Email to reply of mailing list |

```json
{
  "language": "de",
  "ownerEmail": "string",
  "replyTo": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}" \
  -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.domain.MailingList
result = client.put("/email/domain/{domain}/mailingList/{name}",
	language = None, # Language of mailing list (type: domain.DomainMlLanguageEnum, nullable)
	ownerEmail = None, # Owner email of mailing list (type: string)
	replyTo = None, # Email to reply of mailing list (type: string)
)

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

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

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

// Request body type: email.domain.MailingList
$result = $ovh->put("/email/domain/{domain}/mailingList/{name}", array(
	language => null, // Language of mailing list (type: domain.DomainMlLanguageEnum, nullable)
	ownerEmail => null, // Owner email of mailing list (type: string)
	replyTo => null, // Email to reply of mailing list (type: string)
));

print_r($result);
?>
```

## Change mailing list options

`POST /1.0/email/domain/{domain}/mailingList/{name}/changeOptions`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#post-email-domain-domain-mailinglist-name-changeoptions

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/changeOptions`

Change mailing list options. Sets message moderation (`moderatorMessage`), subscription moderation (`subscribeByModerator`) and `usersPostOnly`, which lets only moderators post, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `options` | domain.DomainMlOptionsStruct | yes | Options of mailing list |
| `options.moderatorMessage` | boolean |  | If true, messages are moderate |
| `options.subscribeByModerator` | boolean |  | If true, enabled moderation for subscribe |
| `options.usersPostOnly` | boolean |  | If true, just user can post |

```json
{
  "options": {
    "moderatorMessage": true,
    "subscribeByModerator": true,
    "usersPostOnly": true
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/changeOptions" \
  -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: domain.DomainMlOptionsStruct
result = client.post("/email/domain/{domain}/mailingList/{name}/changeOptions",
	options = None, # Options of mailing list (type: domain.DomainMlOptionsStruct)
)

# 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: domain.DomainMlOptionsStruct
$result = $ovh->post("/email/domain/{domain}/mailingList/{name}/changeOptions", array(
	options => null, // Options of mailing list (type: domain.DomainMlOptionsStruct)
));

print_r($result);
?>
```

## List moderators

`GET /1.0/email/domain/{domain}/mailingList/{name}/moderator`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-domain-mailinglist-name-moderator

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/moderator/get`

List moderators. Returns the email addresses of the moderators of the mailing list. Filter them by `email`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `email` | query | string |  | Moderator email |
| `name` | path | string | yes | Name of mailing list |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/moderator" \
  -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/domain/{domain}/mailingList/{name}/moderator")

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

print_r($result);
?>
```

## Get a moderator

`GET /1.0/email/domain/{domain}/mailingList/{name}/moderator/{email}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-domain-mailinglist-name-moderator-email

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/moderator/get`

Get a moderator. Returns the email address of the moderator and the mailing list and domain it moderates.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `email` | path | string | yes |  |
| `name` | path | string | yes | Name of mailing list |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.Moderator | successful operation |

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

```json
{
  "domain": "string",
  "email": "string",
  "mailinglist": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/moderator/{email}" \
  -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/domain/{domain}/mailingList/{name}/moderator/{email}")

# 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/domain/{domain}/mailingList/{name}/moderator/{email}");

print_r($result);
?>
```

## Add a moderator

`POST /1.0/email/domain/{domain}/mailingList/{name}/moderator`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#post-email-domain-domain-mailinglist-name-moderator

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/moderator/create`

Add a moderator. Makes the `email` address a moderator of the mailing list, who approves the messages, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | yes | Email of moderator |

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/moderator" \
  -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/domain/{domain}/mailingList/{name}/moderator",
	email = None, # Email of moderator (type: string)
)

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

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

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

// Request body type: string
$result = $ovh->post("/email/domain/{domain}/mailingList/{name}/moderator", array(
	email => null, // Email of moderator (type: string)
));

print_r($result);
?>
```

## Remove a moderator

`DELETE /1.0/email/domain/{domain}/mailingList/{name}/moderator/{email}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#delete-email-domain-domain-mailinglist-name-moderator-email

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/moderator/delete`

Remove a moderator. Withdraws the moderator role from the email address on the mailing list, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `email` | path | string | yes |  |
| `name` | path | string | yes | Name of mailing list |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/moderator/{email}" \
  -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/domain/{domain}/mailingList/{name}/moderator/{email}")

# 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/domain/{domain}/mailingList/{name}/moderator/{email}");

print_r($result);
?>
```

## Send member lists by email

`POST /1.0/email/domain/{domain}/mailingList/{name}/sendListByEmail`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#post-email-domain-domain-mailinglist-name-sendlistbyemail

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/sendListByEmail`

Send member lists by email. Sends the lists of moderators and subscribers of the mailing list to the `email` address, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | yes | Email destination |

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/sendListByEmail" \
  -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/domain/{domain}/mailingList/{name}/sendListByEmail",
	email = None, # Email destination (type: string)
)

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

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

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

// Request body type: string
$result = $ovh->post("/email/domain/{domain}/mailingList/{name}/sendListByEmail", array(
	email => null, // Email destination (type: string)
));

print_r($result);
?>
```

## List subscribers

`GET /1.0/email/domain/{domain}/mailingList/{name}/subscriber`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-domain-mailinglist-name-subscriber

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/subscriber/get`

List subscribers. Returns the email addresses of the subscribers of the mailing list. Filter them by `email`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `email` | query | string |  | Subscriber email |
| `name` | path | string | yes | Name of mailing list |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/subscriber" \
  -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/domain/{domain}/mailingList/{name}/subscriber")

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

print_r($result);
?>
```

## Get a subscriber

`GET /1.0/email/domain/{domain}/mailingList/{name}/subscriber/{email}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#get-email-domain-domain-mailinglist-name-subscriber-email

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/subscriber/get`

Get a subscriber. Returns the email address of the subscriber and the mailing list and domain it is subscribed to.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `email` | path | string | yes |  |
| `name` | path | string | yes | Name of mailing list |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.Subscriber | successful operation |

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

```json
{
  "domain": "string",
  "email": "string",
  "mailinglist": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/subscriber/{email}" \
  -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/domain/{domain}/mailingList/{name}/subscriber/{email}")

# 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/domain/{domain}/mailingList/{name}/subscriber/{email}");

print_r($result);
?>
```

## Add a subscriber

`POST /1.0/email/domain/{domain}/mailingList/{name}/subscriber`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#post-email-domain-domain-mailinglist-name-subscriber

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/subscriber/create`

Add a subscriber. Subscribes the `email` address to the mailing list, so that it receives its messages, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `name` | path | string | yes | Name of mailing list |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | yes | Email of subscriber |

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/subscriber" \
  -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/domain/{domain}/mailingList/{name}/subscriber",
	email = None, # Email of subscriber (type: string)
)

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

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

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

// Request body type: string
$result = $ovh->post("/email/domain/{domain}/mailingList/{name}/subscriber", array(
	email => null, // Email of subscriber (type: string)
));

print_r($result);
?>
```

## Remove a subscriber

`DELETE /1.0/email/domain/{domain}/mailingList/{name}/subscriber/{email}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/mx-plan/zimbra-platform/mailing-lists/#delete-email-domain-domain-mailinglist-name-subscriber-email

**Status:** Stable production version  
**IAM actions:** `emailDomain:apiovh:mailingList/subscriber/delete`

Remove a subscriber. Unsubscribes the email address from the mailing list, which it no longer receives, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Name of your domain name |
| `email` | path | string | yes |  |
| `name` | path | string | yes | Name of mailing list |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | email.domain.TaskMl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string | read-only |  |
| `action` | string | read-only |  |
| `date` | string (date-time) | read-only |  |
| `domain` | string | read-only |  |
| `id` | integer | read-only |  |
| `language` | domain.DomainMlLanguageEnum | read-only | Possible values for mailing list language — one of `de`, `en`, `es`, `fr`, `it`, `nl`, `pl`, `pt` |

```json
{
  "account": "string",
  "action": "string",
  "date": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0,
  "language": "de"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/email/domain/{domain}/mailingList/{name}/subscriber/{email}" \
  -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/domain/{domain}/mailingList/{name}/subscriber/{email}")

# 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/domain/{domain}/mailingList/{name}/subscriber/{email}");

print_r($result);
?>
```
