Docs menu

API reference

sites.create

Create a Site

POST/api/v1/sites

Needs the site:create permission. As an MCP tool it is named sites.create.

Details

Create a new Site from a Kit (`kit`, default the Blog Kit: a complete blog drawn by Aster, with demo content) in a Project's Cloudflare account. Every Site is one purchase (ADR 0035): the Account's first Blog Kit Site is free; any other uses a Site credit of its Kit bought in the dashboard first (PURCHASE_REQUIRED says the price when there is none), and the credit is bound to the Site as it is created and return the Job that builds it. Its address is the free workers.dev one, or `domain`: one of that Cloudflare account's domains (sites.domains), as the domain itself or one subdomain of it, that has no DNS record and no other Worker yet; WoFlare links it while building, and the Site is claimed there, so its passkey belongs to it. WoFlare creates a D1 database, an R2 media bucket, a KV session store and the Worker, all named after `slug`, migrates the database and checks the Site; it stays locked until its owner opens the Claim Link (sites.claim.link). Restore points start once it is built, daily; `mediaBackup` true also copies its images and files into them (backups.media.set changes it later). Never takes over a resource it did not create: a name already used in that Cloudflare account stops the Job. Audited.

Input

FieldTypeNotes
projectIdrequiredstring1 to 64 characters
namerequiredstring1 to 80 characters
slugrequiredstring
domainstring3 to 253 characters
mediaBackupboolean
kitstring1 to 64 characters

Output

FieldTypeNotes
siteIdrequiredstring
jobIdrequiredstring

All Operations