# Change settings of a web hosting package

> Description, PHP version, IP logging, mail TLS and sender policy of a web hosting package.

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

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

## MCP tool

`manitu_webhosting_set`

### Description for the model

Changes settings of a web hosting package of the manitu customer account this connection works in, by its site_id from manitu_webhosting_list - the same names manitu_webhosting_get shows: description; web.php_version (one of web.php.version_list, null: the package's default), web.log_ip_address_type; mail.tls_policy, mail.sender_policy. Only the fields given change. Read the package first with manitu_webhosting_get. A new PHP version can break the web pages (old software); tls_policy encrypt makes mail from servers without TLS be refused; a stricter sender_policy makes mail programs fail that send with addresses of other mailboxes - say so and ask for an explicit yes first. Refused per field for a part the package does not have (part_not_in_package), a PHP version not offered (php_version_not_available); with a conflict when the package cannot be changed now (not_configurable).

Provide at least one of: description, web, mail.

### Arguments

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `description` (string | null) - The customer's description of the package. Left out: unchanged (set) or none (create); null or empty: none. (maxLength `1024`)
- `web` (object) - (minProperties `1`)
  - `web.php_version` (string | null) - The PHP version for the web pages, e.g. "php8.3" - one of web.php.version_list of manitu_webhosting_get. null: back to the package's default. (maxLength `32`)
  - `web.log_ip_address_type` (string) - How the web server logs visitors' IP addresses: common - in full; anonymous-full - anonymised (the default, relevant for the GDPR). (one of `"common"`, `"anonymous-full"`)
- `mail` (object) - (minProperties `1`)
  - `mail.tls_policy` (string) - Encryption between mail servers for all domains of the package: may - used when the other side offers it (the default); encrypt - required, mail without it is refused. (one of `"may"`, `"encrypt"`)
  - `mail.sender_policy` (string) - Who may send over manitu's mail servers with a sender address of the package's domains: none - any authenticated login, any address; same_site - a login of this package (the default); same_mailbox - only the mailbox the address belongs to (its address or an alias). Applies to automatic replies as well. (one of `"none"`, `"same_site"`, `"same_mailbox"`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_webhosting_set",
    "arguments": {
      "site_id": 12345,
      "description": "Example"
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/webhosting/set`

### Authentication

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

### Request body

JSON; unknown fields are refused.

Provide at least one of: description, web, mail.

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `description` (string | null) - The customer's description of the package. Left out: unchanged (set) or none (create); null or empty: none. (maxLength `1024`)
- `web` (object) - (minProperties `1`)
  - `web.php_version` (string | null) - The PHP version for the web pages, e.g. "php8.3" - one of web.php.version_list of manitu_webhosting_get. null: back to the package's default. (maxLength `32`)
  - `web.log_ip_address_type` (string) - How the web server logs visitors' IP addresses: common - in full; anonymous-full - anonymised (the default, relevant for the GDPR). (one of `"common"`, `"anonymous-full"`)
- `mail` (object) - (minProperties `1`)
  - `mail.tls_policy` (string) - Encryption between mail servers for all domains of the package: may - used when the other side offers it (the default); encrypt - required, mail without it is refused. (one of `"may"`, `"encrypt"`)
  - `mail.sender_policy` (string) - Who may send over manitu's mail servers with a sender address of the package's domains: none - any authenticated login, any address; same_site - a login of this package (the default); same_mailbox - only the mailbox the address belongs to (its address or an alias). Applies to automatic replies as well. (one of `"none"`, `"same_site"`, `"same_mailbox"`)

### Response

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

- `site_id` (integer, required) - The web hosting package - what its routes take. Globally unique; on the servers its home is /home/sites/site<site_id>.
- `service_type` (string, required) - The kind of service - its own data is under the key of that name. (one of `"webhosting"`)
- `description` (string | null, required) - What the customer wrote about it (his description), null if nothing - not its name or user name.
- `status` (string | null, required) - The state of the contract, e.g. active, expiring (cancelled, runs out at paid_until).
- `is_configurable` (boolean, required) - It can be changed right now - false e.g. while suspended or being moved.
- `plan` (string | null, required) - The plan, e.g. "Webhosting M".
- `paid_until` (string | null, required) - Paid up to this day. (format `date`)
- `created_at` (string | null, required) - (format `date-time`)
- `webhosting` (object, required)
  - `webhosting.package_name` (string | null, required) - The name of the package on contract and invoice - a domain name, but not a special one: all domains of a web hosting package work alike.
  - `webhosting.site_name` (string | null, required) - site<site_id> - how the package is named on the servers (paths, SFTP).
  - `webhosting.is_space_shared` (boolean, required) - Web and mail share one disk space - their quota counts the same use.
  - `webhosting.migration_running` (boolean, required) - The package is being moved to another server right now - it cannot be changed meanwhile.
  - `webhosting.web` (object | null, required) - The web part - null if the package has none.
    - `webhosting.web.server` (string | null, required) - The web server the package runs on (host name) - what SSH and SFTP/FTP connect to. Technical: mention it only for SSH/FTP or when asked.
    - `webhosting.web.root_dir` (string | null, required) - The home of the web part on the server.
    - `webhosting.web.htdocs_dir` (string | null, required) - Where the web pages are, relative to root_dir.
    - `webhosting.web.ip_address` (object, required)
      - `webhosting.web.ip_address.ipv4` (object | null, required)
        - `webhosting.web.ip_address.ipv4.address` (string, required)
        - `webhosting.web.ip_address.ipv4.is_dedicated` (boolean | null, required) - The package's own address, not shared with others.
      - `webhosting.web.ip_address.ipv6` (object | null, required)
        - `webhosting.web.ip_address.ipv6.address` (string, required)
        - `webhosting.web.ip_address.ipv6.is_dedicated` (boolean | null, required) - The package's own address, not shared with others.
    - `webhosting.web.php` (object | null, required) - null if the package has no PHP.
      - `webhosting.web.php.version` (string | null, required) - The PHP version in use, e.g. php8.2.
      - `webhosting.web.php.version_source` (string | null, required) - customer: the customer chose it; package: the default the package was ordered (or last upgraded) with; manitu: manitu's general default. (one of `"customer"`, `"package"`, `"manitu"`, `null`)
      - `webhosting.web.php.version_list` (array of string, required) - The versions the customer can choose.
      - `webhosting.web.php.memory_limit` (string | null, required) - e.g. 512M
      - `webhosting.web.php.max_execution_time_seconds` (integer | null, required)
      - `webhosting.web.php.post_max_size` (string | null, required)
      - `webhosting.web.php.upload_max_filesize` (string | null, required)
    - `webhosting.web.log_ip_address_type` (string | null, required) - How the web server logs visitors' IP addresses (/logs/web.log, /logs/web.err.log): common - in full; anonymous-full - anonymised (relevant for the GDPR). Other logs are never anonymised. (one of `"common"`, `"anonymous-full"`, `null`)
    - `webhosting.web.quota` (object, required) - Disk space in MB and files, used and allowed - as last measured.
      - `webhosting.web.quota.space_used_mb` (integer | null, required)
      - `webhosting.web.quota.space_max_mb` (integer | null, required)
      - `webhosting.web.quota.files_used` (integer | null, required)
      - `webhosting.web.quota.files_max` (integer | null, required)
      - `webhosting.web.quota.is_warning` (boolean, required) - 75 % or more of a limit used.
      - `webhosting.web.quota.is_exceeded` (boolean, required) - A limit reached - nothing more can be stored.
      - `webhosting.web.quota.measured_at` (string | null, required) - (format `date-time`)
    - `webhosting.web.limit` (object, required) - How many the package allows - how many are in use, the routes on them say.
      - `webhosting.web.limit.database_count_max` (integer | null, required)
      - `webhosting.web.limit.ftp_user_count_max` (integer | null, required)
      - `webhosting.web.limit.ssh_user_count_max` (integer | null, required)
      - `webhosting.web.limit.cronjob_count_max` (integer | null, required)
      - `webhosting.web.limit.websitebuilder_count_max` (integer | null, required)
      - `webhosting.web.limit.subdomain_count_max` (integer | null, required)
    - `webhosting.web.feature_list` (array of string, required) - What the web part offers, e.g. php, cgi, ssi, application_installation, websitebuilder.
  - `webhosting.mail` (object | null, required) - The mail part - null if the package has none.
    - `webhosting.mail.mx_server` (string | null, required) - The server that receives the package's e-mail - the MX target in DNS. NOT the server for mail programs (IMAP, POP3, SMTP): never give it to the customer as his mail server; mention it only when asked about MX.
    - `webhosting.mail.tls_policy` (string | null, required) - Encryption between mail servers for the package's domains: may - used when the other side offers it; encrypt - required, mail without it is refused. Applies to all domains of the package alike. (one of `"may"`, `"encrypt"`, `null`)
    - `webhosting.mail.sender_policy` (string | null, required) - Who may send over manitu's mail servers with a sender address of the package's domains: none - any authenticated login, any address; same_site - a login of this package; same_mailbox - only the mailbox the address belongs to. Applies to all domains of the package alike. (one of `"none"`, `"same_site"`, `"same_mailbox"`, `null`)
    - `webhosting.mail.quota` (object, required) - Disk space in MB and files, used and allowed - as last measured.
      - `webhosting.mail.quota.space_used_mb` (integer | null, required)
      - `webhosting.mail.quota.space_max_mb` (integer | null, required)
      - `webhosting.mail.quota.files_used` (integer | null, required)
      - `webhosting.mail.quota.files_max` (integer | null, required)
      - `webhosting.mail.quota.is_warning` (boolean, required) - 75 % or more of a limit used.
      - `webhosting.mail.quota.is_exceeded` (boolean, required) - A limit reached - nothing more can be stored.
      - `webhosting.mail.quota.measured_at` (string | null, required) - (format `date-time`)
    - `webhosting.mail.limit` (object, required) - How many the package allows - how many are in use, the routes on them say.
      - `webhosting.mail.limit.mailbox_count_max` (integer | null, required)
      - `webhosting.mail.limit.mailing_list_count_max` (integer | null, required)
    - `webhosting.mail.feature_list` (array of string, required) - What the mail part offers, e.g. rspamd (spam filter), sieve (filter rules).

### 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/set' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"site_id":12345,"description":"Example"}'
```

## Example result

```json
{
  "site_id": 12345,
  "service_type": "webhosting",
  "description": "Example",
  "status": "string",
  "is_configurable": true,
  "plan": "string",
  "paid_until": "2026-10-23",
  "created_at": "2026-10-23T12:00:00+02:00",
  "webhosting": {
    "package_name": "string",
    "site_name": "string",
    "is_space_shared": true,
    "migration_running": true,
    "web": {
      "server": "string",
      "root_dir": "/web",
      "htdocs_dir": "/web",
      "ip_address": {
        "ipv4": {
          "address": "string",
          "is_dedicated": true
        },
        "ipv6": {
          "address": "string",
          "is_dedicated": true
        }
      },
      "php": {
        "version": "string",
        "version_source": "customer",
        "version_list": [
          "string"
        ],
        "memory_limit": "string",
        "max_execution_time_seconds": 1,
        "post_max_size": "string",
        "upload_max_filesize": "string"
      },
      "log_ip_address_type": "common",
      "quota": {
        "space_used_mb": 1,
        "space_max_mb": 1,
        "files_used": 1,
        "files_max": 1,
        "is_warning": true,
        "is_exceeded": true,
        "measured_at": "2026-10-23T12:00:00+02:00"
      },
      "limit": {
        "database_count_max": 1,
        "ftp_user_count_max": 1,
        "ssh_user_count_max": 1,
        "cronjob_count_max": 1,
        "websitebuilder_count_max": 1,
        "subdomain_count_max": 1
      },
      "feature_list": [
        "string"
      ]
    },
    "mail": {
      "mx_server": "string",
      "tls_policy": "may",
      "sender_policy": "none",
      "quota": {
        "space_used_mb": 1,
        "space_max_mb": 1,
        "files_used": 1,
        "files_max": 1,
        "is_warning": true,
        "is_exceeded": true,
        "measured_at": "2026-10-23T12:00:00+02:00"
      },
      "limit": {
        "mailbox_count_max": 1,
        "mailing_list_count_max": 1
      },
      "feature_list": [
        "string"
      ]
    }
  }
}
```
