Overview#
This page documents the Pages resource endpoints in the Jalpi Page Builder REST API. All endpoints are registered under the jalpi-page-builder/v1 route namespace and accept JSON payloads with WordPress REST nonce authorization.
See also: REST API Overview, AJAX Actions Reference, and Error Codes Reference.
Endpoints Summary#
| Method | Endpoint | Capability | Description |
|---|---|---|---|
| GET | /wp-json/jalpi-page-builder/v1/page/{post_id} | edit_post for the given post_id | Get Page |
| POST | /wp-json/jalpi-page-builder/v1/page/{post_id} | edit_post for the given post_id | Save Page |
| POST | /wp-json/jalpi-page-builder/v1/page/{post_id}/publish | edit_post for the given post_id; edit_others_posts additionally required when the caller is not the post author | Publish Page |
| GET | /wp-json/jalpi-page-builder/v1/page/{post_id}/history | edit_post for the given post_id | Get History |
Get Page#
{site_url}/wp-json/jalpi-page-builder/v1/page/{post_id}Permissions & Authentication
Authentication: WordPress cookie session + REST nonce
Capability: edit_post for the given post_id
Permission Callback: Jalpi_API::edit_permission
Parameters#
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
post_id | path | integer | Yes | The post to read. Must be 1 or greater. Sanitised with absint() and validated by validate_post_id(). |
X-WP-Nonce | header | string | Yes | WordPress REST nonce, created server-side as wp_create_nonce('wp_rest'). |
Save Page#
{site_url}/wp-json/jalpi-page-builder/v1/page/{post_id}Permissions & Authentication
Authentication: WordPress cookie session + REST nonce
Capability: edit_post for the given post_id
Permission Callback: Jalpi_API::edit_permission
Parameters#
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
post_id | path | integer | Yes | The post whose layout is being saved. Must be 1 or greater and resolve to an existing post the caller can edit. |
page_data | body | object | Yes | The complete page node tree. Must contain a sections key. Replaces the stored tree in full; this is not a partial update. |
page_data.version | body | string | No | Schema version string. Defaults to '1.0' when absent. Preserved on save but not read by any migration logic. |
page_data.sections | body | array | Yes | Top-level nodes, each a CBNode with type 'section'. May be empty. Every node is rebuilt by the sanitiser before storage. |
page_data.globalStyles | body | object | No | Legacy per-page style model. Preserved for pages saved before the site-wide Design System existed. |
X-WP-Nonce | header | string | Yes | WordPress REST nonce. The editor reads it from jalpiEditorConfig.nonce. |
Content-Type | header | string | Yes | Must be application/json. |
Publish Page#
{site_url}/wp-json/jalpi-page-builder/v1/page/{post_id}/publishPermissions & Authentication
Authentication: WordPress cookie session + REST nonce
Capability: edit_post for the given post_id; edit_others_posts additionally required when the caller is not the post author
Permission Callback: Jalpi_API::publish_permission
Parameters#
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
post_id | path | integer | Yes | The post to publish. Must be 1 or greater. Sanitised with absint() and validated by validate_post_id(). |
X-WP-Nonce | header | string | Yes | WordPress REST nonce. |
Content-Type | header | string | Yes | Must be application/json. The editor sends an empty JSON object as the body. |
Get History#
{site_url}/wp-json/jalpi-page-builder/v1/page/{post_id}/historyPermissions & Authentication
Authentication: WordPress cookie session + REST nonce
Capability: edit_post for the given post_id
Permission Callback: Jalpi_API::edit_permission
Parameters#
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
post_id | path | integer | Yes | The post whose history is read. Must be 1 or greater. Sanitised with absint(). This route registers no validate_callback, unlike the other page routes. |
X-WP-Nonce | header | string | Yes | WordPress REST nonce. |
Last updated: November 2026