RentalTideRentalTideDocs
Dashboard

App Bridge SDK

The @rentaltide/app-sdk API — createApp, host context, the scoped API proxy, theming, and host UI.

@rentaltide/app-sdk is the official client for embedded apps. It's framework -agnostic (plain postMessage under the hood) with zero runtime dependencies.

Bash

createApp()

TypeScript

createApp() resolves once the handshake completes and the initial context is available. It throws if not running inside a host iframe — handle that to show a friendly "open this from RentalTide" state.

Context

TypeScript
TypeScript

resource depends on the embed location — see scopes & embed locations.

Scoped API

Calls are proxied through the host and checked against the granted scopes. Your app never sees a token.

TypeScript

A call your app lacks a scope for returns { ok: false, status: 403, data: { error: 'insufficient_scope', requiredScope } }.

Theming

TypeScript

Keep your iframe background transparent so it blends into the host surface.

Host UI

TypeScript

Lifecycle

TypeScript

Full method reference

MemberDescription
app.contextLatest HostContext.
app.ready()Signal initial render complete.
app.onContextChange(cb)Subscribe to context changes → unsubscribe fn.
app.onThemeChange(cb)Subscribe to theme changes → unsubscribe fn.
app.api.get/post/put/patch/delete()Scoped API calls.
app.api.request(req)Low-level call with a full ApiRequest.
app.toast(message, severity?)Host snackbar.
app.navigate(path)Navigate the host.
app.resize(height?)Report height (auto by default).
app.refreshContext()Re-fetch context.
app.destroy()Tear down the bridge.
Was this page helpful?
Need help? Contact Support.See what’s new. Check out changelog.Questions? Book a video chat.
Ask AI
Responses are generated using AI and may contain mistakes.
Ask questions about RentalTide and get help with your integration.