Kindly EditDocumentationTry the editor

Get a page ability

One page as an outline: its sections in order (s1, s2…), each with its design (component), heading, layout and color style and the choices it allows, its editable fields (words, links, pictures) and its repeated items (cards, people, questions…) with their fields. Ids are paths valid for the returned rev: read the page before changing it, and send rev back with the change. By default this is the unpublished draft if there is one. format "text" gives a short outline; "html" adds each section's markup.

What it does#

One page as an outline: its sections in order (s1, s2…), each with its design (component), heading, layout and color style and the choices it allows, its editable fields (words, links, pictures) and its repeated items (cards, people, questions…) with their fields. Ids are paths valid for the returned rev: read the page before changing it, and send rev back with the change. By default this is the unpublished draft if there is one. format "text" gives a short outline; "html" adds each section's markup.

Access and execution#

This WordPress Ability runs as the authenticated caller. Site AI access, relevant content permissions, and feature-specific code or design gates still apply. See Automation access for authentication and transport setup. Discover the ability through the installed WordPress Abilities interface rather than guessing a different REST path.

Input schema#

{
  "type": "object",
  "properties": {
    "page_id": {
      "type": "integer"
    },
    "version": {
      "type": "string",
      "enum": [
        "draft",
        "live"
      ],
      "default": "draft"
    },
    "format": {
      "type": "string",
      "enum": [
        "outline",
        "html",
        "text"
      ],
      "default": "outline"
    }
  },
  "required": [
    "page_id"
  ],
  "additionalProperties": false
}

Output schema#

{
  "type": "object",
  "properties": {
    "page": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "built": {
          "type": "boolean",
          "description": "Built with Kindly Edit (its sections are designed components)."
        },
        "version": {
          "type": "string",
          "enum": [
            "draft",
            "live"
          ],
          "description": "Which version this outline is of."
        },
        "has_draft": {
          "type": "boolean"
        },
        "rev": {
          "type": "string",
          "description": "Send this back with any change; a change to a page that has changed since is refused (409)."
        },
        "lock": {
          "type": [
            "object",
            "null"
          ],
          "description": "Someone editing the page now, in which case changes are refused."
        }
      }
    },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "anchor": {
            "type": "string"
          },
          "component": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "heading": {
            "type": "string"
          },
          "style": {
            "type": "object"
          },
          "styles_available": {
            "type": "object"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Path id, such as s2.f0 or s2.i1.f3. Valid for the rev it was read at."
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "text",
                    "link",
                    "picture"
                  ]
                },
                "tag": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "html": {
                  "type": "string"
                },
                "href": {
                  "type": "string"
                },
                "new_tab": {
                  "type": "boolean"
                },
                "src": {
                  "type": "string"
                },
                "alt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "media_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "live": {
            "type": "boolean",
            "description": "Live content fills itself in from elsewhere; its words can't be changed here."
          }
        }
      }
    },
    "outline": {
      "type": "string",
      "description": "format \"text\" only."
    }
  }
}

Integration behavior#

Required fields and additionalProperties restrictions are part of the contract. Preserve returned revision tokens as opaque values. If a write reports a conflict, fetch the current source and reconcile before retrying. Draft and publication are separate operations unless this ability explicitly publishes. A successful schema match does not bypass content validation.

Errors use WordPress error responses; inspect their code, message, and status rather than assuming every non-success is retryable. Do not include credentials in diagnostic logs.

About this page

Documents Kindly Edit 0.9.16. Source: includes/abilities.php, includes/advanced-code-api.php, includes/advanced-php-api.php, includes/theme-design.php. Theme choices and account permissions can change which controls appear.

Type a word or phrase to search the full documentation.