# Buy the quoted name (a person only) and connect it

`POST /hosting/sites/{id}/domains/buy` · Rivier · hosting

Buy the quoted name (a person only) and connect it.

- Scope: hosting:write
- Graphql: Mutation.hostingDomainBuy
- Sdk: hosting.domain.buy
- Cli: hosting domain buy
- Events: hosting.domain.bought

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "minLength": 16,
      "maxLength": 80
    }
  },
  "required": [
    "token"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/sites/{id}/domains/buy' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "token": "string"
}'
```
