mainwp-boilerplate category. Publishing a template still uses the Boilerplate workflow.
Access and setup
Activate Boilerplate 5.1 or later on a MainWP Dashboard with WordPress 6.9 or later and Abilities API support. Theinput_json examples require MainWP Dashboard 6.2 or later. The Dashboard must provide the MainWP ability permission utilities. Confirm the update is installed by listing the abilities:
site_id, including MainWP and Team Control site restrictions. Missing permissions or permission utilities refuse the call.
Read abilities use GET. Changes use POST, and destructive abilities use DELETE. The route is /wp-json/wp-abilities/v1/abilities/ABILITY_NAME/run. The examples below show the JSON input and response fields for each ability. For GET, send the JSON through input_json:
input object. Use a JSON boolean for confirm and an integer for counts:
17 or "17". Zero, leading zeros, fractions, trailing whitespace and overflowing IDs are refused. Pagination defaults to page 1 with 25 items and allows at most 100 items per page. Query-string pagination also accepts canonical decimal strings. All input objects reject extra properties. Token text limits are measured in bytes at runtime, so multibyte text may reach a limit before the schema’s character count.
List token definitions
Ability:mainwp/list-boilerplate-tokens-v1Method: GET
Who may use it: Global authority described above. Read token names, descriptions and counts of stored site values. Private token values are omitted.
Inputs
Outputs
All listed output fields are present.Example
Input:Read one site’s token values
Ability:mainwp/get-site-boilerplate-token-values-v1Method: GET
Who may use it: Authority for this exact site, as described above. Read the substitutions used for one site. Treat the returned values as private client data.
Inputs
Outputs
All listed output fields are present.Example
Input:Set one site’s token values
Ability:mainwp/set-site-boilerplate-token-values-v1Method: POST
Who may use it: Authority for this exact site, as described above. Change only the supplied token values. Tokens omitted from the request keep their existing values.
Inputs
Outputs
All listed output fields are present.Example
Input:unchanged_token_ids. Use each token ID once. Unchanged empty or built-in defaults remain defaults; they do not create saved overrides.
Ensure a custom token exists
Ability:mainwp/ensure-boilerplate-token-v1Method: POST
Who may use it: Global authority described above. Create a custom token, or return the matching definition if it already exists. A differing definition is refused; it is not overwritten.
Inputs
Outputs
All listed output fields are present.Example
Input:Delete a custom token
Ability:mainwp/delete-boilerplate-token-v1Method: DELETE
Who may use it: Global authority described above. Remove one custom token definition and its stored site values. First list token definitions and use its current site_value_count as expected_site_value_count.
Inputs
Outputs
All listed output fields are present.Example
Input:List saved Boilerplates
Ability:mainwp/list-boilerplates-v1Method: GET
Who may use it: Global authority described above. Browse saved Dashboard templates by kind and status. This list omits content and site mappings.
Inputs
Outputs
All listed output fields are present.Example
Input:Read a saved Boilerplate
Ability:mainwp/get-boilerplate-v1Method: GET
Who may use it: Global authority described above. Read one Dashboard template before replacing its tokens. The response excludes internal metadata and site token values.
Inputs
Outputs
All listed output fields are present.Example
Input:Preview a template for one site
Ability:mainwp/preview-boilerplate-for-site-v1Method: GET
Who may use it: Authority for this exact site, as described above. Replace Boilerplate and Client tokens for one authorized site without publishing content or contacting the Child.
Inputs
Outputs
All listed output fields are present.Example
Input:Read a deployment mapping
Ability:mainwp/get-boilerplate-deployment-v1Method: GET
Who may use it: Authority for this exact site, as described above. Read the Dashboard’s stored relationship between a template and one Child post. This does not ask the Child whether the post still exists.
Inputs
Outputs
All listed output fields are present.Example
Input:Delete a mapped Child post
Ability:mainwp/delete-boilerplate-site-post-v1Method: DELETE
Who may use it: Authority for this exact site, as described above. Permanently remove the exact Child post recorded in the Dashboard mapping. This also removes that mapping after the Child confirms success. It does not delete the Dashboard template.
Inputs
Outputs
All listed output fields are present.Example
Input:Confirmed deletion and errors
mainwp/delete-boilerplate-site-post-v1 requires MainWP Child 6.2 or later on the target site. Older Child releases could report success without confirming deletion. The ability refuses an older reported version before sending a delete request. Sync the site after updating Child so the Dashboard has its current version.
Only an exact Child SUCCESS response permits mapping removal. A failed or uncertain deletion keeps the mapping. A database conflict or failed mapping cleanup after remote success can also leave the result unknown. Check the Child directly and read the current Dashboard mapping before deciding what to do next; a mapping read alone does not prove the remote post exists.
Invalid input, missing objects, denied permissions and unavailable storage also return errors. Fix the reported cause rather than treating a failed call as an empty result. The legacy “Yes, Proceed!” action uses the same confirmed deletion rule and retains its existing success/failure response format.
