Edit a site
PATCH
https://api.vidmoat.com/v1/interactive-sites/{id}Change the draft with typed ops, all applied or none; or rename the address. There is no custom code: a value outside a list is refused with the list.
Path parameters#
idstringrequiredThe site id.
Body#
opsobject[]Up to 50 ops:setTheme,setHeader,setNav,setFooter,setSettings,addPage,updatePage,removePage,movePage,addSection,updateSection,removeSection,moveSection. See the guide.revintegerThe rev you read; a write over a newer draft is refused.prefixstringInstead ofops: a new address. The old one forwards for 30 days and stays yours until then.
Response#
Returns 200.
Response fields#
siteobjectThe site after the change.resultsobject[]Withops: one per op, withsectionIdfor a new section.heldobjectWithprefix: the old prefix and until when it is held.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such project, or it is not yours. The two are indistinguishable on purpose. |
| 400 | invalid_request | An op was refused (a value outside its list, over a cap, markup, an unsafe link, a video or picture that is not the account's own). The message names the op; nothing was changed. |
| 402 | plan_required | Interactive sites are not on this plan, or not switched on for this account or the API. |
| 409 | conflict | rev is older than the draft, or the new prefix is taken or refused. |