Pages

Patch a page (surgical find/replace)

Apply targeted find/replace patches without sending full page content. Uses optimistic locking via base_version_hash to prevent conflicts. More efficient than updatePage for small edits.

patch/papi/project/{projectId}/pages/{pageSlug}

Request

  • Base URL: https://api.websitepublisher.ai
  • URL: https://api.websitepublisher.ai/papi/project/{projectId}/pages/{pageSlug}
  • Auth: OAuth 2 (authorization code, authorization URL https://api.websitepublisher.ai/dapi/oauth/authorize, token URL https://api.websitepublisher.ai/dapi/oauth/token, scopes: read, write)

Path parameters

projectIdinteger required
pageSlugstring required

Request body

base_version_hashstring

Optional. Version hash from getPage response. If provided and mismatched, returns 409. If omitted, find/replace handles conflicts naturally.

patch_summarystring

Brief description of what was changed (stored in version history)

Example request

{
  "base_version_hash": "6db1457e",
  "patch_summary": "Updated hero section heading"
}

Response

Patches applied successfully. Returns new version number, version_hash, and count of patches applied.

Changes

No recorded changes to this operation across all 1 revision of this API.