Sites

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.

post/api/v1/sites/{slug}/rename

Request

  • Base URL: https://api.dotsy.ai
  • URL: https://api.dotsy.ai/api/v1/sites/{slug}/rename
  • Auth: HTTP bearer

Path parameters

slugstring required
Example:acme-studio

Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.

Request body

newSlugstring required

The new slug: lowercase letters, numbers and hyphens (1–63), not reserved, and not shaped like a site id (UUID).

Example request

{
  "newSlug": "acme-studio-2"
}

Response

Renamed. The site lives at slug now.

slugstring required

The slug the site now has.

previousSlugstring required
publicUrlstring required
liveUrlstring required
liveReadyboolean required

True when the site had been published (the new address serves right away).

aliasRedirectboolean required

True when the old slug keeps redirecting (the site had been published). False when the old slug was released.

hintstring required

The warnings joined into one sentence.

warningsstring[] required

What to know after the rename. Plain sentences.

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.