# Make a site

`POST https://api.vidmoat.com/v1/interactive-sites`

- Scope: `projects.write`
- Cost: Free

Make the account's site as a draft with a home page. Nothing is public until it is published.

### Body

- `prefix` (string, required): 3 to 30 letters a to z, digits and single hyphens. Reserved names, brands and words like login or wallet are refused with the reason.
- `title` (string, required): The site's title, up to 60 characters.

## Response

Returns `201`.

### Response fields

- `site` (object): The site, as Get a site returns it.

## Errors

Besides the errors any request can get ([authentication](https://developer.vidmoat.com/developer/docs/authentication#when-a-request-is-refused), [rate limits](https://developer.vidmoat.com/developer/docs/rate-limits)):

| Status | Code | When |
| --- | --- | --- |
| 402 | [`plan_required`](https://developer.vidmoat.com/developer/docs/errors#plan_required) | Interactive sites are not on this plan (Creator and Studio), or not switched on for this account or the API. |
| 409 | [`conflict`](https://developer.vidmoat.com/developer/docs/errors#conflict) | The prefix is taken, held after a rename, or refused; or the account already has its one site. |
| 429 | [`rate_limited`](https://developer.vidmoat.com/developer/docs/errors#rate_limited) | More than 10 sites made or renamed in a day on the account. |

## Request examples

```bash curl
curl -X POST https://api.vidmoat.com/v1/interactive-sites \
  -H "Authorization: Bearer $VIDMOAT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prefix":"river-films","title":"River Films"}'
```

```js Node
const res = await fetch('https://api.vidmoat.com/v1/interactive-sites', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.VIDMOAT_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prefix: 'river-films',
    title: 'River Films',
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? `HTTP ${res.status}`);
console.log(data);
```

```python Python
import os
import requests

res = requests.post(
    "https://api.vidmoat.com/v1/interactive-sites",
    headers={"Authorization": f"Bearer {os.environ['VIDMOAT_KEY']}"},
    json={
      "prefix": "river-films",
      "title": "River Films",
    },
    timeout=60,
)
res.raise_for_status()
print(res.json())
```

## Example response

```json
{
  "site": {
    "id": "clxsite0001",
    "prefix": "river-films",
    "url": "https://river-films.interactive.vidmoat.com",
    "status": "draft",
    "rev": 0,
    "shown": false,
    "previewUrl": "https://river-films.interactive.vidmoat.com/?preview=1763125200000.5f2c",
    "problems": []
  }
}
```

---

Source: https://developer.vidmoat.com/developer/docs/api/interactive-sites/create-interactive-site
Previous: [List sites](https://developer.vidmoat.com/developer/docs/api/interactive-sites/list-interactive-sites.md)
Next: [Check a prefix](https://developer.vidmoat.com/developer/docs/api/interactive-sites/interactive-site-availability.md)
All documentation: https://developer.vidmoat.com/llms-full.txt
