The WordPress plugin exposes a WP REST proxy at /wp-json/brandfine/v1/*. Reference for plugin developers and integrators.
For most customers, the shortcode and Gutenberg block are all you
ever need. This page is for plugin developers or integrators
who want to call Brandfine from frontend JavaScript on a
WordPress page — without exposing the workspace API key in the
browser.
Brandfine's /external/* API expects an X-Api-Key header. The
workspace API key is broad-scope and should never reach a browser
bundle. The WP plugin holds the key server-side in wp_options
and exposes a thin WP REST proxy that:
Verifies a WordPress nonce (wp_rest action)
Per-IP rate-limits requests
Forwards to Brandfine with the X-Api-Key header attached
Returns Brandfine's response verbatim (preserving status codes
and body)
If you're integrating from outside the plugin's own widgets,
this is your interface.
If you're building a custom shortcode that needs to hit a
different Brandfine endpoint, the proxy is extensible from
includes/class-brandfine-rest.php.
Pattern: add a route in register_routes(), use
$this->forward($this->api->get('/external/...')) to relay
upstream. The permission callback (nonce + rate limit + connection
check) is shared across all routes.