Overview
Every plugin iframe gets a Placet global object, the Bridge API. It provides access to message data, environment variables, file handling, HTTP requests, and UI controls.
Properties
Methods
Placet.resize()
Resizes the iframe to fit its content. Call this after rendering.
Placet.fetch(url, options)
Makes an HTTP request proxied through the backend server. Respects the maxHttpDomains permission.
HTTP requests are server-side proxied through the backend. The backend enforces domain
allowlists, permissions, and timeout limits (30s).
Placet.getFile(attachmentId)
Returns file content as a base64 data URL.
Placet.getFileUrl(attachmentId)
Returns a download URL for the file.
Placet.toast(message, variant)
Shows a toast notification in the parent UI.
Placet.emit(action, data)
Emits a custom action to the parent application.
Placet.respond(response)
Submits a review response. This is a one-time operation per pending review.
Placet.on(event, handler)
Listens for events from the parent application.
Complete Example