Routes
Change a page's URL
Moves a page's route from from to to. The whole route record moves (content key, layout, title, …), menu links and other redirects that pointed at the old path retarget automatically, and a 301 redirect is left at the old path unless leaveRedirect is false. The change is staged to the draft — publish to make it live.
It is safe to retry: resend the same call after any error and a partly finished move completes. If to already serves exactly the content from did, the move counts as already done and answers 200.
post/api/v1/sites/{slug}/routes/rename
Request
- Base URL: https://api.dotsy.ai
- URL: https://api.dotsy.ai/api/v1/sites/{slug}/routes/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
Example request
{
"from": "/old-page",
"to": "/new-page"
}Response
Moved (staged).
Example response
{
"route": {
"path": "/about",
"contentKey": "about.html",
"layout": "layouts/main.html",
"title": "About us"
},
"redirect": {
"path": "/about",
"contentKey": "about.html",
"layout": "layouts/main.html",
"title": "About us"
},
"hint": "Changes staged to draft — call publish_site to go live."
}Changes
No recorded changes to this operation across all 1 revision of this API.