Every Mantle endpoint lives under the mantle/v1 namespace. REST_Base composes that namespace from a base path of mantle and a version of v1, so all controllers inherit it.
Authentication
Mantle's routes are cookie-and-nonce authenticated like the rest of the WordPress REST API, and each route declares a permission_callback that checks a Mantle capability. From the browser, use the nonce WordPress already provides; from a script, use an authentication plugin appropriate to your site.
/wp-json/mantle/v1/settings
Accept application/jsonX-WP-Nonce REPLACE_WITH_REST_NONCE
{
"maintenance_enabled": false,
"security_enabled": false,
"hosting_provider": ""
}Enumerate the routes on your own site
Because the surface is module-dependent, list it rather than trusting a static table:
wp eval '$r = rest_get_server()->get_routes(); foreach ( $r as $route => $h ) { if ( 0 === strpos( $route, "/mantle/v1" ) ) { echo $route . PHP_EOL; } }'/mantle/v1
/mantle/v1/settings
/mantle/v1/settings/reset
/mantle/v1/modules
...
Core routes
Registered by controllers in includes/Controller/REST/, independent of module state.
Settings
| Route | Methods |
|---|---|
/mantle/v1/settings | GET, POST |
/mantle/v1/settings/<setting_key> | GET, POST |
/mantle/v1/settings/reset | DELETE |
setting_key matches [a-zA-Z0-9_]+. String values are sanitised with sanitize_text_field() unless the key is in the controller's textarea allow-list.
Setup and connection
| Route | Methods |
|---|---|
/mantle/v1/setup | GET, POST |
/mantle/v1/setup/<setting_key> | GET, POST |
/mantle/v1/pin | POST |
/mantle/v1/pin/<pin> | POST |
/mantle/v1/connector | GET |
/mantle/v1/connector/callback | GET |
/mantle/v1/auth/google/refresh | POST |
/mantle/v1/order | POST |
pin matches exactly four digits (\d{4}).
Modules
| Route | Methods |
|---|---|
/mantle/v1/modules | GET |
/mantle/v1/modules/<module_id> | POST |
module_id matches [a-zA-Z0-9_-]+.
Capabilities, roles, and users
| Route | Methods |
|---|---|
/mantle/v1/capabilities | GET |
/mantle/v1/capabilities/check | GET |
/mantle/v1/capabilities/sync | POST |
/mantle/v1/capabilities/reset | POST |
/mantle/v1/roles | GET |
/mantle/v1/roles/<role>/capabilities | POST |
/mantle/v1/power-admin/users | GET |
/mantle/v1/power-admin/check | GET |
/mantle/v1/power-admin/assign | POST |
Licence and deployment
| Route | Methods |
|---|---|
/mantle/v1/license | GET, POST |
/mantle/v1/license/remote/register | GET |
/mantle/v1/deployments | GET |
WAF
| Route | Methods |
|---|---|
/mantle/v1/waf | GET, POST, DELETE |
/mantle/v1/waf/sync | GET |
/mantle/v1/waf/<key> | GET |
/mantle/v1/waf/<id> | DELETE |
Plugin and theme commands
| Route | Methods |
|---|---|
/mantle/v1/plugins/command | POST |
/mantle/v1/plugins/command/batch | POST |
/mantle/v1/plugins/command/log | GET |
Module routes
These are registered through get_rest_controllers() when their module initialises, so they exist only while the owning module is enabled — with the AI Chatbot group noted below as an exception.
Convergence Cache (convergence_cache)
| Route | Methods |
|---|---|
/mantle/v1/cache/info | GET |
/mantle/v1/cache/provider | POST |
/mantle/v1/cache/cloudflare/enable | POST |
/mantle/v1/cache/admin-bar/enable | POST |
/mantle/v1/cache/clear/object | POST |
/mantle/v1/cache/clear/page | POST |
/mantle/v1/cache/clear/edge | POST |
/mantle/v1/cache/clear/all | POST |
/mantle/v1/cache/clear/pressable | POST |
/mantle/v1/cache/clear/wpengine | POST |
/mantle/v1/cache/clear/pantheon | POST |
/mantle/v1/cache/clear/cloudflare | POST |
Monitoring (monitoring)
| Route | Methods |
|---|---|
/mantle/v1/monitoring/pagespeed/ | GET |
/mantle/v1/monitoring/pagespeed/<identifier>/ | GET |
/mantle/v1/monitoring/contact-groups/ | GET |
/mantle/v1/monitoring/uptime/ | GET |
/mantle/v1/monitoring/uptime/<identifier>/ | GET |
/mantle/v1/monitoring/uptime/<identifier>/history | GET |
/mantle/v1/monitoring/uptime/<identifier>/periods/ | GET |
/mantle/v1/monitoring/uptime/<identifier>/alerts/ | GET |
/mantle/v1/monitoring/ssl/ | GET |
/mantle/v1/monitoring/ssl/<identifier>/ | GET |
/mantle/v1/monitoring/heartbeat/ | GET |
/mantle/v1/monitoring/heartbeat/<identifier>/ | GET |
identifier matches [0-9]+. Note that the history sub-route has no trailing slash while its siblings do.
Plugin Sync (plugin_sync)
| Route | Methods |
|---|---|
/mantle/v1/plugins/status | GET |
/mantle/v1/plugins/sync | POST |
/mantle/v1/plugins/sync/status | GET |
/mantle/v1/plugins/command/enable | POST |
/mantle/v1/plugins/command/disable | POST |
/mantle/v1/themes/status | GET |
Client Info (client_info, core)
| Route | Methods |
|---|---|
/mantle/v1/clients | GET, POST |
/mantle/v1/clients/logo | POST |
AI Chatbot
| Route | Methods |
|---|---|
/mantle/v1/ai-chatbot/conversations | GET, POST |
/mantle/v1/ai-chatbot/conversations/<id> | GET, POST, PUT, PATCH, DELETE |
/mantle/v1/ai-chatbot/messages | GET, POST, DELETE |
/mantle/v1/ai/generate-block | POST |
/mantle/v1/ai/plan-edit | POST |
/mantle/v1/ai/rewrite-block | POST |
id matches [0-9]+.
Communication (communication)
| Route | Methods |
|---|---|
/mantle/v1/channels | GET |
/mantle/v1/slack/<channel_name> | GET |
/mantle/v1/chat/slack/channel | POST |
/mantle/v1/chat/slack/ws-token | GET |
/mantle/v1/chat/slack/users | GET |
/mantle/v1/chat/attachments | POST |
channel_name matches \d+. The users route accepts an ids argument; attachments handles uploads. Both are declared to the front end by Communication_Module as usersRoute and attachmentsRoute.
Linchpin Licenses (linchpin_licenses)
| Route | Methods |
|---|---|
/mantle/v1/licenses/request-install | POST |
Adding routes from a module
Override get_rest_controllers() on your module. Mantle registers the returned controllers when the module initialises, so the routes automatically disappear when the module is disabled.
/** * REST controllers owned by this module. * * @return array */protected function get_rest_controllers(): array { return [ new Reports_REST(), ];}
Abstract_Module declares get_rest_controllers() as protected and returns an empty array by default, so override it with the same visibility.
See Creating a module for the full module contract.