This page is for developers building integrations: FleekDash exposes a REST API for integrations (list, activate/deactivate, settings, routes, MessageBus nonce) and a JavaScript SDK that your integration pages use inside iframes.
REST API (integration system)
Typical endpoints (under the FleekDash REST namespace):
List integrations – GET integrations (optional filters: active, category, search).
Single integration – GET integrations/:id.
Activate / deactivate – POST integrations/:id/activate, POST integrations/:id/deactivate.
Settings – GET/POST integrations/:id/settings.
Routes – GET integrations/routes (list registered routes), GET integrations/routes/validate?path=... (validate a path).
MessageBus nonce – GET integrations/messagebus/nonce (for CSRF-safe postMessage communication).
Use these from your own backend or from the FleekDash admin; your integration’s HTML/JS typically uses the SDK rather than calling the REST API directly from the iframe.
JavaScript SDK (iframe)
When your integration page loads inside FleekDash (via the route’s component_url), it should load the FleekDash SDK script and call FleekDashSDK.init({ integration_id: 'your-id', debug: true }).
The SDK provides:
Notifications – FleekDashSDK.showNotification(message, type) (success, error, warning, info).
Navigation – FleekDashSDK.navigate(path) to change the FleekDash app route.
WordPress data – FleekDashSDK.getWordPressData(endpoint, params) to call WordPress REST API with auth handled.
Settings – FleekDashSDK.getIntegrationSettings() to read your integration’s saved settings.
MessageBus – FleekDashSDK.sendMessage(type, data) and FleekDashSDK.onMessage(type, callback) for two-way communication with the parent app. Use the nonce from the REST endpoint for secure validation.
Security
The iframe runs in a sandbox; the SDK and nonce ensure that only your integration can send authenticated messages.
Never expose API keys or secrets in the client; use the integration settings (stored server-side) and the SDK only for non-sensitive UI actions.
Where to go next
Build integrations – Integration system overview (manifest, routes, Registry).
How-to guides – Tutorials for step-by-step workflows.
For full endpoint details and SDK method signatures, see the FleekDash plugin repository docs (API reference and SDK reference).