---
title: "Connects a domain the seller owns to the store, answering the DNS records to set; it becomes the store's main address once they check out, or at once when it already does. Needs a plan that includes a domain."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › site

`POST /v1/stores/{store}/domain/connect`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `site:write`

## Path parameters

- `store` (`connectDomain.path.store`; string, required) — The store's id.

## Request body

_Required._

- `hostname` (`connectDomain.hostname`; string, required)
  - minLength 3; maxLength 253

## Example request

```json
{
  "hostname": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/domain/connect' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "hostname": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/domain/connect';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({hostname: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/domain/connect"

payload = { "hostname": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Connects a domain the seller owns to the store, answering the DNS records to set; it becomes the store's main address once they check out, or at once when it already does. Needs a plan that includes a domain.

#### Example

```json
{
  "included": true,
  "available": true,
  "target": "string",
  "domain": {
    "id": "string",
    "hostname": "string",
    "status": "string",
    "failure": "string",
    "records": [
      {
        "type": "CNAME",
        "name": "string",
        "value": "string"
      }
    ],
    "verified_at": "string",
    "checked_at": "string",
    "created_at": "string"
  }
}
```

- `included` (`connectDomain.response.200.included`; boolean, required)
- `available` (`connectDomain.response.200.available`; boolean, required)
- `target` (`connectDomain.response.200.target`; any of, required)
  - any of: `string`, `null`
- `domain` (`connectDomain.response.200.domain`; any of, required)
  - any of: `object`, `null`

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`connectDomain.response.default.type`; string, required)
  - format `uri`
- `title` (`connectDomain.response.default.title`; string, required)
- `status` (`connectDomain.response.default.status`; integer, required)
- `detail` (`connectDomain.response.default.detail`; string, required)
- `code` (`connectDomain.response.default.code`; string, optional)
- `context` (`connectDomain.response.default.context`; object, optional)
- `reached_core` (`connectDomain.response.default.reached_core`; boolean, optional)
- `core_answer` (`connectDomain.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/connect-domain/index.md
