Duplicate a Site
Creates a copy of an existing site under a new slug. All files are copied server-side in storage — no client upload needed.
POST /api/v1/publish/:slug/duplicate
Path Parameters
The slug of the site to duplicate (e.g., bright-canvas-a7k2).
| Header | Required | Description |
|---|
Authorization | Yes | Bearer sh_live_... |
Example
curl -X POST https://simplehost.dev/api/v1/publish/bright-canvas-a7k2/duplicate \
-H "Authorization: Bearer sh_live_your_key_here"
Response (201)
{
"slug": "cool-river-x9f3",
"siteUrl": "https://cool-river-x9f3.simplehost.dev/",
"versionId": "01jm4xyz789ghi012",
"copiedFrom": "bright-canvas-a7k2",
"status": "active"
}
The new site is immediately live — no finalize step needed since files are copied server-side.
Errors
| Status | Code | Reason |
|---|
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 404 | NOT_FOUND | Source site not found or not owned by this user |