Change a site's slug
Gives the site a new slug, and with it a new address. Only the site's owner can do it, and a guest token cannot.
Most sites finish inside the request: 200 with the new slug. A large site (more than 1,000 stored files) is copied in the background instead: 202 with status: "copying" and a job. Poll GET /api/v1/sites/{slug}/jobs/{id} with job.id until status is succeeded or failed. Once the copy finishes the old slug stops answering directly, so poll with the new slug if the old one redirects or returns 404.
If the site was ever published, the old slug stays reserved and redirects here (301 for reads, 308 for writes), so follow redirects; aliasRedirect says which case you are in. A site that was never published releases the old slug, which then 404s. Absolute URLs inside stored HTML are not rewritten. The rename is declined while an import, a structure or adapt job, an asset warm-up or a site transfer is running.
Request
- Base URL: https://api.dotsy.ai
- URL: https://api.dotsy.ai/api/v1/sites/{slug}/rename
- Auth: HTTP bearer
Path parameters
Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.
Request body
Example request
{
"newSlug": "acme-studio-2"
}Response
Renamed. The site lives at slug now.
Example response
{
"slug": "acme-studio-2",
"previousSlug": "acme-studio",
"publicUrl": "https://acme-studio-2.dotsy.site/",
"liveUrl": "https://acme-studio-2.dotsy.site/"
}Changes
No recorded changes to this operation across all 1 revision of this API.