# Add recipients to a mailing list

> Put a few addresses on one mailing list of a web hosting package - the others stay.

- Effect: Write - Changes the account. Agents ask first.
- Idempotent: yes
- Stability: beta
- MCP tool: `manitu_webhosting_mail_mailinglist_recipient_add` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/webhosting/mail/mailinglist/recipient/add`
- Needs: `service_webhosting`
- Page: /reference/webhosting/mail/mailinglist/recipient/add/

**Changes the account. Agents say what will happen and wait for an explicit yes before calling it.**

## MCP tool

`manitu_webhosting_mail_mailinglist_recipient_add`

### Description for the model

Adds recipients to a mailing list of a web hosting package of the manitu customer account this connection works in, by site_id and mail_address from manitu_webhosting_mail_mailinglist_list. The recipients there stay; an address already on it is answered as unchanged. At most 1000 recipients per list (else a conflict, limit_reached). Refused per address that is none (mail_address_invalid) or the list itself (target_is_address_itself). The people added get every mail sent to the list - only with their consent: name every address to the customer and ask for an explicit yes first.

### Arguments

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `mail_address` (string, required) - The address of the mailing list from manitu_webhosting_mail_mailinglist_list, e.g. club@example.de. Never guess one. (minLength `2`; maxLength `254`)
- `recipient_list` (array of string, required) - The addresses to put on the list. (minItems `1`; maxItems `1000`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_webhosting_mail_mailinglist_recipient_add",
    "arguments": {
      "site_id": 12345,
      "mail_address": "info@example.com",
      "recipient_list": [
        "string"
      ]
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/webhosting/mail/mailinglist/recipient/add`

### Authentication

One of `X-API-Key`, `Authorization: Bearer …` - never more than one in a request.

### Request body

JSON; unknown fields are refused.

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `mail_address` (string, required) - The address of the mailing list from manitu_webhosting_mail_mailinglist_list, e.g. club@example.de. Never guess one. (minLength `2`; maxLength `254`)
- `recipient_list` (array of string, required) - The addresses to put on the list. (minItems `1`; maxItems `1000`)

### Response

In `data`; the rest of the body as on every call.

- `mail_address` (string, required) - The list.
- `recipient_count` (integer, required) - How many recipients it has now.
- `changed_list` (array of string, required) - The addresses put on the list.
- `unchanged_list` (array of string, required) - The addresses given that were so already - nothing to do for them.

### Statuses

- `200` Success.
- `400` The request does not match the declared input schema.
- `401` No credential was presented, or it was not recognised.
- `403` The credential is not permitted to use this operation.
- `500` The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.
- `503` The channel this operation forwards through is unavailable.

### Example

```sh
curl -X POST 'https://api.manitu.de/v1/webhosting/mail/mailinglist/recipient/add' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"site_id":12345,"mail_address":"info@example.com","recipient_list":["string"]}'
```

## Example result

```json
{
  "mail_address": "info@example.com",
  "recipient_count": 1,
  "changed_list": [
    "string"
  ],
  "unchanged_list": [
    "string"
  ]
}
```
