Skip to main content
The embed system renders the full Recover dashboard inside your application via an iframe. Authentication is handled via short-lived tokens — your end users never need to create a Recover account or log in.

Generate Embed Token

POST /accounts/:id/embed-token
expires_in
integer
default:"28800"
Token lifetime in seconds. Default: 28800 (8 hours). Max: 86400 (24 hours).
view
string
default:"full"
Which view to show: full, conversations, leads, sequences, settings
user_name
string
Display name for the embedded user (shown in manual messages)
user_role
string
default:"admin"
Permission level: owner, admin, member
curl -X POST https://api.recoverbiz.com/v1/accounts/acc_8f3a1b2c/embed-token \
  -H "X-Partner-Key: pk_live_abc123def456..." \
  -H "Content-Type: application/json" \
  -d '{
    "expires_in": 28800,
    "view": "full",
    "user_name": "Jane Smith",
    "user_role": "admin"
  }'
Response: 200 OK
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "expires_at": "2026-02-15T18:30:00Z",
  "embed_url": "https://app.recoverbiz.com/embed?token=eyJhbGciOiJIUzI1NiIs..."
}

Iframe Setup

Drop a single iframe tag into your page:
<iframe
  id="recover-embed"
  src="https://app.recoverbiz.com/embed?token=YOUR_TOKEN_HERE"
  style="width: 100%; height: 700px; border: none; border-radius: 8px;"
  allow="clipboard-write"
></iframe>

View Modes

Control which part of the dashboard is visible:
ViewWhat It Shows
fullComplete dashboard with tab navigation (Conversations, Leads, Sequences, Settings)
conversationsConversation list + message view only
leadsLead management table with filters and import
sequencesSequence builder and enrollment
settingsAI configuration, context files, checklist setup
Append &view=conversations to the embed URL, or set it when generating the token.

White-Labeling

Branding is configured at the account level (see Create Account). The embed automatically applies:
  • Logo: Your logo replaces the default logo in the sidebar and header
  • Accent color: Buttons, links, and active states use your color
  • Company name: All AI references use the account’s company_name
The embed never shows Recover branding to your end users. It’s fully white-labeled.

Responsive Sizing

The embed is fully responsive. Set the iframe width to 100% and provide a minimum height of 500px. For best results, use height: calc(100vh - 64px) to fill the available viewport.
<iframe
  src="https://app.recoverbiz.com/embed?token=..."
  style="width: 100%; height: calc(100vh - 64px); border: none;"
></iframe>

Cross-Frame Events (postMessage API)

The embed communicates events to your parent window via postMessage. Listen for events to react to user actions inside the embed.
EventFires WhenData Fields
recover:conversation_selectedUser opens a conversationphone
recover:lead_status_changedLead status is updatedphone, status
recover:checklist_completedAll required documents collectedphone
recover:message_sentManual message sent from embedphone
recover:token_expiringToken expires in 5 minutes
window.addEventListener('message', (event) => {
  if (event.origin !== 'https://app.recoverbiz.com') return;

  const { type, data } = event.data;

  switch (type) {
    case 'recover:conversation_selected':
      console.log('User opened conversation:', data.phone);
      break;
    case 'recover:lead_status_changed':
      console.log('Lead status updated:', data.phone, data.status);
      break;
    case 'recover:checklist_completed':
      console.log('All documents collected for:', data.phone);
      break;
    case 'recover:message_sent':
      console.log('Manual message sent to:', data.phone);
      break;
    case 'recover:token_expiring':
      // Token expires in 5 minutes — refresh it
      refreshEmbedToken();
      break;
  }
});

Token Refresh

Tokens expire after the configured expires_in period. The embed emits a recover:token_expiring event 5 minutes before expiry. To refresh without a page reload:
async function refreshEmbedToken() {
  const res = await fetch('/your-backend/recover-token', { method: 'POST' });
  const { token } = await res.json();

  const iframe = document.getElementById('recover-embed');
  iframe.contentWindow.postMessage({
    type: 'recover:refresh_token',
    token: token
  }, 'https://app.recoverbiz.com');
}