---
title: buy_domain
description: Use buy_domain with Vercel MCP.
url: "https://vercel.com/docs/agent-resources/vercel-mcp/tools/billing/buy_domain"
last_updated: 2018-10-20
related:
  - /docs/domains
  - /docs/agent-resources/vercel-mcp/tools/billing/get_domain_order
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# buy_domain

Register (purchase) a single [domain](/docs/domains) for a team. The quote (`get_purchase_quote` with `product: domain`) checks availability and returns the live `purchasePrice` for the requested term. The **confirm** step must echo that price back as `expectedPrice`, and the order is rejected if the live price no longer matches, so you are never charged more than the amount you saw quoted.

Pass the registration term (`years`) from the quote and the full registrant (`contact`) details when confirming the purchase.

Domain registration completes asynchronously: a successful **confirm** step returns an `orderId` that you can use with [`get_domain_order`](/docs/agent-resources/vercel-mcp/tools/billing/get_domain_order) to check whether the registration completed.

| Parameter        | Type    | Required | Default | Description                                                                                                                       |
| ---------------- | ------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `domain`         | string  | Yes      | -       | The domain to register, e.g. "example.com".                                                                                       |
| `years`          | integer | No       | -       | Registration term in years. Required on confirm. must match the term shown in the quote. Maximum: 10.                             |
| `autoRenew`      | boolean | No       | -       | Whether to auto-renew at the end of the term. Defaults to true.                                                                   |
| `expectedPrice`  | number  | No       | -       | Required on confirm: the purchasePrice (USD) from the quote. The server rejects the order if it no longer matches the live price. |
| `contact`        | object  | No       | -       | Registrant (WHOIS) contact. Not needed for the quote. REQUIRED on confirm. All fields must be provided.                           |
| `teamId`         | string  | Yes      | -       | The team ID or slug. Use the team that owns the resource.                                                                         |
| `confirm`        | boolean | No       | -       | Set true to execute the purchase. Requires the idempotencyKey from get\_purchase\_quote.                                            |
| `idempotencyKey` | string  | No       | -       | The idempotencyKey returned by get\_purchase\_quote.                                                                                |

The `contact` object requires the following fields with an optional `companyName`:

| Field         | Type   | Description                                           |
| ------------- | ------ | ----------------------------------------------------- |
| `firstName`   | string | The first name of the domain registrant               |
| `lastName`    | string | The last name of the domain registrant                |
| `email`       | string | The email address of the domain registrant            |
| `phone`       | string | The phone number in E.164 format (e.g., +14155550123) |
| `address1`    | string | The street address of the domain registrant           |
| `city`        | string | The city of the domain registrant                     |
| `state`       | string | The state/province of the domain registrant           |
| `zip`         | string | The postal code of the domain registrant              |
| `country`     | string | Two-letter ISO country code (e.g., US)                |
| `companyName` | string | The company name of the domain registrant (optional)  |

**Sample prompt:** "Buy the domain mydomain.com"

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
