---
title: "Create site"
method: POST
path: "/sites"
tags: ["Sites"]
---

# Create site

`POST /sites`

## Request

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

Creates an additional AI site under the current account. Refuses if the proposed subdomain is taken.

## Headers

- `Idempotency-Key` string

## Request body

- AiSiteCreateRequest
  - `prompt` string: Build brief describing the storefront to generate — brand, what you're selling, and the look and feel. Kicks off an AI build. Required unless `repository` is given.
  - `repository` string: Optional "owner/repo" of an existing GitHub repository (reached through a connected GitHub App installation) to start the site from instead of generating a fresh one. When set, `prompt` is optional and only tells the agent what to adapt.
  - `name` string
  - `subdomain` string, nullable
  - `access_mode` 'public' | 'members' | 'account' | 'admins_only' | 'me_only'
  - `show_referral_badge` boolean

## Response `201`

AI site created. When created with a `prompt`, an engineering build is started automatically — `build_task_id` references it; track progress via `GET /tasks/{id}`. Do not start another build for the site.

- AiSite
  - `id` string, required
  - `object` string, required
  - `name` string, required
  - `access_mode` 'public' | 'members' | 'account' | 'admins_only' | 'me_only', required
  - `subdomain` string, nullable, required
  - `github_repo_full_name` string, nullable, required
  - `metadata` object, required
  - `domain` string, nullable, required
  - `github_url` string, nullable, required
  - `domain_verified` boolean, required
  - `app_url` string, nullable, required
  - `is_live` boolean, required
  - `show_referral_badge` boolean, required
  - `build_task_id` string, nullable, required
  - `created_at` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `402`: Plan upgrade required — the account has reached its plan's site limit
- `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)
