---
title: "Buy a domain"
method: POST
path: "/domains/purchase"
tags: ["Domains"]
---

# Buy a domain

`POST /domains/purchase`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/domains/purchase`
- Auth: API key in header `Authorization`

Registers a domain through the built-in registrar. If the account has a card on file the purchase is charged immediately (`charged: true`, no redirect); otherwise the response includes a Stripe Checkout URL (`checkout_url`) to complete payment. The domain is created in `pending_payment` and becomes active once payment completes and registration succeeds. Poll GET /domains/{id} for status.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `domain` string, required: The domain to buy (check availability first).

## Response `201`

Checkout created

- object
  - `object` string
  - `id` string
  - `domain` string
  - `status` string
  - `checkout_url` string
  - `hint` string

## Other responses

- `401`: Authentication required
- `402`: Plan upgrade required — custom domains are available on the Pro and Business plans
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) · [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/2219f18ad651?raw)
