# Order a domain for a web hosting package

> Orders a domain for one web hosting package - registered new or moved to manitu - after the user agreed to the AGB and the order.

- Effect: Write - Changes the account. Agents ask first.
- Idempotent: no
- Stability: stable
- MCP tool: `manitu_webhosting_domain_order` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/webhosting/domain/order`
- Needs: `service_webhosting`
- Counts against: [writes](/rate-limits/#limit-writes) (60 per hour per account)
- Page: /reference/webhosting/domain/order/

## MCP tool

`manitu_webhosting_domain_order`

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

### Description for the model

Orders a domain for a web hosting package, by its site_id: registered new (transfer false) or moved to manitu from another provider (transfer true, with the auth code if the user has it). manitu's support carries the order out and confirms it to the user by e-mail (handled: manual) - it is not active yet when this answers. A domain more than the package includes is charged as manitu lists it with a web hosting package (enduser price; [`manitu_public_domain_tld_get`](/reference/public/domain/tld/get.md) has the list price, and an account may have a special price or another tax - the approval names the price that is billed, with the tax of the account's invoice). Waits for the user's approval in the customer panel: the call is answered with approval_required and a pending_action, its approval holding as elements the AGB as a document with a link, the order as a text and what it costs as a price - nothing is ordered until the user approves it there. Refused per field when the TLD is not one manitu registers under (tld_not_offered), the name is no domain name (invalid), the domain is at manitu already (domain_exists) or an auth code comes without a transfer (not_for_type); with a conflict when the account may not order (order_not_allowed, with reason_list) or the package cannot be changed now (not_configurable).

### Arguments

- `site_id` (integer | string, required) - The site_id of the package. Never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `domain` (string, required) - The domain, e.g. example.de - with international characters or in ASCII. (minLength `3`; maxLength `253`; pattern `"^[^\\x00-,./:-@[-`{-\\x7F]+(?:\\.[^\\x00-,./:-@[-`{-\\x7F]+)+$"`)
- `transfer` (boolean, required) - true: the domain exists at another provider and moves to manitu; false: it is registered new.
- `authcode` (string, write-only) - With transfer only: the auth code (also called EPP or transfer code) the old provider gave the user - leave it out if he does not have it yet (then: [`manitu_domain_transfer_in_authcode_set`](/reference/domain/transfer/in/authcode/set.md)). (minLength `1`; maxLength `255`)
- `setup_default_page` (boolean) - Whether the website of the domain gets manitu's default page. Default true.
- `approval_token` (string, write-only) - The token of the way call_again from the approval_required answer of the same call - only after the user said yes to everything in its elements. Valid 15 minutes, once. (minLength `1`; maxLength `255`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_webhosting_domain_order",
    "arguments": {
      "site_id": 12345,
      "domain": "example.com",
      "transfer": true
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/webhosting/domain/order`

**This request changes something.**

### Description

Orders a domain for a web hosting package, by its site_id: registered new (transfer false) or moved to manitu from another provider (transfer true, with the auth code if there is one). manitu's support carries the order out and confirms it by e-mail (handled: manual); the domain is not active yet when this answers. A domain beyond those the package includes is charged at the enduser price ([`POST /v1/public/domain/tld/get`](/reference/public/domain/tld/get.md) has the list price; an account may have a special price or another tax). Refused per field when the TLD is not one manitu registers under (tld_not_offered), the name is no domain name (invalid), the domain is at manitu already (domain_exists) or an auth code comes without a transfer (not_for_type); with a conflict when the account may not order (order_not_allowed, with reason_list) or the package cannot be changed now (not_configurable). Made with a session of the customer panel, the call is carried out at once; otherwise it waits until a person signed in to the customer panel approves it (approval_required; its state: [`POST /v1/approval/get`](/reference/approval/get.md)).

### 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 of the package. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `domain` (string, required) - The domain, e.g. example.de - with international characters or in ASCII. (minLength `3`; maxLength `253`; pattern `"^[^\\x00-,./:-@[-`{-\\x7F]+(?:\\.[^\\x00-,./:-@[-`{-\\x7F]+)+$"`)
- `transfer` (boolean, required) - true: the domain exists at another provider and moves to manitu; false: it is registered new.
- `authcode` (string, write-only) - With transfer only: the auth code (also called EPP or transfer code) the old provider gave the user - leave it out if he does not have it yet (then: [`POST /v1/domain/transfer/in/authcode/set`](/reference/domain/transfer/in/authcode/set.md)). (minLength `1`; maxLength `255`)
- `setup_default_page` (boolean) - Whether the website of the domain gets manitu's default page. Default true.
- `approval_token` (string, write-only) - The token of the way call_again from the approval_required answer of the same call - only after the user said yes to everything in its elements. Valid 15 minutes, once. (minLength `1`; maxLength `255`)

### Response

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

- `site_id` (integer, required) - The package.
- `domain` (string, required) - The domain ordered, with international characters. (maxLength `253`; pattern `"^[^\\x00-,./:-@[-`{-\\x7F]+(?:\\.[^\\x00-,./:-@[-`{-\\x7F]+)+$"`)
- `transfer` (boolean, required) - Whether it moves to manitu (true) or is registered new (false).
- `handled` (string, required) - manual: manitu's support carries the order out and confirms it by e-mail. (one of `"manual"`)

### Statuses

- `200` Success.
- `400` The input is wrong, or the request itself (INVALID_INPUT). Each entry names its field and its reason - correct the input and call again.
- `401` No credential was presented, or it was not recognised (UNAUTHENTICATED).
- `403` The credential is valid, but may not do this (PERMISSION_DENIED). The reason says why - another credential is the way, not a repeat.
- `429` Too many calls. The Retry-After header says when to try again.
- `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/domain/order' \
  -H "X-API-Key: $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"site_id":12345,"domain":"example.com","transfer":true}'
```

## Example result

```json
{
  "site_id": 12345,
  "domain": "example.com",
  "transfer": true,
  "handled": "manual"
}
```
