KuikCodeDocs
APIReferencePages

Edit a KuikPage

POST
/pages/{id}/edits

Applies a list of edit operations to the draft, in order, all or nothing. Operations: setBlock, addBlock, removeBlock, moveBlock (blocks by id), setTheme, setNav, addPage, removePage, setPage, movePage. The header at the top of a page stays first and cannot be removed; home stays first and has no address. revision must be the page's current one: if the page changed since you read it, the answer is 409 and you read it again.

AuthorizationBearer <token>

An API key from Settings, Developers: Authorization: Bearer kc_live_...

In: header

Path Parameters

id*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/pages/string/edits" \  -H "Content-Type: application/json" \  -d '{    "revision": 0,    "operations": [      {        "op": "setBlock",        "page": "string",        "block": "string",        "fields": {          "property1": null,          "property2": null        }      }    ]  }'
{  "id": "string",  "name": "string",  "subdomain": "string",  "status": "draft",  "revision": 0,  "previewUrl": "string",  "pages": [    {      "id": "string",      "name": "string",      "slug": "string",      "icon": "string",      "previewUrl": "string",      "blocks": [        {          "property1": null,          "property2": null        }      ]    }  ],  "theme": {    "property1": null,    "property2": null  },  "nav": {    "property1": null,    "property2": null  }}