Step 1: Create a Sub-Account
Copy
curl -X POST https://api.recoverbiz.com/v1/accounts \
-H "X-Partner-Key: pk_live_abc123def456..." \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Lending",
"company_name": "Acme Lending Corp",
"phone_number": "+14155551234"
}'
Copy
{
"id": "acc_8f3a1b2c",
"name": "Acme Lending",
"slug": "acme-lending",
"status": "active",
"phone_number": "+14155551234",
"company_name": "Acme Lending Corp",
"created_at": "2026-02-15T10:30:00Z"
}
Step 2: Generate an Embed Token
Copy
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
}'
Copy
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"expires_at": "2026-02-15T18:30:00Z",
"embed_url": "https://app.recoverbiz.com/embed?token=eyJhbGciOiJIUzI1NiIs..."
}
Step 3: Embed the Dashboard
Copy
<iframe
src="https://app.recoverbiz.com/embed?token=eyJhbGciOiJIUzI1NiIs..."
style="width: 100%; height: 700px; border: none;"
allow="clipboard-write"
></iframe>
That’s it. Your customer now has a full AI SMS dashboard embedded in your platform.
Full Workflow Example
Here’s the complete setup end-to-end — account creation, checklist configuration, sequence setup, lead import, and embed:Copy
# 1. Create account
ACCOUNT_ID=$(curl -s -X POST https://api.recoverbiz.com/v1/accounts \
-H "X-Partner-Key: $PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Lending"}' | jq -r '.id')
# 2. Configure checklist
curl -X POST https://api.recoverbiz.com/v1/accounts/$ACCOUNT_ID/requirements \
-H "X-Partner-Key: $PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Government ID", "type": "document", "required": true}'
curl -X POST https://api.recoverbiz.com/v1/accounts/$ACCOUNT_ID/requirements \
-H "X-Partner-Key: $PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Bank Statements (3 months)", "type": "document", "required": true}'
# 3. Create a follow-up sequence
curl -X POST https://api.recoverbiz.com/v1/accounts/$ACCOUNT_ID/sequences \
-H "X-Partner-Key: $PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Application Recovery",
"is_active": true,
"is_default": true,
"steps": [
{"type": "fixed", "message": "Hi {{first_name}}, your application with {{company}} is almost complete. Need help with the last steps?", "delay_hours": 0},
{"type": "ai", "instructions": "Follow up on missing documents", "delay_hours": 24, "skip_if_replied": true}
]
}'
# 4. Import a lead (auto-enrolls in default sequence)
curl -X POST https://api.recoverbiz.com/v1/accounts/$ACCOUNT_ID/leads \
-H "X-Partner-Key: $PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155551234", "name": "John Doe", "auto_sequence": true}'
# 5. Generate embed token
EMBED_URL=$(curl -s -X POST https://api.recoverbiz.com/v1/accounts/$ACCOUNT_ID/embed-token \
-H "X-Partner-Key: $PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"expires_in": 28800}' | jq -r '.embed_url')
echo "Embed this in your app: $EMBED_URL"