📖

API Documentation

Developer reference for CloudFran REST APIs

CloudFran Agents — API Reference

CloudFran Agents API

Power your franchise with 20+ AI agents, enterprise CRM, loyalty programs, inventory management, and an intelligent training platform — all through a single, unified REST API designed for multi-tenant franchise operations at any scale.

150+
Endpoints
20+
AI Agents
300+
DB Tables
20
Industries

Introduction

The CloudFran Agents API provides programmatic access to every module on the platform. Whether you are building a custom franchise dashboard, connecting a mobile app, or automating workflows across hundreds of locations, this API is your single integration point.

Base URL: https://api.cloudfran.com/v1/
All requests use JSON and return JSON. Every request must include a valid API key and a X-Tenant-Id header to scope data to the correct franchise. The API supports multi-tenant isolation — a single key can manage one location or one thousand.
Quick Start: Get your API key from the Developer Portal, set your Authorization header, and make your first call in under two minutes.

Authentication

All API requests require authentication via a Bearer token. Keys are issued per developer account and scoped to a specific tenant.

Request Headers

Include these with every request:

Authorization: Bearer sk_live_your_api_key_here X-Tenant-Id: your-tenant-uuid Content-Type: application/json
Security: Never expose sk_live_ keys in client-side code. Use sk_test_ for development. Rotate keys via the Developer Portal.

Key Types

PrefixEnvironmentPurpose
sk_live_ProductionLive data, real transactions, billed usage
sk_test_SandboxTest data, unlimited calls, no billing
sk_admin_AdminPlatform-level ops (CloudFran SuperAdmin only)

Rate Limits & Tiers

Rate limits are enforced per API key. Exceeding your limit returns 429 Too Many Requests with a Retry-After header.

TierRate LimitMonthly CallsAI TokensPrice
Starter30/min10,000300K$99/mo
Professional60/min25,0001.5M$299/mo
Enterprise200/minUnlimitedCustom$999+/mo

Error Handling

Standard HTTP status codes with a consistent JSON error envelope.

{ "success": false, "error": { "code": "QUOTA_EXCEEDED", "message": "Monthly API call limit reached.", "status": 429, "retryAfter": 3600 } }
StatusMeaningCommon Codes
200Success
201Created
400Bad RequestINVALID_INPUT, MISSING_FIELD
401UnauthorizedINVALID_KEY, EXPIRED_KEY
403ForbiddenINSUFFICIENT_ROLE, TENANT_MISMATCH
404Not FoundRESOURCE_NOT_FOUND
429Rate LimitedQUOTA_EXCEEDED, RATE_LIMITED
500Server ErrorINTERNAL_ERROR

Webhooks

Receive real-time notifications when events occur. Configure endpoints in Webhook Management. All payloads include a signature header for verification.

Signature Verification

X-CloudFran-Signature: sha256=abc123... X-CloudFran-Timestamp: 1708200000

AI Agents

CloudFran's AI agents combine GPT-4 intelligence with franchise-specific business logic. Each agent specializes in a vertical task — from scheduling appointments to detecting fraud to coaching employees.

POST /api/ai/superagent/query Master orchestrator
SuperAgent is the master orchestrator that routes complex queries to the correct specialized agent. When a franchise manager asks “What were my best-selling items last month and should I reorder?”, SuperAgent decomposes the question, queries Inventory and Analytics agents, and returns a unified, actionable answer. Use SuperAgent when queries span multiple domains or when you want a single entry point for all AI capabilities.

Parameters

NameTypeDescription
queryrequiredstringNatural language question or command (max 4,000 chars)
contextoptionalobjectAdditional context: locationId, dateRange, industry
responseFormatoptionalstringOutput format: text (default), json, html
voiceEnabledoptionalboolIf true, returns audio URL alongside text response
var payload = new { query = "What were my top 5 selling items this month?", context = new { locationId = "loc-001", dateRange = "last_30_days" }, responseFormat = "json" }; var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/ai/superagent/query", payload); var result = await response.Content.ReadFromJsonAsync<SuperAgentResponse>();
response = requests.post( "https://api.cloudfran.com/v1/ai/superagent/query", headers=headers, json={ "query": "What were my top 5 selling items this month?", "context": {"locationId": "loc-001", "dateRange": "last_30_days"}, "responseFormat": "json" } ) data = response.json() print(data["answer"])
curl -X POST https://api.cloudfran.com/v1/ai/superagent/query \ -H "Authorization: Bearer sk_live_your_key" \ -H "X-Tenant-Id: your-tenant-id" \ -H "Content-Type: application/json" \ -d '{"query":"Top 5 selling items this month?","responseFormat":"json"}'
200Response
{ "success": true, "answer": "Your top 5 sellers this month are: 1. Classic Latte ($4,280)...", "agentsUsed": ["InventoryAgent", "AnalyticsAgent"], "tokensUsed": 1247, "confidence": 0.94 }
POST /api/ai/appointments/book AI-powered scheduling
AppointmentAgent handles intelligent appointment scheduling using natural language. A customer can say “I need a haircut next Tuesday afternoon” and the agent parses the intent, checks real-time availability, suggests optimal time slots, and sends confirmation via SMS and email with calendar attachments. Supports cancellation, rescheduling, automated reminders (24h and 1h before), and Google Calendar integration.

Parameters

NameTypeDescription
customerNamerequiredstringFull name of the customer
phonerequiredstringE.164 phone number for SMS confirmation
emailoptionalstringEmail for calendar invite
requestrequiredstringNatural language: “Haircut next Tuesday at 2pm”
serviceTypeoptionalstringService category for provider routing
locationIdoptionalstringSpecific franchise location
var payload = new { customerName = "Sarah Johnson", phone = "+12125551234", email = "sarah@example.com", request = "Deep tissue massage next Friday afternoon", serviceType = "Massage", locationId = "loc-downtown-001" }; var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/ai/appointments/book", payload);
response = requests.post( "https://api.cloudfran.com/v1/ai/appointments/book", headers=headers, json={ "customerName": "Sarah Johnson", "phone": "+12125551234", "request": "Deep tissue massage next Friday afternoon", "serviceType": "Massage" } ) for slot in response.json()["suggestedSlots"]: print(f"{slot['date']} at {slot['time']}")
curl -X POST https://api.cloudfran.com/v1/ai/appointments/book \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{"customerName":"Sarah Johnson","phone":"+12125551234","request":"Massage next Friday"}'
const response = await fetch("https://api.cloudfran.com/v1/ai/superagent/query", { method: "POST", headers: { "Authorization": "Bearer sk_live_your_key", "X-Tenant-Id": "your-tenant-id", "Content-Type": "application/json" }, body: JSON.stringify({ query: "What were my top 5 selling items this month?", context: { locationId: "loc-001", dateRange: "last_30_days" }, responseFormat: "json" }) }); const data = await response.json(); console.log(data.answer);
200Response
{ "success": true, "appointmentId": "apt-20260217-001", "suggestedSlots": [ {"date": "2026-02-21", "time": "13:00", "provider": "Maria G.", "duration": 60}, {"date": "2026-02-21", "time": "14:30", "provider": "James K.", "duration": 60}, {"date": "2026-02-21", "time": "16:00", "provider": "Maria G.", "duration": 60} ], "smsSent": true, "emailSent": true, "calendarLink": "https://api.cloudfran.com/v1/calendar/apt-20260217-001.ics" }
POST /api/ai/sms/campaign AI SMS outreach
SMSServicePersuader uses GPT-4 to craft personalized SMS outreach at scale. It generates unique messages for each recipient based on purchase history and engagement patterns. Handles A/B variant testing, opt-out compliance, Twilio delivery, and real-time performance tracking. Use cases: win-back campaigns, upsell offers after purchase, and appointment reminder sequences.

Parameters

NameTypeDescription
campaignNamerequiredstringName for tracking
recipientsrequiredarrayArray of {phone, name, tags} objects
promptrequiredstringCampaign goal in natural language
variantsoptionalintA/B variants to generate (1-5, default 2)
scheduleAtoptionaldatetimeISO 8601 datetime for scheduled send
var payload = new { campaignName = "February Win-Back", recipients = new[] { new { phone = "+12125551234", name = "Sarah J.", tags = new[]{"lapsed","vip"} } }, prompt = "Win back customers who haven't visited in 60+ days with 20% off", variants = 3 }; var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/ai/sms/campaign", payload);
response = requests.post( "https://api.cloudfran.com/v1/ai/sms/campaign", headers=headers, json={ "campaignName": "February Win-Back", "recipients": [{"phone": "+12125551234", "name": "Sarah J."}], "prompt": "Win back lapsed customers with 20% off", "variants": 3 } )
curl -X POST https://api.cloudfran.com/v1/ai/sms/campaign \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"campaignName":"Win-Back","recipients":[{"phone":"+12125551234"}],"prompt":"Win back lapsed customers"}'
POST /api/ai/voice/call AI outbound voice calls
VoiceAgent initiates AI-powered outbound voice calls via Twilio. Uses GPT-4 for real-time conversational intelligence, handling objections, booking appointments, and collecting feedback through natural speech. Supports IVR trees, call recording with transcription, and automatic CRM updates based on outcomes.

Parameters

NameTypeDescription
torequiredstringE.164 phone number to call
scriptrequiredstringAI prompt: conversation objective and talking points
voiceIdoptionalstringTTS voice: alloy, echo, nova, shimmer
recordCalloptionalboolRecord for compliance/training (default: false)
callbackUrloptionalstringWebhook URL for call status updates
var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/ai/voice/call", new { to = "+12125551234", script = "Confirm appointment for tomorrow at 2pm", voiceId = "nova" });
response = requests.post( "https://api.cloudfran.com/v1/ai/voice/call", headers=headers, json={"to": "+12125551234", "script": "Confirm appointment for tomorrow", "voiceId": "nova"} )
curl -X POST https://api.cloudfran.com/v1/ai/voice/call \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"to":"+12125551234","script":"Confirm appointment","voiceId":"nova"}'
POST /api/ai/fraud/analyze Real-time fraud analysis
FraudDetectionAgent analyzes transactions in real-time to identify refund abuse, POS theft, employee fraud, and anomalous patterns. Scores each transaction 0-100 and flags anything above your threshold. Learns from historical data to reduce false positives; can automatically trigger alerts, freeze accounts, or escalate to management.

Parameters

NameTypeDescription
transactionIdrequiredstringUnique transaction identifier
amountrequireddecimalTransaction amount in USD
typerequiredstringsale, refund, void, adjustment
employeeIdoptionalstringEmployee who processed the transaction
customerIdoptionalstringCustomer for pattern analysis
var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/ai/fraud/analyze", new { transactionId = "txn-2026-00482", amount = 147.50, type = "refund", employeeId = "emp-034" }); var result = await response.Content.ReadFromJsonAsync<FraudResult>(); if (result.RiskScore > 75) Console.WriteLine("HIGH RISK: " + result.Reason);
response = requests.post( "https://api.cloudfran.com/v1/ai/fraud/analyze", headers=headers, json={"transactionId": "txn-2026-00482", "amount": 147.50, "type": "refund"} ) data = response.json() if data["riskScore"] > 75: print(f"ALERT: {data['reason']}")
curl -X POST https://api.cloudfran.com/v1/ai/fraud/analyze \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"transactionId":"txn-2026-00482","amount":147.50,"type":"refund"}'
200Response
{ "success": true, "riskScore": 82, "riskLevel": "high", "reason": "3 refunds by same employee in 2 hours, avg refund 4x normal", "flags": ["velocity_anomaly", "amount_outlier"], "recommendation": "Review employee transactions and consider investigation" }
const response = await fetch("https://api.cloudfran.com/v1/ai/fraud/analyze", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ transactionId: "txn-2026-00482", amount: 147.50, type: "refund", employeeId: "emp-034" }) }); const { riskScore, reason } = await response.json(); if (riskScore > 75) console.warn("HIGH RISK:", reason);
POST /api/ai/sentiment/analyze Tone & intent classification
SentimentAnalysis classifies tone, intent, and emotional state of customer communications. Feed it an SMS reply, review, support ticket, or call transcript and receive structured sentiment breakdown including urgency, satisfaction, churn risk, and escalation need.

Parameters

NameTypeDescription
textrequiredstringText to analyze (max 10,000 chars)
sourceoptionalstringsms, review, ticket, transcript
response = requests.post( "https://api.cloudfran.com/v1/ai/sentiment/analyze", headers=headers, json={"text": "I've been waiting 45 minutes!", "source": "review"} ) # Returns: sentiment, urgency, churn_risk, recommended_action
curl -X POST https://api.cloudfran.com/v1/ai/sentiment/analyze \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"text":"Waiting 45 minutes!","source":"review"}'
GET /api/analytics/predictive 30/60/90-day forecasting
Predictive Analytics generates revenue forecasts, churn predictions, and trend analysis. Analyzes historical transactions, seasonal patterns, and external factors for 30, 60, and 90-day projections with confidence intervals and actionable recommendations per location.

Parameters

NameTypeDescription
periodoptionalstring30d, 60d, 90d (default: 30d)
locationIdoptionalstringFilter to specific location
industryoptionalstringIndustry filter for benchmarking
curl -G https://api.cloudfran.com/v1/analytics/predictive \ -H "Authorization: Bearer sk_live_your_key" \ -d period=90d -d industry=restaurant
const response = await fetch("https://api.cloudfran.com/v1/ai/sentiment/analyze", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ text: "I've been waiting 45 minutes! This is unacceptable.", source: "review" }) }); const { sentiment, urgency, churnRisk } = await response.json();
response = requests.get( "https://api.cloudfran.com/v1/analytics/predictive", headers=headers, params={"period": "90d", "industry": "restaurant"} )
POST /api/ai/prospect/enrich Firmographic enrichment
ProspectIntel enriches lead data with firmographic intelligence. Provide a company name, domain, or phone and receive industry classification, estimated revenue, employee count, decision-maker contacts, and a lead quality score.

Parameters

NameTypeDescription
companyNameoptionalstringCompany name to research
domainoptionalstringWebsite domain for enrichment
phoneoptionalstringPhone for reverse lookup
response = requests.post( "https://api.cloudfran.com/v1/ai/prospect/enrich", headers=headers, json={"companyName": "Downtown Pizza", "domain": "downtownpizza.com"} ) print(f"Industry: {response.json()['industry']}")
curl -X POST https://api.cloudfran.com/v1/ai/prospect/enrich \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"companyName":"Downtown Pizza"}'

CRM & Lead Management

Complete customer lifecycle management with 30+ pages covering pipeline tracking, health scoring, commission analytics, bulk campaigns, media management, and AI-powered follow-ups.

POST /api/leads/create Ingest new lead
Lead Creation ingests leads from any source — web forms, social media, referrals, or partner integrations. Auto-deduplicates by phone/email, assigns lead score based on source quality, and can trigger Autopilot nurturing for immediate follow-up.

Parameters

NameTypeDescription
namerequiredstringFull name
phonerequiredstringPhone (E.164)
emailoptionalstringEmail address
sourceoptionalstringweb, referral, social, partner, walk-in
autoNurtureoptionalboolAuto-enroll in Autopilot (default: true)
var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/leads/create", new { name = "Jennifer Park", phone = "+14155559012", source = "web", autoNurture = true });
response = requests.post( "https://api.cloudfran.com/v1/leads/create", headers=headers, json={"name": "Jennifer Park", "phone": "+14155559012", "source": "web"} )
curl -X POST https://api.cloudfran.com/v1/leads/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Jennifer Park","phone":"+14155559012","source":"web"}'
GET /api/crm/customers Customer list
Retrieve the full customer list with lifecycle stage, lifetime value, visit frequency, and health score. Filter by segment, tag, or acquisition date.
curl -G https://api.cloudfran.com/v1/crm/customers \ -H "Authorization: Bearer sk_live_your_key"
GET /api/crm/pipeline/deals Pipeline deals
Sales pipeline with Kanban-style deal stages. Track deal values, probability, expected close dates, and assigned reps. Integrates with commission tracking.
curl -G https://api.cloudfran.com/v1/crm/pipeline/deals \ -H "Authorization: Bearer sk_live_your_key"
GET /api/crm/health-scores AI churn risk
Health Scores (0-100) factor visit recency, spend trends, and sentiment. Customers below 40 are flagged at-risk and can auto-trigger win-back campaigns.
curl -G https://api.cloudfran.com/v1/crm/health-scores \ -H "Authorization: Bearer sk_live_your_key"
POST /api/crm/campaigns/create Create campaign
Multi-channel marketing campaigns targeting CRM segments. Supports email, SMS, and drip sequences with AI-generated content, delivery tracking, and ROI calculation.
curl -X POST https://api.cloudfran.com/v1/crm/campaigns/create \ -H "Authorization: Bearer sk_live_your_key"

Communication (Twilio)

Send SMS, MMS, and voice calls with built-in compliance, opt-out management, A2P brand registration, and delivery tracking.

POST /api/twilio/send-sms Send SMS/MMS
Send individual SMS or MMS messages through Twilio with automatic opt-out compliance, segment estimation for billing, and delivery status tracking. Supports media URLs for MMS and personalized merge fields.

Parameters

NameTypeDescription
torequiredstringRecipient phone (E.164)
messagerequiredstringMessage body (max 1,600 chars)
mediaUrloptionalstringURL for MMS image attachment
var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/twilio/send-sms", new { to = "+12125551234", message = "Your appointment is confirmed for tomorrow at 2pm!" });
response = requests.post( "https://api.cloudfran.com/v1/twilio/send-sms", headers=headers, json={"to": "+12125551234", "message": "Your appointment is confirmed!"} )
curl -X POST https://api.cloudfran.com/v1/twilio/send-sms \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"to":"+12125551234","message":"Appointment confirmed!"}'
POST /api/twilio/make-call Initiate outbound call
Programmatic outbound voice calls via Twilio. Supports TwiML for IVR trees, call recording, real-time status callbacks, and AI-powered conversations.
curl -X POST https://api.cloudfran.com/v1/twilio/make-call \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
const response = await fetch("https://api.cloudfran.com/v1/twilio/send-sms", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ to: "+12125551234", message: "Your appointment is confirmed for tomorrow at 2pm!" }) }); const { messageId, status } = await response.json();
POST /api/twilio/brand-register A2P 10DLC registration
Register your business brand for A2P 10DLC compliance. Required for sending commercial SMS at scale in the US.
curl -X POST https://api.cloudfran.com/v1/twilio/brand-register \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/email/send Send email
Transactional and marketing emails through SendGrid. HTML templates, merge fields, attachments, and open/click tracking with opt-out compliance.
curl -X POST https://api.cloudfran.com/v1/email/send \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"

Training & LMS

A complete LMS with 1,300+ courses across 20 industries, AI tutoring, certificate generation, audio narration, quiz assessments, and manager reporting.

GET /api/lms/courses Course catalog
Browse the full course catalog with filtering by industry, category, difficulty, and duration. Each course includes module breakdown, quiz availability, audio narration status, and completion stats. Supports QSR, Retail, Fitness, Healthcare, Automotive, and 15 more industries.

Parameters

NameTypeDescription
industryoptionalstringFilter: restaurant, retail, fitness, healthcare...
categoryoptionalstringFilter: sales, compliance, onboarding, leadership...
pageoptionalintPage number (default: 1)
pageSizeoptionalintResults per page (max 50)
response = requests.get( "https://api.cloudfran.com/v1/lms/courses", headers=headers, params={"industry": "restaurant", "category": "sales", "page": 1} ) for course in response.json()["courses"]: print(f"{course['title']} ({course['duration']}min)")
curl -G https://api.cloudfran.com/v1/lms/courses \ -H "Authorization: Bearer sk_live_your_key" \ -d industry=restaurant -d page=1
POST /api/lms/enroll Enroll student
Enroll employees in courses or curriculum tracks. Supports bulk enrollment for teams, prerequisite validation, and automatic progress tracking.
curl -X POST https://api.cloudfran.com/v1/lms/enroll \ -H "Authorization: Bearer sk_live_your_key"
GET /api/lms/progress Track progress
Real-time completion tracking per student including module progress, quiz scores, time spent, and estimated completion date. Manager view aggregates team stats.
curl -G https://api.cloudfran.com/v1/lms/progress \ -H "Authorization: Bearer sk_live_your_key"
GET /api/lms/certificate/{id} Get certificate
Generate and retrieve completion certificates as downloadable PDFs. Certificates include QR verification codes, completion dates, and course details.
curl -G https://api.cloudfran.com/v1/lms/certificate/{id} \ -H "Authorization: Bearer sk_live_your_key"
POST /api/lms/ai-tutor/ask AI Tutor
Context-aware Q&A on course material. Students ask questions and the AI Tutor responds using RAG (Retrieval Augmented Generation) grounded in the actual course content.
curl -X POST https://api.cloudfran.com/v1/lms/ai-tutor/ask \ -H "Authorization: Bearer sk_live_your_key"

Loyalty & Wallet

Full loyalty program with points, tiers, digital wallet, gift cards, peer transfers, QR check-ins, referral rewards, and automated promotions across all franchise locations.

GET /api/loyalty/wallet/{memberId} Wallet balance
Retrieve a member's wallet balance, points history, tier status, active rewards, and upcoming promotions. The wallet supports prepaid funds (via Stripe), earned points, gift card balances, and auto-reload rules.

Parameters

NameTypeDescription
memberIdrequiredstringLoyalty member ID
response = requests.get( "https://api.cloudfran.com/v1/loyalty/wallet/LM001", headers=headers ) wallet = response.json() print(f"Points: {wallet['points']}, Tier: {wallet['tier']}, Balance: ${wallet['walletBalance']}")
curl -G https://api.cloudfran.com/v1/loyalty/wallet/LM001 \ -H "Authorization: Bearer sk_live_your_key"
200Response
{ "memberId": "LM001", "points": 2450, "tier": "Gold", "walletBalance": 45.00, "lifetimeSpend": 1280.50, "nextTierAt": 3000, "activeRewards": [{"name": "Free Coffee", "expiresAt": "2026-03-15"}], "streakDays": 12 }
const response = await fetch( "https://api.cloudfran.com/v1/loyalty/wallet/LM001", { headers } ); const wallet = await response.json(); console.log(`Points: ${wallet.points}, Tier: ${wallet.tier}`);
POST /api/loyalty/earn Earn points
Award points to a member for purchases, check-ins, referrals, or custom events. Points are calculated based on spend amount and tier multiplier.
curl -X POST https://api.cloudfran.com/v1/loyalty/earn \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/loyalty/redeem Redeem reward
Redeem points for available rewards. Validates point balance, checks reward availability, and records the redemption with receipt.
curl -X POST https://api.cloudfran.com/v1/loyalty/redeem \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/loyalty/transfer Transfer points
Peer-to-peer point transfers between loyalty members. Both parties receive confirmation via SMS.
curl -X POST https://api.cloudfran.com/v1/loyalty/transfer \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/loyalty/checkin Check-in
Record a member check-in at a franchise location via QR scan, phone number, or member ID. Awards check-in bonus points and updates streak tracking.
curl -X POST https://api.cloudfran.com/v1/loyalty/checkin \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"

Loyalty — Extended

Advanced loyalty operations: member management, gift cards, QR login, referral tracking, automated promotions, streaks, and gamification badges.

POST/api/loyalty/members/joinJoin program
Register a new loyalty member. Creates wallet, assigns welcome bonus points, and sends onboarding SMS/email with digital membership card.

Parameters

NameTypeDescription
namerequiredstringMember full name
phonerequiredstringPhone (E.164)
emailoptionalstringEmail address
locationIdoptionalstringJoining location
const response = await fetch("https://api.cloudfran.com/v1/loyalty/members/join", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Maria Santos", phone: "+12125559876", email: "maria@example.com", locationId: "loc-downtown" }) }); const { memberId, welcomePoints } = await response.json();
response = requests.post( "https://api.cloudfran.com/v1/loyalty/members/join", headers=headers, json={"name": "Maria Santos", "phone": "+12125559876", "locationId": "loc-downtown"} )
curl -X POST https://api.cloudfran.com/v1/loyalty/members/join \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Maria Santos","phone":"+12125559876"}'
200Response
{ "success": true, "memberId": "LM00247", "welcomePoints": 100, "tier": "Bronze", "walletBalance": 0.00, "membershipCard": "https://api.cloudfran.com/v1/loyalty/card/LM00247" }
POST/api/loyalty/gift-cards/purchasePurchase gift card
Purchase a digital gift card. Generates a unique code, creates a branded digital card image, and optionally sends to a recipient via SMS/email.

Parameters

NameTypeDescription
amountrequireddecimalCard value in USD
recipientNameoptionalstringGift recipient name
recipientPhoneoptionalstringSend via SMS
recipientEmailoptionalstringSend via email
messageoptionalstringPersonal message
const response = await fetch("https://api.cloudfran.com/v1/loyalty/gift-cards/purchase", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ amount: 50.00, recipientName: "Alex", recipientEmail: "alex@example.com", message: "Happy Birthday!" }) });
curl -X POST https://api.cloudfran.com/v1/loyalty/gift-cards/purchase \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"amount":50.00,"recipientEmail":"alex@example.com"}'
POST/api/loyalty/referral/createCreate referral
Generate a unique referral link/code for a loyalty member. When a referred customer joins and makes their first purchase, both the referrer and referee earn bonus points.

Parameters

NameTypeDescription
memberIdrequiredstringReferring member
channeloptionalstringsms, email, link
const response = await fetch("https://api.cloudfran.com/v1/loyalty/referral/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ memberId: "LM001", channel: "sms" }) }); const { referralCode, shareUrl } = await response.json();
curl -X POST https://api.cloudfran.com/v1/loyalty/referral/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"memberId":"LM001","channel":"sms"}'
POST/api/loyalty/wallet/add-fundsAdd wallet funds
Top up a member's digital wallet via Stripe payment. Supports auto-reload rules (e.g., reload $25 when balance drops below $5).

Parameters

NameTypeDescription
memberIdrequiredstringMember ID
amountrequireddecimalAmount to add
paymentMethodIdoptionalstringStripe payment method
autoReloadoptionalobject{threshold, reloadAmount} for auto-reload
response = requests.post( "https://api.cloudfran.com/v1/loyalty/wallet/add-funds", headers=headers, json={"memberId": "LM001", "amount": 50.00, "autoReload": {"threshold": 5, "reloadAmount": 25}} )
curl -X POST https://api.cloudfran.com/v1/loyalty/wallet/add-funds \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"memberId":"LM001","amount":50.00}'
POST/api/loyalty/qr-loginQR login
Authenticate a loyalty member by scanning a QR code at a physical location. Returns a session token and member details for the POS system.

Parameters

NameTypeDescription
qrCoderequiredstringScanned QR code value
locationIdrequiredstringScanning location
const response = await fetch("https://api.cloudfran.com/v1/loyalty/qr-login", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ qrCode: "LM001-QR-2026", locationId: "loc-downtown" }) }); const { member, sessionToken } = await response.json();
curl -X POST https://api.cloudfran.com/v1/loyalty/qr-login \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"qrCode":"LM001-QR-2026","locationId":"loc-downtown"}'
GET/api/loyalty/members/{id}/historyTransaction history
Complete loyalty transaction history: points earned, redeemed, transferred, and expired. Includes purchase amounts, location, and timestamps.

Parameters

NameTypeDescription
memberIdrequiredstringMember ID
typeoptionalstringearn, redeem, transfer, all
pageoptionalintPage number
curl -G https://api.cloudfran.com/v1/loyalty/members/LM001/history \ -H "Authorization: Bearer sk_live_your_key" \ -d type=all -d page=1
GET/api/loyalty/promotions/activeActive promotions
List all active loyalty promotions: double points events, bonus offers, tier challenges, and seasonal campaigns.

Parameters

NameTypeDescription
locationIdoptionalstringFilter by location
const response = await fetch( "https://api.cloudfran.com/v1/loyalty/promotions/active", { headers } ); const promos = await response.json(); promos.forEach(p => console.log(`${p.name}: ${p.description}`));
curl -G https://api.cloudfran.com/v1/loyalty/promotions/active \ -H "Authorization: Bearer sk_live_your_key"

Inventory Management

Franchise-grade supply chain with multi-location stock tracking, inter-store transfers, barcode/QR support, audit trails, bulk CSV import/export, and AI-powered reorder suggestions.

GET /api/inventory/items List inventory items
Retrieve inventory items with filtering by category, location, status, and barcode. Supports server-side pagination (50 items/page), instant search, and industry-specific views. Each item includes stock levels, reorder points, cost/price, and supplier information.

Parameters

NameTypeDescription
categoryoptionalstringFilter by category
storeIdoptionalstringFilter by store location
statusoptionalstringactive, low_stock, out_of_stock, discontinued
searchoptionalstringFull-text search across name, SKU, barcode
response = requests.get( "https://api.cloudfran.com/v1/inventory/items", headers=headers, params={"storeId": "store-downtown", "status": "low_stock"} ) for item in response.json()["items"]: print(f"{item['sku']}: {item['name']} - {item['quantity']} in stock")
curl -G https://api.cloudfran.com/v1/inventory/items \ -H "Authorization: Bearer sk_live_your_key" \ -d status=low_stock -d storeId=store-downtown
POST /api/inventory/transfer Transfer stock
Two-phase commit inter-store transfers. Stock is deducted from the source and placed in escrow until the destination store accepts or rejects. Full audit trail with timestamps and user attribution.
curl -X POST https://api.cloudfran.com/v1/inventory/transfer \ -H "Authorization: Bearer sk_live_your_key"
const response = await fetch( "https://api.cloudfran.com/v1/inventory/items?status=low_stock&storeId=store-downtown", { headers } ); const { items } = await response.json(); items.forEach(i => console.log(`${i.sku}: ${i.name} - ${i.quantity} in stock`));
GET /api/inventory/items/{id}/history Audit trail
Forensic history log for any inventory item. Every edit, transfer, sale, and adjustment is timestamped with user attribution. Essential for investigating shrinkage and counting errors.
curl -G https://api.cloudfran.com/v1/inventory/items/{id}/history \ -H "Authorization: Bearer sk_live_your_key"

Franchise Exchange

B2B marketplace where franchise brands post projects and vetted service providers bid, deliver, and get paid. Features escrow, milestone billing, dispute resolution, and reputation management.

GET /api/exchange/projects Browse projects
Browse open projects posted by franchise brands. Filter by category (marketing, IT, operations, design), budget range, and deadline. Each project includes requirements, milestones, and current proposal count.
curl -G https://api.cloudfran.com/v1/exchange/projects \ -H "Authorization: Bearer sk_live_your_key"
POST /api/exchange/proposals/submit Submit proposal
Submit a proposal for a project with pricing, timeline, deliverables, and a cover message. Supports milestone-based billing where payment is released as each deliverable is approved.
curl -X POST https://api.cloudfran.com/v1/exchange/proposals/submit \ -H "Authorization: Bearer sk_live_your_key"
POST /api/exchange/disputes/file File dispute
Initiate a dispute on a project when deliverables don't meet requirements. Triggers escrow freeze, assigns a mediator, and provides structured resolution workflow with evidence uploads.
curl -X POST https://api.cloudfran.com/v1/exchange/disputes/file \ -H "Authorization: Bearer sk_live_your_key"

Franchise Exchange — Extended

Complete B2B marketplace operations: project posting, AI-powered negotiation, milestone delivery, escrow payments, reviews, and dispute resolution.

POST/api/exchange/projects/createPost project
Create a new project for service providers to bid on. Define scope, budget, milestones, required skills, and deadline. Projects are immediately visible in the marketplace to qualified sellers.

Parameters

NameTypeDescription
titlerequiredstringProject title
descriptionrequiredstringDetailed requirements
budgetrequiredobject{min, max} range in USD
categoryrequiredstringmarketing, IT, operations, design
milestonesoptionalarrayDelivery milestones with amounts
deadlineoptionaldatetimeProject deadline
const response = await fetch("https://api.cloudfran.com/v1/exchange/projects/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ title: "Rebrand 5 franchise locations", description: "Need complete rebrand including signage, menus, uniforms", budget: { min: 5000, max: 15000 }, category: "design", milestones: [ { name: "Concepts", amount: 3000 }, { name: "Production", amount: 7000 }, { name: "Installation", amount: 5000 } ] }) });
response = requests.post( "https://api.cloudfran.com/v1/exchange/projects/create", headers=headers, json={"title": "Rebrand 5 locations", "budget": {"min": 5000, "max": 15000}, "category": "design"} )
curl -X POST https://api.cloudfran.com/v1/exchange/projects/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"title":"Rebrand 5 locations","budget":{"min":5000,"max":15000},"category":"design"}'
POST/api/exchange/ai-negotiateAI negotiation
Start an AI-powered negotiation session between buyer and seller. The AI analyzes both parties' positions, market rates, and project scope to suggest fair terms. Supports multi-round negotiation with counter-offers.

Parameters

NameTypeDescription
projectIdrequiredstringProject ID
proposalIdrequiredstringProposal to negotiate
positionoptionalstringYour negotiation stance and priorities
const response = await fetch("https://api.cloudfran.com/v1/exchange/ai-negotiate", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ projectId: "proj-001", proposalId: "prop-042", position: "Budget is firm at $12K but flexible on timeline" }) });
curl -X POST https://api.cloudfran.com/v1/exchange/ai-negotiate \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"projectId":"proj-001","proposalId":"prop-042"}'
POST/api/exchange/deliverables/uploadUpload deliverables
Upload project deliverables for milestone completion. Supports multiple files, version tracking, and buyer approval workflow. Payment is released from escrow upon approval.

Parameters

NameTypeDescription
projectIdrequiredstringProject ID
milestoneIdrequiredstringMilestone being completed
filesrequiredfile[]Deliverable files (multipart)
notesoptionalstringDelivery notes for buyer
curl -X POST https://api.cloudfran.com/v1/exchange/deliverables/upload \ -H "Authorization: Bearer sk_live_your_key" \ -F projectId=proj-001 -F milestoneId=ms-002 -F files=@design.zip -F notes="Final concepts"
POST/api/exchange/deliverables/approveApprove delivery
Approve a milestone delivery to release escrow payment to the seller. Triggers payment processing, updates project status, and sends notification to seller.

Parameters

NameTypeDescription
projectIdrequiredstringProject ID
milestoneIdrequiredstringMilestone to approve
ratingoptionalintQuality rating 1-5
const response = await fetch("https://api.cloudfran.com/v1/exchange/deliverables/approve", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ projectId: "proj-001", milestoneId: "ms-002", rating: 5 }) });
curl -X POST https://api.cloudfran.com/v1/exchange/deliverables/approve \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"projectId":"proj-001","milestoneId":"ms-002","rating":5}'
POST/api/exchange/payments/processProcess payment
Process escrow payment release for an approved milestone. Funds are transferred to the seller's connected Stripe account minus platform fees.

Parameters

NameTypeDescription
projectIdrequiredstringProject ID
milestoneIdrequiredstringApproved milestone
curl -X POST https://api.cloudfran.com/v1/exchange/payments/process \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"projectId":"proj-001","milestoneId":"ms-002"}'
POST/api/exchange/reviews/submitLeave review
Submit a review for a completed project. Reviews are visible on seller profiles and factor into the platform's trust score algorithm.

Parameters

NameTypeDescription
projectIdrequiredstringProject ID
ratingrequiredintOverall rating 1-5
reviewrequiredstringWritten review
categoriesoptionalobject{quality, communication, timeliness} ratings 1-5
const response = await fetch("https://api.cloudfran.com/v1/exchange/reviews/submit", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ projectId: "proj-001", rating: 5, review: "Exceptional work, delivered ahead of schedule.", categories: { quality: 5, communication: 5, timeliness: 5 } }) });
curl -X POST https://api.cloudfran.com/v1/exchange/reviews/submit \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"projectId":"proj-001","rating":5,"review":"Exceptional work"}'
POST/api/exchange/stripe-onboardingSeller onboarding
Initiate Stripe Connect onboarding for a new seller. Returns a URL to Stripe's onboarding flow where the seller enters banking details and identity verification.

Parameters

NameTypeDescription
sellerIdrequiredstringSeller profile ID
returnUrlrequiredstringReturn URL after onboarding
curl -X POST https://api.cloudfran.com/v1/exchange/stripe-onboarding \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"sellerId":"seller-001","returnUrl":"https://myapp.com/exchange"}'
GET/api/exchange/messages/{projectId}Project messages
Retrieve the message thread for a project. Includes all buyer-seller communications, file attachments, and system notifications.

Parameters

NameTypeDescription
projectIdrequiredstringProject ID
const response = await fetch( "https://api.cloudfran.com/v1/exchange/messages/proj-001", { headers } ); const { messages } = await response.json();
curl -G https://api.cloudfran.com/v1/exchange/messages/proj-001 \ -H "Authorization: Bearer sk_live_your_key"

AI Workbench

Suite of AI-powered business tools including image generation (DALL-E), data analysis, business advisory, content writing, and employee coaching.

POST /api/workbench/image/generate Generate image
Generate marketing images using DALL-E. Specify style, dimensions, and brand guidelines. Images are stored in Azure Blob Storage with usage tracking and billing per generation.
curl -X POST https://api.cloudfran.com/v1/workbench/image/generate \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/workbench/data/analyze Analyze data
Upload CSV or JSON data for AI-powered analysis. Returns insights, trends, anomalies, and visualizations. Supports revenue analysis, customer segmentation, and operational efficiency metrics.
curl -X POST https://api.cloudfran.com/v1/workbench/data/analyze \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/workbench/advisor/ask Business advisor
AI business advisor trained on franchise best practices. Ask questions about operations, marketing strategy, financial planning, or employee management and receive actionable recommendations.
curl -X POST https://api.cloudfran.com/v1/workbench/advisor/ask \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"

Google Business Profile

Manage Google Business Profile listings across all franchise locations. Sync business info, fetch and respond to reviews with AI, track analytics, and maintain consistent NAP data.

GET /api/gbp/locations List locations
Retrieve all Google Business Profile locations linked to your franchise. Each location includes address, hours, category, attributes, and real-time metrics like search impressions and direction requests.
curl -G https://api.cloudfran.com/v1/gbp/locations \ -H "Authorization: Bearer sk_live_your_key"
GET /api/gbp/reviews Fetch reviews
Fetch Google reviews for all locations with rating, text, reviewer name, and response status. Filter by rating, date range, or response status for review management workflows.
curl -G https://api.cloudfran.com/v1/gbp/reviews \ -H "Authorization: Bearer sk_live_your_key"
POST /api/gbp/reviews/{id}/respond Respond to review
Post a response to a Google review. Supports AI-generated responses that match your brand voice, or manual responses. Auto-response rules can be configured based on rating and sentiment.
curl -X POST https://api.cloudfran.com/v1/gbp/reviews/{id}/respond \ -H "Authorization: Bearer sk_live_your_key"
GET/api/v1/gbp/analytics/summaryGBP analytics
Aggregated Google Business Profile analytics: search impressions, map views, direction requests, phone calls, website clicks, and photo views across all locations.

Parameters

NameTypeDescription
tenantIdrequiredstringTenant ID
periodoptionalstring7d, 30d, 90d
const response = await fetch( "https://api.cloudfran.com/v1/gbp/analytics/summary?period=30d", { headers } ); const { impressions, directionRequests, phoneCalls } = await response.json();
curl -G https://api.cloudfran.com/v1/gbp/analytics/summary \ -H "Authorization: Bearer sk_live_your_key" \ -d period=30d
200Response
{ "period": "30d", "totalImpressions": 24580, "searchImpressions": 18420, "mapImpressions": 6160, "directionRequests": 847, "phoneCalls": 312, "websiteClicks": 1204, "photoViews": 3891 }

Compliance

TCPA, CCPA, and GDPR compliance tools including double opt-in recording, do-not-sell flags, data export, and data deletion with full audit trails.

POST /api/compliance/opt-in Record opt-in
Record explicit double opt-in consent for SMS and email communications. Stores consent timestamp, IP address, consent language, and channel. Required for TCPA compliance.
curl -X POST https://api.cloudfran.com/v1/compliance/opt-in \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"
POST /api/compliance/do-not-sell CCPA Do Not Sell
Flag a customer's data as 'Do Not Sell' per CCPA requirements. Immediately suppresses the record from all marketing campaigns, data exports, and third-party sharing.
curl -X POST https://api.cloudfran.com/v1/compliance/do-not-sell \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json"

Billing & Usage

Track API consumption, manage subscription plans, and report business outcomes for performance-based billing.

GET /api/usage/monthly Monthly usage
Retrieve current month usage statistics including API calls, AI tokens consumed, SMS sent, voice minutes, and storage used. Includes quota remaining and projected overages.

Parameters

NameTypeDescription
monthoptionalstringYYYY-MM format (default: current month)
curl -G https://api.cloudfran.com/v1/usage/monthly \ -H "Authorization: Bearer sk_live_your_key" \ -d month=2026-02
response = requests.get( "https://api.cloudfran.com/v1/usage/monthly", headers=headers, params={"month": "2026-02"} ) usage = response.json() print(f"API Calls: {usage['apiCalls']}/{usage['apiCallLimit']}")
200Response
{ "month": "2026-02", "apiCalls": 8432, "apiCallLimit": 25000, "tokensUsed": 847200, "tokenLimit": 1500000, "smsSent": 1204, "voiceMinutes": 42, "storageUsedMB": 856, "estimatedCost": 299.00, "projectedOverage": 0.00 }
const response = await fetch( "https://api.cloudfran.com/v1/usage/monthly?month=2026-02", { headers } ); const usage = await response.json(); console.log(`API Calls: ${usage.apiCalls}/${usage.apiCallLimit}`);
POST /api/outcomes/report Report outcome
Report business outcomes (bookings, sales, conversions) for performance-based billing. CloudFran tracks which agent actions led to revenue, enabling ROI calculation and outcome-based pricing models.

Parameters

NameTypeDescription
typerequiredstringbooking, sale, conversion, lead_qualified
valuerequireddecimalRevenue value in USD
agentIdoptionalstringAgent that drove the outcome
customerIdoptionalstringCustomer associated with outcome
curl -X POST https://api.cloudfran.com/v1/outcomes/report \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"type":"booking","value":125.00,"agentId":"appointment-agent"}'

Support & Help Desk

AI-powered support with ticket routing, knowledge base, and satisfaction tracking.

POST/api/support/askAI support assistant
AI Support answers questions using RAG grounded in your knowledge base and platform docs. Understands user context, recent activity, and open tickets. If unresolved, automatically creates a ticket with conversation context.

Parameters

NameTypeDescription
questionrequiredstringQuestion in natural language
categoryoptionalstringbilling, technical, account, general
userIdoptionalstringUser ID for context
var response = await client.PostAsJsonAsync( "https://api.cloudfran.com/v1/support/ask", new { question = "How do I set up A2P brand registration?", category = "technical" });
const response = await fetch("https://api.cloudfran.com/v1/support/ask", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ question: "How do I set up A2P?", category: "technical" }) }); const data = await response.json();
response = requests.post( "https://api.cloudfran.com/v1/support/ask", headers=headers, json={"question": "How do I set up A2P?", "category": "technical"} )
curl -X POST https://api.cloudfran.com/v1/support/ask \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"question":"How do I set up A2P?","category":"technical"}'
200Response
{ "success": true, "answer": "To set up A2P brand registration: 1. Navigate to Twilio > A2P Brand Register...", "confidence": 0.91, "sources": ["help-article-042"], "ticketCreated": false}
POST/api/support/create-ticketCreate ticket
Create a support ticket with auto-assignment, SLA timers, and email notifications. Supports attachments and rich text.

Parameters

NameTypeDescription
subjectrequiredstringTicket subject
descriptionrequiredstringIssue description
categoryrequiredstringbilling, technical, account
priorityoptionalstringlow, medium, high, urgent
const response = await fetch("https://api.cloudfran.com/v1/support/create-ticket", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ subject: "SMS delivery failures", description: "30% failure rate on February campaign", category: "technical", priority: "high" }) });
response = requests.post( "https://api.cloudfran.com/v1/support/create-ticket", headers=headers, json={"subject": "SMS failures", "category": "technical", "priority": "high"} )
curl -X POST https://api.cloudfran.com/v1/support/create-ticket \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"subject":"SMS failures","category":"technical","priority":"high"}'
GET/api/support/ticketsList tickets
Retrieve tickets with filtering by status, priority, and assigned agent. Includes conversation threads and SLA status.

Parameters

NameTypeDescription
statusoptionalstringopen, in_progress, resolved, closed
assignedTooptionalstringFilter by agent
const response = await fetch("https://api.cloudfran.com/v1/support/tickets?status=open", { headers }); const tickets = await response.json();
curl -G https://api.cloudfran.com/v1/support/tickets \ -H "Authorization: Bearer sk_live_your_key" \ -d status=open
POST/api/support/tickets/{ticketId}/replyReply to ticket
Add reply to ticket. Both customers and agents can reply. Triggers email notifications and updates SLA timer.

Parameters

NameTypeDescription
ticketIdrequiredstringTicket ID (URL path)
messagerequiredstringReply content
isInternaloptionalboolInternal note only
curl -X POST https://api.cloudfran.com/v1/support/tickets/TKT-001/reply \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"message":"Working on a fix.","isInternal":false}'

Knowledge Base

AI-powered knowledge base with chat, search, and automated article generation.

POST/api/help/chatHelp chat
Conversational help powered by AI with multi-turn context. References KB articles, docs, and account data.

Parameters

NameTypeDescription
messagerequiredstringHelp question
conversationIdoptionalstringContinue conversation
pageContextoptionalstringCurrent page URL
const response = await fetch("https://api.cloudfran.com/v1/help/chat", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ message: "How do I create a loyalty program?" }) });
response = requests.post( "https://api.cloudfran.com/v1/help/chat", headers=headers, json={"message": "How do I create a loyalty program?"} )
curl -X POST https://api.cloudfran.com/v1/help/chat \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"message":"How do I create a loyalty program?"}'
GET/api/help/searchSearch KB
Full-text search across help articles, FAQs, and docs. Returns ranked results with relevance scores.

Parameters

NameTypeDescription
qrequiredstringSearch query
curl -G https://api.cloudfran.com/v1/help/search \ -H "Authorization: Bearer sk_live_your_key" \ -d q=loyalty+setup
POST/api/help/generateGenerate article
AI-generates complete help articles with step-by-step instructions. Saved to KB for future reference.

Parameters

NameTypeDescription
topicrequiredstringArticle topic
audienceoptionalstringadmin, manager, employee, customer
detailoptionalstringbrief, standard, comprehensive
response = requests.post( "https://api.cloudfran.com/v1/help/generate", headers=headers, json={"topic": "Setting up inventory transfers", "audience": "manager"} )
curl -X POST https://api.cloudfran.com/v1/help/generate \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"topic":"Inventory transfers","audience":"manager"}'

Email Verification

Validate emails before campaigns to reduce bounces and protect sender reputation. Single and batch processing.

POST/api/v1/email-verification/validateValidate email
Real-time validation: syntax, MX records, mailbox existence, role-based detection, disposable domain detection. Results in under 2 seconds.

Parameters

NameTypeDescription
emailrequiredstringEmail to validate
const response = await fetch("https://api.cloudfran.com/v1/email-verification/validate", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ email: "sarah@example.com" }) }); const { isValid, score } = await response.json();
response = requests.post( "https://api.cloudfran.com/v1/email-verification/validate", headers=headers, json={"email": "sarah@example.com"} )
curl -X POST https://api.cloudfran.com/v1/email-verification/validate \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"email":"sarah@example.com"}'
200Response
{ "email": "sarah@example.com", "isValid": true, "score": 0.95, "checks": {"syntax": true, "mxRecord": true, "mailbox": true, "isDisposable": false} }
POST/api/v1/email-verification/batchBatch validation
Async batch validation up to 10,000 emails. Returns batch ID for polling. Ideal for CRM list cleaning.

Parameters

NameTypeDescription
emailsrequiredarrayEmail array (max 10,000)
webhookUrloptionalstringCallback when complete
response = requests.post( "https://api.cloudfran.com/v1/email-verification/batch", headers=headers, json={"emails": ["a@test.com", "b@test.com"]} ) batch_id = response.json()["batchId"]
curl -X POST https://api.cloudfran.com/v1/email-verification/batch \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"emails":["a@test.com","b@test.com"]}'
GET/api/v1/email-verification/batch/{batchId}Batch status
Check batch job progress and retrieve per-email results when complete.

Parameters

NameTypeDescription
batchIdrequiredstringBatch ID
curl -G https://api.cloudfran.com/v1/email-verification/batch/batch-001 \ -H "Authorization: Bearer sk_live_your_key"
GET/api/v1/email-verification/pricingPricing tiers
Current per-email pricing by volume tier.
curl -G https://api.cloudfran.com/v1/email-verification/pricing \ -H "Authorization: Bearer sk_live_your_key"

Subscription Management

Manage tenant subscription lifecycles: suspend, reactivate, or cancel with Stripe billing integration.

POST/api/subscription/suspend/{id}Suspend
Temporarily suspend access. Data preserved, billing paused. Reactivatable anytime.

Parameters

NameTypeDescription
subscriptionIdrequiredstringSubscription ID (URL)
reasonoptionalstringSuspension reason
const response = await fetch("https://api.cloudfran.com/v1/subscription/suspend/sub-001", { method: "POST", headers, body: JSON.stringify({ reason: "Payment overdue" }) });
curl -X POST https://api.cloudfran.com/v1/subscription/suspend/sub-001 \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"reason":"Payment overdue"}'
POST/api/subscription/reactivate/{id}Reactivate
Restore suspended subscription. Full access resumes immediately, billing restarts.

Parameters

NameTypeDescription
subscriptionIdrequiredstringSubscription ID
curl -X POST https://api.cloudfran.com/v1/subscription/reactivate/sub-001 \ -H "Authorization: Bearer sk_live_your_key"
POST/api/subscription/cancel/{id}Cancel
Permanent cancellation. 30-day grace period for data retention. Optional exit survey.

Parameters

NameTypeDescription
subscriptionIdrequiredstringSubscription ID
reasonoptionalstringCancellation reason
feedbackoptionalstringExit survey
curl -X POST https://api.cloudfran.com/v1/subscription/cancel/sub-001 \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"reason":"Switching providers"}'

Autopilot (Lead Nurturing)

Automated multi-touch nurturing sequences powered by GPT-4 with A/B testing, outcome tracking, and performance billing.

POST/api/autopilot/campaigns/createCreate nurture campaign
Autopilot Campaigns are automated sequences that nurture leads to booking. Define audience, goals, cadence, and AI generates personalized outreach per recipient. Tracks opens, replies, bookings, and revenue.

Parameters

NameTypeDescription
namerequiredstringCampaign name
goalrequiredstringbooking, sale, survey, reactivation
audiencerequiredstringSegment ID
touchpointsoptionalintFollow-ups (1-10)
cadenceDaysoptionalarrayDays between: [0,1,3,7]
channeloptionalstringsms, email, both
const response = await fetch("https://api.cloudfran.com/v1/autopilot/campaigns/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Lead Nurture Feb", goal: "booking", audience: "segment-new-leads", touchpoints: 5, cadenceDays: [0, 1, 3, 7, 14] }) });
response = requests.post( "https://api.cloudfran.com/v1/autopilot/campaigns/create", headers=headers, json={"name": "Lead Nurture", "goal": "booking", "audience": "seg-new", "touchpoints": 5} )
curl -X POST https://api.cloudfran.com/v1/autopilot/campaigns/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Lead Nurture","goal":"booking","audience":"seg-new"}'
200Response
{ "success": true, "campaignId": "camp-2026-feb-001", "status": "draft", "audienceSize": 342, "variants": [ {"id": "var-a", "tone": "friendly", "preview": "Hi Sarah! We noticed..."}, {"id": "var-b", "tone": "professional", "preview": "Hello Sarah, as a valued..."} ] }
GET/api/autopilot/campaigns/{id}/performanceCampaign performance
Real-time metrics: delivery, response, booking rates, revenue attribution. Variant-level A/B breakdown.

Parameters

NameTypeDescription
idrequiredstringCampaign ID
curl -G https://api.cloudfran.com/v1/autopilot/campaigns/camp-001/performance \ -H "Authorization: Bearer sk_live_your_key"
POST/api/autopilot/leads/ingestIngest lead
Feed leads directly into an active campaign at touchpoint 0. Real-time capture from web forms, social, or partners.

Parameters

NameTypeDescription
campaignIdrequiredstringTarget campaign
namerequiredstringLead name
phonerequiredstringPhone (E.164)
tagsoptionalarraySegmentation tags
const response = await fetch("https://api.cloudfran.com/v1/autopilot/leads/ingest", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ campaignId: "camp-001", name: "Alex Rivera", phone: "+13105559876" }) });
curl -X POST https://api.cloudfran.com/v1/autopilot/leads/ingest \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"campaignId":"camp-001","name":"Alex Rivera","phone":"+13105559876"}'

Social Media

Omni-channel social management: schedule posts, analyze engagement, and manage brand presence across Facebook, Instagram, LinkedIn, and GBP.

POST/api/social/posts/scheduleSchedule post
Schedule posts across platforms simultaneously. Supports text, images, videos, AI-generated captions, and location targeting.

Parameters

NameTypeDescription
contentrequiredstringPost content
platformsrequiredarrayfacebook, instagram, linkedin, gbp
mediaUrlsoptionalarrayImage/video URLs
scheduleAtrequireddatetimeISO 8601 publish time
const response = await fetch("https://api.cloudfran.com/v1/social/posts/schedule", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ content: "Spring is here! 20% off wellness packages.", platforms: ["facebook", "instagram"], scheduleAt: "2026-03-01T10:00:00Z" }) });
response = requests.post( "https://api.cloudfran.com/v1/social/posts/schedule", headers=headers, json={"content": "Spring promo!", "platforms": ["facebook"], "scheduleAt": "2026-03-01T10:00:00Z"} )
curl -X POST https://api.cloudfran.com/v1/social/posts/schedule \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"content":"Spring!","platforms":["facebook"],"scheduleAt":"2026-03-01T10:00:00Z"}'
GET/api/social/analyticsSocial analytics
Aggregated analytics: engagement rates, follower growth, post performance, best times, demographics. Filter by platform and date.

Parameters

NameTypeDescription
platformoptionalstringfacebook, instagram, linkedin, all
periodoptionalstring7d, 30d, 90d
curl -G https://api.cloudfran.com/v1/social/analytics \ -H "Authorization: Bearer sk_live_your_key" \ -d platform=all -d period=30d

SMS Opt-Out Management

TCPA-compliant opt-out handling with suppression lists checked by all agents before sending.

POST/api/sms/opt-outRecord opt-out
Immediately suppresses number from all SMS delivery. All agents check this list before sending.

Parameters

NameTypeDescription
phonerequiredstringPhone (E.164)
reasonoptionalstringcustomer_request, complaint, bounce
curl -X POST https://api.cloudfran.com/v1/sms/opt-out \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"phone":"+12125551234","reason":"customer_request"}'
GET/api/sms/opt-out/check/{phone}Check opt-out
Check suppression status before sending. Always verify programmatically.

Parameters

NameTypeDescription
phonerequiredstringPhone (URL path)
const response = await fetch( "https://api.cloudfran.com/v1/sms/opt-out/check/+12125551234", { headers } ); const { isOptedOut } = await response.json();
curl -G https://api.cloudfran.com/v1/sms/opt-out/check/+12125551234 \ -H "Authorization: Bearer sk_live_your_key"

Analytics Dashboard

Business intelligence with real-time dashboards, custom reports, and exportable data across all modules.

GET/api/analytics/dashboardDashboard metrics
Aggregated KPIs: revenue, customers, appointments, campaigns, agent activity. Date range filtering and location drill-down.

Parameters

NameTypeDescription
periodoptionalstringtoday, 7d, 30d, 90d, ytd
locationIdoptionalstringFilter by location
const response = await fetch( "https://api.cloudfran.com/v1/analytics/dashboard?period=30d", { headers } ); const m = await response.json(); console.log(`Revenue: $${m.revenue}, Customers: ${m.totalCustomers}`);
response = requests.get( "https://api.cloudfran.com/v1/analytics/dashboard", headers=headers, params={"period": "30d"} )
curl -G https://api.cloudfran.com/v1/analytics/dashboard \ -H "Authorization: Bearer sk_live_your_key" \ -d period=30d
200Response
{ "period": "30d", "revenue": 48250.00, "totalCustomers": 1842, "newCustomers": 127, "appointments": 384, "smsDelivered": 4821, "aiTokensUsed": 847200, "topAgent": "AppointmentAgent", "nps": 72 }
POST/api/analytics/reports/generateGenerate report
Custom analytics report with selected metrics, groupings, and export formats (CSV, XLSX, PDF). Supports scheduled recurring delivery.

Parameters

NameTypeDescription
metricsrequiredarrayMetrics to include
groupByoptionalstringlocation, agent, day, week, month
formatoptionalstringcsv, xlsx, pdf, json
response = requests.post( "https://api.cloudfran.com/v1/analytics/reports/generate", headers=headers, json={"metrics": ["revenue", "appointments"], "groupBy": "location", "format": "xlsx"} )
curl -X POST https://api.cloudfran.com/v1/analytics/reports/generate \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"metrics":["revenue"],"groupBy":"location","format":"xlsx"}'
GET/api/analytics/agent-comparisonAgent comparison
Compare all AI agents: usage, tokens, success rates, response times, and ROI.

Parameters

NameTypeDescription
periodoptionalstring7d, 30d, 90d
curl -G https://api.cloudfran.com/v1/analytics/agent-comparison \ -H "Authorization: Bearer sk_live_your_key" \ -d period=30d

Twilio Compliance

A2P campaign registration, brand verification, toll-free verification, and number management.

POST/api/twilio/campaign-registerRegister A2P campaign
Define messaging use case, samples, and volume for carrier review. Required for US commercial SMS.

Parameters

NameTypeDescription
brandIdrequiredstringRegistered brand ID
useCaserequiredstringmarketing, notifications, two_factor
descriptionrequiredstringCampaign description
sampleMessagesrequiredarray2-5 sample messages
const response = await fetch("https://api.cloudfran.com/v1/twilio/campaign-register", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ brandId: "brand-001", useCase: "marketing", description: "Spa promotions and reminders", sampleMessages: ["Hi {name}, 20% off! Book: {link}"] }) });
curl -X POST https://api.cloudfran.com/v1/twilio/campaign-register \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"brandId":"brand-001","useCase":"marketing"}'
GET/api/twilio/status/{serviceId}Service status
Check registration status: brand, campaign, or toll-free verification.

Parameters

NameTypeDescription
serviceIdrequiredstringService ID
curl -G https://api.cloudfran.com/v1/twilio/status/svc-001 \ -H "Authorization: Bearer sk_live_your_key"
GET/api/twilio/usage/monthlyTwilio usage
Detailed monthly breakdown: SMS sent/received, voice minutes, MMS, costs per category.

Parameters

NameTypeDescription
monthoptionalstringYYYY-MM
curl -G https://api.cloudfran.com/v1/twilio/usage/monthly \ -H "Authorization: Bearer sk_live_your_key" \ -d month=2026-02
200Response
{ "month": "2026-02", "smsSent": 3247, "smsReceived": 891, "voiceMinutes": 67, "totalCost": 142.58, "vsLastMonth": "+8.2%" }

Inventory — Extended

AI smart reorder, pricing optimization, CSV import, supplier management, barcode scanning, and inventory AI assistant.

POST/api/inventory/smart-reorderAI smart reorder
Smart Reorder analyzes sales velocity, trends, lead times, and stock to generate optimal purchase orders per supplier. Considers budget limits and minimum order quantities.

Parameters

NameTypeDescription
locationIdrequiredstringStore location
budgetoptionaldecimalMax reorder budget
urgencyDaysoptionalintStockout threshold days
const response = await fetch("https://api.cloudfran.com/v1/inventory/smart-reorder", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ locationId: "store-downtown", budget: 5000 }) }); const { recommendations } = await response.json();
response = requests.post( "https://api.cloudfran.com/v1/inventory/smart-reorder", headers=headers, json={"locationId": "store-downtown", "budget": 5000} )
curl -X POST https://api.cloudfran.com/v1/inventory/smart-reorder \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"locationId":"store-downtown","budget":5000}'
200Response
{ "success": true, "totalItems": 12, "totalCost": 3847.50, "recommendations": [ {"itemName": "Espresso Beans (5lb)", "currentStock": 3, "reorderQty": 20, "supplier": "Bean Co.", "urgency": "high"} ] }
POST/api/inventory/optimize-pricingAI pricing
Analyze competitor pricing, demand, and margins to recommend optimal prices per item.

Parameters

NameTypeDescription
itemIdsoptionalarrayItems to optimize
targetMarginoptionaldecimalDesired margin %
response = requests.post( "https://api.cloudfran.com/v1/inventory/optimize-pricing", headers=headers, json={"itemIds": ["item-001"], "targetMargin": 0.35} )
curl -X POST https://api.cloudfran.com/v1/inventory/optimize-pricing \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"itemIds":["item-001"],"targetMargin":0.35}'
POST/api/inventory/import-csvCSV import
Bulk import up to 10,000 items. Supports upsert, column mapping, and validation with error reports.

Parameters

NameTypeDescription
filerequiredfileCSV (multipart/form-data)
modeoptionalstringcreate_only, update_only, upsert
locationIdrequiredstringTarget location
curl -X POST https://api.cloudfran.com/v1/inventory/import-csv \ -H "Authorization: Bearer sk_live_your_key" \ -F file=@inventory.csv -F mode=upsert -F locationId=store-downtown
POST/api/inventory/suppliersManage suppliers
Create/update supplier records with contact, lead times, and minimum orders.

Parameters

NameTypeDescription
namerequiredstringSupplier name
contactEmailoptionalstringContact email
leadTimeDaysoptionalintAvg delivery days
curl -X POST https://api.cloudfran.com/v1/inventory/suppliers \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Bean Co.","leadTimeDays":5}'
POST/api/inventory/ai-askInventory AI
Natural language questions about your inventory: trending, reorder needs, margin analysis.

Parameters

NameTypeDescription
questionrequiredstringQuestion
locationIdoptionalstringStore context
const response = await fetch("https://api.cloudfran.com/v1/inventory/ai-ask", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ question: "What should I order before the weekend?" }) });
curl -X POST https://api.cloudfran.com/v1/inventory/ai-ask \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"question":"What should I order before the weekend?"}'

Checkout & Payments

Stripe-powered checkout for subscriptions, purchases, and wallet top-ups.

POST/api/checkout/create-sessionCreate checkout
Stripe checkout session for plans, courses, or add-ons. Returns redirect URL with your branding. Supports coupons and trials.

Parameters

NameTypeDescription
planIdrequiredstringPlan/product ID
successUrlrequiredstringSuccess redirect
cancelUrlrequiredstringCancel redirect
couponCodeoptionalstringDiscount code
trialDaysoptionalintFree trial days
const response = await fetch("https://api.cloudfran.com/v1/checkout/create-session", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ planId: "plan-pro-monthly", successUrl: "https://myapp.com/success", cancelUrl: "https://myapp.com/pricing", trialDays: 14 }) }); const { checkoutUrl } = await response.json(); window.location.href = checkoutUrl;
response = requests.post( "https://api.cloudfran.com/v1/checkout/create-session", headers=headers, json={"planId": "plan-pro-monthly", "successUrl": "https://myapp.com/success", "cancelUrl": "https://myapp.com/pricing"} )
curl -X POST https://api.cloudfran.com/v1/checkout/create-session \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"planId":"plan-pro-monthly","successUrl":"https://myapp.com/success"}'
POST/api/customer-portal/create-sessionBilling portal
Stripe Customer Portal for subscription management, payment updates, and invoice history.

Parameters

NameTypeDescription
customerIdrequiredstringStripe customer ID
returnUrlrequiredstringReturn URL
curl -X POST https://api.cloudfran.com/v1/customer-portal/create-session \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"customerId":"cus_abc123","returnUrl":"https://myapp.com/settings"}'

Certificate Generation

Professional PDF certificates with QR verification codes for LMS course completions.

GET/api/certificate/downloadDownload certificate
PDF certificate with student name, course title, completion date, instructor signature, and QR verification link.

Parameters

NameTypeDescription
courseNamerequiredstringCourse name
studentIdoptionalstringStudent ID
window.open( "https://api.cloudfran.com/v1/certificate/download?courseName=Sales+Mastery+101", "_blank" );
curl -G https://api.cloudfran.com/v1/certificate/download \ -H "Authorization: Bearer sk_live_your_key" \ -d courseName=Sales+Mastery+101 --output certificate.pdf

AI Workbench — Extended

Advanced AI-powered business tools: content writing, employee coaching, operations optimization, and saved analysis management.

POST/api/workbench/content/writeAI Content Writer
Content Writer generates professional marketing copy, blog posts, social captions, email newsletters, and product descriptions. Specify tone, length, target audience, and the AI produces ready-to-publish content aligned with your brand voice. Supports revision instructions to refine output.

Parameters

NameTypeDescription
typerequiredstringblog_post, email, social, product_desc, newsletter
topicrequiredstringContent topic or brief
toneoptionalstringprofessional, casual, persuasive, informative
lengthoptionalstringshort (100 words), medium (300), long (800)
audienceoptionalstringTarget audience description
brandVoiceoptionalstringBrand voice guidelines
const response = await fetch("https://api.cloudfran.com/v1/workbench/content/write", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ type: "blog_post", topic: "5 Ways Franchise Owners Can Boost Customer Retention", tone: "professional", length: "long", audience: "franchise owners and managers" }) }); const { content, wordCount, readingTime } = await response.json();
response = requests.post( "https://api.cloudfran.com/v1/workbench/content/write", headers=headers, json={ "type": "blog_post", "topic": "5 Ways to Boost Customer Retention", "tone": "professional", "length": "long" } )
curl -X POST https://api.cloudfran.com/v1/workbench/content/write \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"type":"blog_post","topic":"Boost retention","tone":"professional"}'
POST/api/workbench/coaching/sessionEmployee Coaching
AI coaching sessions for franchise employees. The coach analyzes performance data, customer feedback scores, and training completion to deliver personalized improvement plans. Supports role-specific coaching for sales staff, managers, customer service, and kitchen teams.

Parameters

NameTypeDescription
employeeIdrequiredstringEmployee to coach
focusoptionalstringsales, service, leadership, operations
performanceDataoptionalobjectRecent metrics: sales, satisfaction scores, attendance
formatoptionalstringsummary, detailed_plan, quick_tips
const response = await fetch("https://api.cloudfran.com/v1/workbench/coaching/session", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ employeeId: "emp-034", focus: "sales", performanceData: { monthlySales: 12400, satisfaction: 4.2, upsellRate: 0.15 }, format: "detailed_plan" }) });
response = requests.post( "https://api.cloudfran.com/v1/workbench/coaching/session", headers=headers, json={"employeeId": "emp-034", "focus": "sales", "format": "detailed_plan"} )
curl -X POST https://api.cloudfran.com/v1/workbench/coaching/session \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"employeeId":"emp-034","focus":"sales"}'
200Response
{ "success": true, "employeeName": "James K.", "overallScore": 72, "strengths": ["Consistent attendance", "Good customer rapport"], "improvements": [ {"area": "Upselling", "current": "15%", "target": "25%", "actions": [ "Practice the SPIN selling technique for add-ons", "Complete LMS course: Upselling Mastery" ]}, {"area": "Average ticket", "current": "$31", "target": "$40", "actions": [ "Suggest premium options before standard", "Bundle promotions during peak hours" ]} ], "recommendedCourses": ["Sales Mastery 101", "Customer Upselling Techniques"] }
POST/api/workbench/operations/optimizeOperations AI
AI-powered operations analysis. Submit operational data (staffing, inventory turnover, waste, customer wait times) and receive optimization recommendations. Identifies inefficiencies, suggests schedule changes, and benchmarks against industry averages.

Parameters

NameTypeDescription
locationIdrequiredstringStore location
metricsoptionalobjectOperational metrics to analyze
periodoptionalstringAnalysis period: 7d, 30d, 90d
const response = await fetch("https://api.cloudfran.com/v1/workbench/operations/optimize", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ locationId: "store-downtown", metrics: { avgWaitTime: 12, staffUtilization: 0.68, wastePercent: 8.2 }, period: "30d" }) });
curl -X POST https://api.cloudfran.com/v1/workbench/operations/optimize \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"locationId":"store-downtown","period":"30d"}'
GET/api/workbench/analyses/savedSaved analyses
Retrieve saved Workbench analyses and reports. Filter by type (data, image, advice, content) and date. Each saved item includes the original query, full results, and metadata.

Parameters

NameTypeDescription
typeoptionalstringdata, image, advice, content, coaching
pageoptionalintPage number
const response = await fetch( "https://api.cloudfran.com/v1/workbench/analyses/saved?type=data&page=1", { headers } );
curl -G https://api.cloudfran.com/v1/workbench/analyses/saved \ -H "Authorization: Bearer sk_live_your_key" \ -d type=data -d page=1

CRM — Extended Operations

Advanced CRM capabilities: contact import, workflow automation, drip sequences, form management, smart segments, commission tracking, and revenue analytics.

POST/api/crm/contacts/importImport contacts
Bulk import contacts from CSV with field mapping, duplicate detection, and tag assignment. Supports up to 50,000 records per import with validation reporting.

Parameters

NameTypeDescription
filerequiredfileCSV file (multipart)
mappingoptionalobjectColumn-to-field mapping
duplicateStrategyoptionalstringskip, update, create_new (default: skip)
defaultTagsoptionalarrayTags to apply to all imported contacts
const formData = new FormData(); formData.append("file", csvFile); formData.append("duplicateStrategy", "update"); formData.append("defaultTags", JSON.stringify(["imported-feb-2026"])); const response = await fetch("https://api.cloudfran.com/v1/crm/contacts/import", { method: "POST", headers: { "Authorization": "Bearer sk_live_your_key" }, body: formData });
curl -X POST https://api.cloudfran.com/v1/crm/contacts/import \ -H "Authorization: Bearer sk_live_your_key" \ -F file=@contacts.csv -F duplicateStrategy=update
200Response
{ "success": true, "imported": 1247, "duplicatesSkipped": 83, "errors": 12, "errorReport": "https://api.cloudfran.com/v1/crm/imports/imp-001/errors.csv" }
POST/api/crm/workflows/createCreate workflow
Build automated CRM workflows with trigger conditions, action sequences, and branching logic. Workflows execute on events like lead creation, deal stage change, or time-based triggers. Actions include sending emails, SMS, updating fields, creating tasks, and assigning to team members.

Parameters

NameTypeDescription
namerequiredstringWorkflow name
triggerrequiredobject{event, conditions} that start the workflow
actionsrequiredarrayOrdered action sequence
isActiveoptionalboolActivate immediately (default: false)
const response = await fetch("https://api.cloudfran.com/v1/crm/workflows/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "New Lead Follow-Up", trigger: { event: "lead.created", conditions: { source: "web" } }, actions: [ { type: "send_email", templateId: "tpl-welcome", delay: "0m" }, { type: "send_sms", message: "Thanks for your interest!", delay: "5m" }, { type: "create_task", assignTo: "sales-team", dueIn: "1d" } ], isActive: true }) });
response = requests.post( "https://api.cloudfran.com/v1/crm/workflows/create", headers=headers, json={ "name": "New Lead Follow-Up", "trigger": {"event": "lead.created"}, "actions": [{"type": "send_email", "templateId": "tpl-welcome"}], "isActive": True } )
curl -X POST https://api.cloudfran.com/v1/crm/workflows/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Lead Follow-Up","trigger":{"event":"lead.created"},"isActive":true}'
POST/api/crm/drip/createCreate drip sequence
Set up multi-step email/SMS drip sequences that automatically nurture contacts over time. Each step has configurable delays, conditions for advancement, and exit criteria. Supports A/B testing of messaging at each step.

Parameters

NameTypeDescription
namerequiredstringSequence name
channelrequiredstringemail, sms, both
stepsrequiredarrayArray of {content, delayDays, condition}
exitConditionoptionalstringWhen to stop: converted, unsubscribed, completed
const response = await fetch("https://api.cloudfran.com/v1/crm/drip/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Onboarding Drip", channel: "email", steps: [ { content: "Welcome to our family!", delayDays: 0 }, { content: "Here are 3 tips to get started", delayDays: 3 }, { content: "Ready for your first appointment?", delayDays: 7 } ], exitCondition: "converted" }) });
curl -X POST https://api.cloudfran.com/v1/crm/drip/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Onboarding Drip","channel":"email","steps":[{"content":"Welcome!","delayDays":0}]}'
POST/api/crm/segments/smartCreate smart segment
Define dynamic customer segments using rule-based criteria. Smart segments auto-update as customer data changes. Use for targeted campaigns, health monitoring, and reporting.

Parameters

NameTypeDescription
namerequiredstringSegment name
rulesrequiredarrayFilter rules: [{field, operator, value}]
combineWithoptionalstringAND or OR logic (default: AND)
const response = await fetch("https://api.cloudfran.com/v1/crm/segments/smart", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "High-Value At-Risk", rules: [ { field: "lifetimeValue", operator: "gt", value: 500 }, { field: "lastVisitDays", operator: "gt", value: 30 }, { field: "healthScore", operator: "lt", value: 40 } ], combineWith: "AND" }) });
curl -X POST https://api.cloudfran.com/v1/crm/segments/smart \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"High-Value At-Risk","rules":[{"field":"healthScore","operator":"lt","value":40}]}'
GET/api/crm/revenue/dashboardRevenue analytics
CRM revenue dashboard with pipeline value, closed-won totals, forecast, conversion rates, and rep-level breakdowns. Integrates with commission tracking for payout projections.

Parameters

NameTypeDescription
periodoptionalstring7d, 30d, 90d, ytd
repIdoptionalstringFilter by sales rep
const response = await fetch( "https://api.cloudfran.com/v1/crm/revenue/dashboard?period=30d", { headers } ); const { closedWon, pipeline, forecast } = await response.json();
response = requests.get( "https://api.cloudfran.com/v1/crm/revenue/dashboard", headers=headers, params={"period": "30d"} )
curl -G https://api.cloudfran.com/v1/crm/revenue/dashboard \ -H "Authorization: Bearer sk_live_your_key" \ -d period=30d
200Response
{ "period": "30d", "closedWon": 87500.00, "pipeline": 245000.00, "forecast": 124000.00, "conversionRate": 0.32, "avgDealSize": 3125.00, "avgDealCycle": 18, "topRep": {"name": "Sarah K.", "closed": 42500.00} }
POST/api/crm/forms/createCreate lead form
Create embeddable lead capture forms with custom fields, validation, and auto-routing. Forms can be embedded on landing pages, websites, or shared as standalone links. Submissions auto-create leads and trigger workflows.

Parameters

NameTypeDescription
namerequiredstringForm name
fieldsrequiredarrayForm fields with types and validation
redirectUrloptionalstringPost-submission redirect
notifyEmailoptionalstringEmail on new submission
const response = await fetch("https://api.cloudfran.com/v1/crm/forms/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Contact Us", fields: [ { name: "fullName", type: "text", required: true }, { name: "email", type: "email", required: true }, { name: "phone", type: "phone" }, { name: "interest", type: "select", options: ["Franchise", "Service", "Other"] } ], notifyEmail: "leads@myfranchise.com" }) });
curl -X POST https://api.cloudfran.com/v1/crm/forms/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Contact Us","fields":[{"name":"fullName","type":"text","required":true}]}'
GET/api/crm/commissionsCommission analytics
Track sales commission accrual and payouts. Returns per-rep commission totals, pending payouts, and historical earnings. Supports custom commission rules per deal type and product.

Parameters

NameTypeDescription
periodoptionalstringmonthly, quarterly, ytd
repIdoptionalstringFilter by rep
curl -G https://api.cloudfran.com/v1/crm/commissions \ -H "Authorization: Bearer sk_live_your_key" \ -d period=monthly

Template Marketplace

Browse, purchase, install, and create agent templates and workflow automations. Revenue share model for template creators.

GET/api/marketplace/templatesBrowse templates
Browse the template marketplace with filtering by category, industry, rating, and price. Templates include agent configurations, workflow automations, email sequences, and campaign blueprints.

Parameters

NameTypeDescription
categoryoptionalstringagent, workflow, email, campaign, bundle
industryoptionalstringrestaurant, retail, fitness, healthcare...
sortoptionalstringpopular, newest, price_asc, price_desc, rating
pageoptionalintPage number
const response = await fetch( "https://api.cloudfran.com/v1/marketplace/templates?category=agent&industry=restaurant&sort=popular", { headers } ); const { templates, totalCount } = await response.json(); templates.forEach(t => console.log(`${t.name} - $${t.price} (${t.rating}/5)`));
response = requests.get( "https://api.cloudfran.com/v1/marketplace/templates", headers=headers, params={"category": "agent", "industry": "restaurant", "sort": "popular"} )
curl -G https://api.cloudfran.com/v1/marketplace/templates \ -H "Authorization: Bearer sk_live_your_key" \ -d category=agent -d industry=restaurant
200Response
{ "totalCount": 142, "page": 1, "templates": [ {"id": "tpl-001", "name": "Restaurant Win-Back Campaign", "category": "campaign", "price": 29.99, "rating": 4.8, "installs": 1247, "creator": "CloudFran Official"}, {"id": "tpl-002", "name": "Spa Appointment Automation", "category": "workflow", "price": 49.99, "rating": 4.6, "installs": 834, "creator": "FranchisePro"} ] }
POST/api/marketplace/templates/{id}/installInstall template
Install a purchased template into your tenant. Templates are validated for compatibility, security-scanned, and configured with your tenant's API keys and settings. Installation is reversible.

Parameters

NameTypeDescription
templateIdrequiredstringTemplate ID (URL path)
locationIdoptionalstringTarget location (or all)
customSettingsoptionalobjectOverride default template settings
const response = await fetch("https://api.cloudfran.com/v1/marketplace/templates/tpl-001/install", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ locationId: "all", customSettings: { discountPercent: 15, campaignName: "Spring Win-Back" } }) });
curl -X POST https://api.cloudfran.com/v1/marketplace/templates/tpl-001/install \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"locationId":"all"}'
POST/api/marketplace/templates/{id}/purchasePurchase template
Purchase a premium template from the marketplace via Stripe. Free templates can be installed directly without purchase.

Parameters

NameTypeDescription
templateIdrequiredstringTemplate ID
const response = await fetch("https://api.cloudfran.com/v1/marketplace/templates/tpl-001/purchase", { method: "POST", headers: { ...headers, "Content-Type": "application/json" } }); const { checkoutUrl } = await response.json();
curl -X POST https://api.cloudfran.com/v1/marketplace/templates/tpl-001/purchase \ -H "Authorization: Bearer sk_live_your_key"
POST/api/marketplace/creator/submitSubmit template
Submit a new template to the marketplace as a creator. Templates go through automated security scanning and manual review before publishing. Creators earn revenue share on each sale.

Parameters

NameTypeDescription
namerequiredstringTemplate name
descriptionrequiredstringDetailed description
categoryrequiredstringagent, workflow, email, campaign
industryrequiredarrayTarget industries
pricerequireddecimalPrice (0 for free)
configurationrequiredobjectTemplate configuration data
response = requests.post( "https://api.cloudfran.com/v1/marketplace/creator/submit", headers=headers, json={ "name": "Pet Grooming Reminder Workflow", "description": "Automated grooming reminders with rebooking...", "category": "workflow", "industry": ["pet_services"], "price": 19.99, "configuration": {"triggers": [...], "actions": [...]} } )
curl -X POST https://api.cloudfran.com/v1/marketplace/creator/submit \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Pet Grooming Reminders","category":"workflow","price":19.99}'

Tenant Administration

Manage your franchise tenant: team members, billing settings, usage quotas, location configuration, and platform settings.

GET/api/tenant/teamList team members
Retrieve all team members for the current tenant with roles, permissions, last login, and activity status.

Parameters

NameTypeDescription
roleoptionalstringFilter: admin, manager, agent, viewer
const response = await fetch( "https://api.cloudfran.com/v1/tenant/team?role=manager", { headers } ); const { members } = await response.json();
curl -G https://api.cloudfran.com/v1/tenant/team \ -H "Authorization: Bearer sk_live_your_key" \ -d role=manager
POST/api/tenant/team/inviteInvite team member
Invite a new team member via email. Specify their role and permissions. The invitee receives an onboarding email with account setup instructions.

Parameters

NameTypeDescription
emailrequiredstringInvitee email
rolerequiredstringadmin, manager, agent, viewer
permissionsoptionalarraySpecific permissions to grant
locationsoptionalarrayLocations they can access
const response = await fetch("https://api.cloudfran.com/v1/tenant/team/invite", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ email: "newmanager@example.com", role: "manager", locations: ["loc-downtown", "loc-midtown"] }) });
curl -X POST https://api.cloudfran.com/v1/tenant/team/invite \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"email":"manager@example.com","role":"manager"}'
GET/api/tenant/settingsTenant settings
Retrieve current tenant configuration: business details, branding, timezone, notification preferences, API limits, and integration settings.
const response = await fetch( "https://api.cloudfran.com/v1/tenant/settings", { headers } ); const settings = await response.json(); console.log(`Plan: ${settings.plan}, Locations: ${settings.locationCount}`);
curl -G https://api.cloudfran.com/v1/tenant/settings \ -H "Authorization: Bearer sk_live_your_key"
PUT/api/tenant/settingsUpdate settings
Update tenant configuration. Changes take effect immediately. Certain settings (plan changes, billing) trigger Stripe updates.

Parameters

NameTypeDescription
businessNameoptionalstringBusiness display name
timezoneoptionalstringIANA timezone (e.g., America/New_York)
notificationEmailoptionalstringAdmin notification email
brandColoroptionalstringHex color for branding
const response = await fetch("https://api.cloudfran.com/v1/tenant/settings", { method: "PUT", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ businessName: "Happy Pet Grooming", timezone: "America/New_York", brandColor: "#635bff" }) });
curl -X PUT https://api.cloudfran.com/v1/tenant/settings \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"businessName":"Happy Pet Grooming","timezone":"America/New_York"}'
GET/api/tenant/billingBilling summary
Current billing status: plan, monthly cost, next invoice date, payment method, and overage charges. Includes Stripe customer portal link.
curl -G https://api.cloudfran.com/v1/tenant/billing \ -H "Authorization: Bearer sk_live_your_key"
200Response
{ "plan": "Professional", "monthlyBase": 299.00, "currentOverage": 0.00, "nextInvoice": "2026-03-01", "paymentMethod": "Visa ending 4242", "portalUrl": "https://billing.stripe.com/session/...", "usage": {"apiCalls": 8432, "limit": 25000, "percentage": 33.7} }

Compliance — Extended

Full data governance: GDPR data export, right-to-deletion, consent audit trail, and compliance dashboard metrics.

GET/api/compliance/data-export/{customerId}GDPR data export
Generate a complete data export package for a customer containing all personal data held across CRM, Loyalty, Appointments, Communications, and Billing. Returns a download URL for a ZIP file. Required for GDPR Subject Access Requests (SAR).

Parameters

NameTypeDescription
customerIdrequiredstringCustomer ID
formatoptionalstringjson, csv (default: json)
const response = await fetch( "https://api.cloudfran.com/v1/compliance/data-export/cust-001?format=json", { headers } ); const { downloadUrl, expiresAt } = await response.json();
curl -G https://api.cloudfran.com/v1/compliance/data-export/cust-001 \ -H "Authorization: Bearer sk_live_your_key" \ -d format=json
200Response
{ "success": true, "customerId": "cust-001", "downloadUrl": "https://api.cloudfran.com/v1/exports/exp-001.zip", "expiresAt": "2026-02-24T00:00:00Z", "dataCategories": ["profile", "loyalty", "appointments", "communications", "billing"], "recordCount": 847 }
POST/api/compliance/data-deletion/{customerId}Right to deletion
Process a customer data deletion request (GDPR Right to Erasure). Removes personal data across all modules while preserving anonymized aggregate records for reporting. Generates a deletion certificate as proof of compliance.

Parameters

NameTypeDescription
customerIdrequiredstringCustomer ID
reasonoptionalstringcustomer_request, legal_requirement
retainAnonymizedoptionalboolKeep anonymized records for analytics (default: true)
const response = await fetch("https://api.cloudfran.com/v1/compliance/data-deletion/cust-001", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ reason: "customer_request", retainAnonymized: true }) });
curl -X POST https://api.cloudfran.com/v1/compliance/data-deletion/cust-001 \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"reason":"customer_request"}'
GET/api/compliance/audit-trailConsent audit trail
Retrieve a full audit trail of consent records: opt-ins, opt-outs, CCPA requests, data deletions, and policy acceptances. Required for regulatory audits and demonstrating compliance.

Parameters

NameTypeDescription
customerIdoptionalstringFilter by customer
typeoptionalstringopt_in, opt_out, deletion, ccpa, all
fromoptionaldatetimeStart date
tooptionaldatetimeEnd date
curl -G https://api.cloudfran.com/v1/compliance/audit-trail \ -H "Authorization: Bearer sk_live_your_key" \ -d type=all -d from=2026-01-01
GET/api/compliance/dashboardCompliance dashboard
Compliance health metrics: opt-in rates, pending deletion requests, CCPA flags, consent freshness, and at-risk records. Use for ongoing compliance monitoring and executive reporting.
const response = await fetch( "https://api.cloudfran.com/v1/compliance/dashboard", { headers } ); const { optInRate, pendingDeletions, ccpaFlags } = await response.json();
curl -G https://api.cloudfran.com/v1/compliance/dashboard \ -H "Authorization: Bearer sk_live_your_key"
200Response
{ "optInRate": 0.89, "totalConsents": 4821, "pendingDeletions": 3, "ccpaDoNotSell": 47, "expiredConsents": 12, "lastAudit": "2026-02-01", "complianceScore": 94 }

Autopilot — Extended

Advanced Autopilot operations: A/B variant management, conversation threading, campaign editing, and lead conversation history.

POST/api/autopilot/variants/createCreate A/B variant
Create message variants for A/B testing within an Autopilot campaign. Each variant can have different tone, content, and CTA. Traffic is split evenly across variants with automatic winner detection based on conversion rate.

Parameters

NameTypeDescription
campaignIdrequiredstringParent campaign
tonerequiredstringfriendly, professional, urgent, casual
contentoptionalstringMessage template with merge fields
trafficPercentoptionalintTraffic allocation (auto-balanced if omitted)
const response = await fetch("https://api.cloudfran.com/v1/autopilot/variants/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ campaignId: "camp-001", tone: "friendly", content: "Hey {name}! We miss you at {location}. Come back for {offer}!" }) });
curl -X POST https://api.cloudfran.com/v1/autopilot/variants/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"campaignId":"camp-001","tone":"friendly"}'
GET/api/autopilot/conversations/{leadId}Conversation history
Full conversation thread between Autopilot and a lead. Includes every message sent/received, timestamps, sentiment analysis per message, and outcome status.

Parameters

NameTypeDescription
leadIdrequiredstringLead ID
const response = await fetch( "https://api.cloudfran.com/v1/autopilot/conversations/lead-042", { headers } ); const { messages, outcome } = await response.json(); messages.forEach(m => console.log(`[${m.direction}] ${m.text}`));
curl -G https://api.cloudfran.com/v1/autopilot/conversations/lead-042 \ -H "Authorization: Bearer sk_live_your_key"
200Response
{ "leadId": "lead-042", "campaignId": "camp-001", "messages": [ {"direction": "outbound", "text": "Hi Sarah! We miss you at Downtown Spa...", "timestamp": "2026-02-15T10:00:00Z", "status": "delivered"}, {"direction": "inbound", "text": "Hi! Do you have availability this Friday?", "timestamp": "2026-02-15T10:42:00Z", "sentiment": "positive"} ], "outcome": "booking_pending", "touchpointNumber": 2 }
PUT/api/autopilot/campaigns/{id}Edit campaign
Update an active or draft campaign. Supports modifying audience, cadence, messaging, and budget. Active campaigns can be paused, and changes apply to future touchpoints only (already-sent messages are unchanged).

Parameters

NameTypeDescription
idrequiredstringCampaign ID
statusoptionalstringactive, paused, draft
audienceoptionalstringUpdated segment ID
cadenceDaysoptionalarrayUpdated cadence
curl -X PUT https://api.cloudfran.com/v1/autopilot/campaigns/camp-001 \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"status":"paused"}'

LMS — Extended

Advanced training: curriculum tracks, prerequisite chains, team assignments, gradebook management, audio narration generation, and quiz assessment APIs.

POST/api/lms/tracks/createCreate curriculum track
Build a structured curriculum track from multiple courses with defined sequence, prerequisites, and completion requirements. Tracks can target specific roles (new hire, manager, compliance) and include a final certification upon completion.

Parameters

NameTypeDescription
namerequiredstringTrack name
descriptionrequiredstringTrack description
coursesrequiredarrayOrdered array of course IDs
targetRoleoptionalstringnew_hire, manager, all_staff
certificationOnCompleteoptionalboolIssue certificate on completion
const response = await fetch("https://api.cloudfran.com/v1/lms/tracks/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "New Hire Onboarding", description: "Complete 5-course onboarding track for new franchise employees", courses: ["course-safety-101", "course-service-basics", "course-pos-training", "course-brand-standards", "course-customer-care"], targetRole: "new_hire", certificationOnComplete: true }) });
response = requests.post( "https://api.cloudfran.com/v1/lms/tracks/create", headers=headers, json={"name": "New Hire Onboarding", "courses": ["course-safety-101", "course-service-basics"], "certificationOnComplete": True} )
curl -X POST https://api.cloudfran.com/v1/lms/tracks/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Onboarding","courses":["course-safety-101"],"certificationOnComplete":true}'
POST/api/lms/assignments/bulkBulk assign courses
Assign courses or tracks to multiple employees simultaneously. Filter by role, location, or custom criteria. Sends enrollment notifications and sets deadlines.

Parameters

NameTypeDescription
courseIdsrequiredarrayCourses or track IDs to assign
assignTorequiredobject{roles, locations, employeeIds} filter
deadlineoptionaldatetimeCompletion deadline
mandatoryoptionalboolMark as required training
const response = await fetch("https://api.cloudfran.com/v1/lms/assignments/bulk", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ courseIds: ["track-new-hire"], assignTo: { roles: ["new_hire"], locations: ["all"] }, deadline: "2026-03-15T23:59:59Z", mandatory: true }) });
curl -X POST https://api.cloudfran.com/v1/lms/assignments/bulk \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"courseIds":["track-new-hire"],"assignTo":{"roles":["new_hire"]},"mandatory":true}'
GET/api/lms/gradebookGradebook
Retrieve gradebook data with per-student quiz scores, course completions, time spent, and overall GPA. Supports manager view for team-level reporting and individual student detail view.

Parameters

NameTypeDescription
locationIdoptionalstringFilter by location
courseIdoptionalstringFilter by course
studentIdoptionalstringSingle student detail
const response = await fetch( "https://api.cloudfran.com/v1/lms/gradebook?locationId=store-downtown", { headers } ); const { students } = await response.json(); students.forEach(s => console.log(`${s.name}: ${s.completedCourses}/${s.totalCourses} (GPA: ${s.gpa})`));
curl -G https://api.cloudfran.com/v1/lms/gradebook \ -H "Authorization: Bearer sk_live_your_key" \ -d locationId=store-downtown
200Response
{ "totalStudents": 24, "avgCompletion": 0.72, "students": [ {"id": "emp-001", "name": "Sarah K.", "completedCourses": 8, "totalCourses": 10, "gpa": 3.6, "hoursSpent": 12.5}, {"id": "emp-002", "name": "Mike J.", "completedCourses": 5, "totalCourses": 10, "gpa": 3.2, "hoursSpent": 8.0} ] }
POST/api/lms/audio/generateGenerate audio narration
Generate AI voice narration for course content using Google Cloud Text-to-Speech. Specify voice, language, speed, and the text content. Returns an MP3 URL stored in Azure Blob Storage.

Parameters

NameTypeDescription
textrequiredstringContent to narrate
voiceoptionalstringen-US-Neural2-F, en-US-Neural2-D, etc.
speedoptionaldecimalPlayback speed (0.5 - 2.0, default: 1.0)
languageoptionalstringLanguage code (default: en-US)
const response = await fetch("https://api.cloudfran.com/v1/lms/audio/generate", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ text: "Welcome to Sales Mastery 101. In this module, you will learn...", voice: "en-US-Neural2-F", speed: 1.0 }) }); const { audioUrl, durationSeconds } = await response.json();
curl -X POST https://api.cloudfran.com/v1/lms/audio/generate \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"text":"Welcome to Sales Mastery 101...","voice":"en-US-Neural2-F"}'
GET/api/lms/manager/reportsManager reports
Aggregated training reports for managers: team completion rates, overdue assignments, quiz pass rates, time-to-completion, and compliance training status. Export as CSV or PDF.

Parameters

NameTypeDescription
locationIdoptionalstringFilter by location
periodoptionalstring7d, 30d, 90d, all
exportoptionalstringcsv, pdf (omit for JSON)
curl -G https://api.cloudfran.com/v1/lms/manager/reports \ -H "Authorization: Bearer sk_live_your_key" \ -d period=30d -d locationId=store-downtown
POST/api/lms/quiz/submitSubmit quiz answers
Submit answers for a course quiz. Returns immediate grading, per-question feedback, and updates the student's progress. Failed quizzes can be retaken based on course settings.

Parameters

NameTypeDescription
quizIdrequiredstringQuiz ID
studentIdrequiredstringStudent ID
answersrequiredarrayArray of {questionId, selectedOption}
const response = await fetch("https://api.cloudfran.com/v1/lms/quiz/submit", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ quizId: "quiz-sales-101-final", studentId: "emp-001", answers: [ { questionId: "q1", selectedOption: "B" }, { questionId: "q2", selectedOption: "A" } ] }) });
curl -X POST https://api.cloudfran.com/v1/lms/quiz/submit \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"quizId":"quiz-001","studentId":"emp-001","answers":[{"questionId":"q1","selectedOption":"B"}]}'
200Response
{ "passed": true, "score": 85, "passingScore": 70, "totalQuestions": 20, "correct": 17, "feedback": [ {"questionId": "q3", "correct": false, "explanation": "The correct answer is C because..."}, {"questionId": "q11", "correct": false, "explanation": "Review module 3 on upselling..."} ], "certificateEarned": true }

Calendar Integration

Google Calendar sync for appointment management, availability checking, and .ics file generation.

GET/api/calendar/availabilityCheck availability
Query real-time availability across providers, locations, and service types. Returns open time slots for the requested date range, factoring in existing appointments, business hours, breaks, and buffer times.

Parameters

NameTypeDescription
locationIdrequiredstringFranchise location
serviceTypeoptionalstringService to book
dateFromrequireddateStart date (YYYY-MM-DD)
dateTorequireddateEnd date
providerIdoptionalstringSpecific provider
const response = await fetch( "https://api.cloudfran.com/v1/calendar/availability?locationId=loc-001&dateFrom=2026-02-20&dateTo=2026-02-22", { headers } ); const { slots } = await response.json(); slots.forEach(s => console.log(`${s.date} ${s.time} - ${s.provider} (${s.duration}min)`));
response = requests.get( "https://api.cloudfran.com/v1/calendar/availability", headers=headers, params={"locationId": "loc-001", "dateFrom": "2026-02-20", "dateTo": "2026-02-22"} )
curl -G https://api.cloudfran.com/v1/calendar/availability \ -H "Authorization: Bearer sk_live_your_key" \ -d locationId=loc-001 -d dateFrom=2026-02-20 -d dateTo=2026-02-22
POST/api/calendar/syncSync Google Calendar
Initiate a sync between CloudFran appointments and Google Calendar. Bi-directional: creates Google events for CloudFran appointments and imports Google events as blocks. Uses OAuth2 for secure access.

Parameters

NameTypeDescription
locationIdrequiredstringLocation to sync
directionoptionalstringpush, pull, bidirectional (default: bidirectional)
curl -X POST https://api.cloudfran.com/v1/calendar/sync \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"locationId":"loc-001","direction":"bidirectional"}'

Marketing Hub

Centralized marketing command center: AI marketing advisor, campaign orchestration, asset management, competitive analysis, and multi-channel performance tracking.

POST/api/marketing/advisor/askMarketing Advisor AI
AI marketing strategist trained on franchise best practices across 20 industries. Ask questions about campaign strategy, audience targeting, budget allocation, seasonal planning, and competitive positioning. Returns data-backed recommendations.

Parameters

NameTypeDescription
questionrequiredstringMarketing question
industryoptionalstringYour industry for context
budgetoptionaldecimalMarketing budget for recommendations
const response = await fetch("https://api.cloudfran.com/v1/marketing/advisor/ask", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ question: "What marketing channels give the best ROI for a restaurant franchise with $5K/month budget?", industry: "restaurant", budget: 5000 }) });
response = requests.post( "https://api.cloudfran.com/v1/marketing/advisor/ask", headers=headers, json={"question": "Best ROI channels for restaurant with $5K budget?", "industry": "restaurant"} )
curl -X POST https://api.cloudfran.com/v1/marketing/advisor/ask \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"question":"Best ROI channels for restaurant?","industry":"restaurant"}'
POST/api/marketing/competitor/analyzeCompetitor analysis
AI-powered competitive analysis. Provide competitor names or domains and receive market positioning analysis, pricing comparison, social media presence audit, review sentiment comparison, and strategic recommendations.

Parameters

NameTypeDescription
competitorsrequiredarrayCompetitor names or domains
analysisTypeoptionalstringpricing, social, reviews, comprehensive
const response = await fetch("https://api.cloudfran.com/v1/marketing/competitor/analyze", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ competitors: ["rivalpizza.com", "pizzaplace.com"], analysisType: "comprehensive" }) });
curl -X POST https://api.cloudfran.com/v1/marketing/competitor/analyze \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"competitors":["rivalpizza.com"],"analysisType":"comprehensive"}'

Franchise Locations

Manage franchise locations: add, update, and configure store settings, business hours, service areas, and staff assignments.

GET/api/locationsList locations
Retrieve all franchise locations with address, hours, contact info, status, and performance metrics. Each location can be individually configured for agents, services, and inventory.

Parameters

NameTypeDescription
statusoptionalstringactive, inactive, coming_soon
const response = await fetch("https://api.cloudfran.com/v1/locations?status=active", { headers }); const { locations } = await response.json(); locations.forEach(l => console.log(`${l.name}: ${l.address} (${l.status})`));
curl -G https://api.cloudfran.com/v1/locations \ -H "Authorization: Bearer sk_live_your_key" \ -d status=active
200Response
{ "locations": [ {"id": "loc-001", "name": "Downtown", "address": "123 Main St", "city": "Atlanta", "hours": {"mon": "9:00-21:00", "tue": "9:00-21:00"}, "staffCount": 12, "monthlyRevenue": 42500, "status": "active"} ] }
POST/api/locations/createAdd location
Register a new franchise location. Sets up tenant-scoped data isolation, default inventory categories, staff slots, and agent configurations.

Parameters

NameTypeDescription
namerequiredstringLocation name
addressrequiredobject{street, city, state, zip, country}
phoneoptionalstringLocation phone
hoursoptionalobjectBusiness hours by day of week
servicesoptionalarrayServices offered at this location
const response = await fetch("https://api.cloudfran.com/v1/locations/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Midtown Location", address: { street: "456 Peach St", city: "Atlanta", state: "GA", zip: "30308" }, phone: "+14045551234", services: ["haircut", "color", "styling"] }) });
curl -X POST https://api.cloudfran.com/v1/locations/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Midtown","address":{"street":"456 Peach St","city":"Atlanta","state":"GA"}}'

Alerts & Real-Time Monitoring

Configurable alert rules for inventory thresholds, revenue targets, fraud detection, appointment no-shows, and system health. Delivered via SMS, email, or in-app push.

POST/api/alerts/rules/createCreate alert rule
Define custom alert rules with trigger conditions, thresholds, and delivery channels. Alerts fire in real-time when conditions are met.

Parameters

NameTypeDescription
namerequiredstringAlert name
metricrequiredstringrevenue, inventory, fraud_score, no_shows, api_errors
conditionrequiredstringgt, lt, eq, change_pct
thresholdrequireddecimalThreshold value
channelsrequiredarraysms, email, push
recipientsoptionalarrayPhone/email of alert recipients
const response = await fetch("https://api.cloudfran.com/v1/alerts/rules/create", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Low Inventory Alert", metric: "inventory", condition: "lt", threshold: 10, channels: ["sms", "email"], recipients: ["+14045551234", "manager@franchise.com"] }) });
curl -X POST https://api.cloudfran.com/v1/alerts/rules/create \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"name":"Low Stock","metric":"inventory","condition":"lt","threshold":10,"channels":["sms"]}'
GET/api/alerts/activeActive alerts
Retrieve currently active (unresolved) alerts with severity, trigger time, affected entity, and recommended action.

Parameters

NameTypeDescription
severityoptionalstringcritical, warning, info
curl -G https://api.cloudfran.com/v1/alerts/active \ -H "Authorization: Bearer sk_live_your_key" \ -d severity=critical

Response Intelligence

AI-powered response suggestions for customer communications. Analyzes incoming messages and generates context-aware reply recommendations.

POST/api/intelligence/suggest-responseGet response suggestions
Analyze an incoming customer message and generate 2-3 contextual response options. The AI considers customer history, sentiment, and business rules to craft appropriate replies with varying tones.

Parameters

NameTypeDescription
messagerequiredstringIncoming customer message
customerIdoptionalstringCustomer ID for context
channeloptionalstringsms, email, review, chat
const response = await fetch("https://api.cloudfran.com/v1/intelligence/suggest-response", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ message: "Hi, I need to cancel my appointment tomorrow", customerId: "cust-042", channel: "sms" }) }); const { suggestions } = await response.json(); suggestions.forEach(s => console.log(`[${s.tone}]: ${s.text}`));
curl -X POST https://api.cloudfran.com/v1/intelligence/suggest-response \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"message":"Need to cancel tomorrow","customerId":"cust-042","channel":"sms"}'
200Response
{ "suggestions": [ {"tone": "empathetic", "text": "No problem at all! I have cancelled your appointment. Would you like to reschedule for later this week?"}, {"tone": "retention", "text": "Sorry to hear that! Your appointment is cancelled. As a valued customer, we have a 15% discount waiting for your next visit."}, {"tone": "efficient", "text": "Done! Your appointment for tomorrow is cancelled. Text us anytime to rebook."} ], "sentiment": "neutral", "intent": "cancellation" }

Revenue Tracking

Multi-source revenue aggregation across Stripe payments, POS transactions, agent-driven bookings, and marketplace sales.

GET/api/revenue/summaryRevenue summary
Aggregated revenue across all sources with breakdowns by channel (online, in-store, agent-driven), location, time period, and product category.

Parameters

NameTypeDescription
periodoptionalstringtoday, 7d, 30d, 90d, ytd
groupByoptionalstringsource, location, product, day
const response = await fetch( "https://api.cloudfran.com/v1/revenue/summary?period=30d&groupBy=source", { headers } ); const { total, breakdown } = await response.json();
response = requests.get( "https://api.cloudfran.com/v1/revenue/summary", headers=headers, params={"period": "30d", "groupBy": "source"} )
curl -G https://api.cloudfran.com/v1/revenue/summary \ -H "Authorization: Bearer sk_live_your_key" \ -d period=30d -d groupBy=source
200Response
{ "period": "30d", "total": 127500.00, "breakdown": { "stripe_subscriptions": 45000.00, "agent_bookings": 38200.00, "pos_transactions": 32800.00, "marketplace": 8500.00, "loyalty_wallet": 3000.00 }, "vsLastPeriod": "+14.2%" }

Smart Follow-Ups

AI-generated follow-up recommendations based on customer behavior, appointment history, and engagement patterns.

GET/api/followups/recommendationsGet follow-up list
AI-generated list of customers who should be contacted, ranked by urgency and expected value. The engine analyzes last visit, purchase patterns, appointment history, and communication engagement to prioritize outreach.

Parameters

NameTypeDescription
limitoptionalintMax recommendations (default: 25)
typeoptionalstringlapsed, post_visit, birthday, upsell
const response = await fetch( "https://api.cloudfran.com/v1/followups/recommendations?limit=10&type=lapsed", { headers } ); const { recommendations } = await response.json(); recommendations.forEach(r => console.log(`${r.customerName}: ${r.reason} (priority: ${r.priority})`) );
curl -G https://api.cloudfran.com/v1/followups/recommendations \ -H "Authorization: Bearer sk_live_your_key" \ -d limit=10 -d type=lapsed
200Response
{ "recommendations": [ {"customerId": "cust-042", "customerName": "Sarah J.", "reason": "No visit in 45 days (usually visits monthly)", "priority": "high", "suggestedAction": "Send 15% win-back offer via SMS", "expectedValue": 85.00}, {"customerId": "cust-089", "customerName": "Mike C.", "reason": "Birthday in 3 days", "priority": "medium", "suggestedAction": "Send birthday reward + free item", "expectedValue": 45.00} ] }

SuperAdmin Platform APIs

Platform-level administration for CloudFran operators. Manage tenants, monitor platform health, track SaaS revenue, and configure global settings. Requires sk_admin_ API key.

GET/api/admin/tenantsList all tenants
Retrieve all tenants on the platform with subscription status, plan, MRR, usage stats, and health indicators. SuperAdmin access only.

Parameters

NameTypeDescription
statusoptionalstringactive, suspended, trial, cancelled
planoptionalstringstarter, pro, enterprise
curl -G https://api.cloudfran.com/v1/admin/tenants \ -H "Authorization: Bearer sk_admin_your_key" \ -d status=active
200Response
{ "totalTenants": 247, "totalMRR": 52400.00, "tenants": [ {"id": "t-001", "name": "Happy Pet Grooming", "plan": "Professional", "mrr": 299.00, "locations": 3, "status": "active", "since": "2025-06-15"} ] }
GET/api/admin/saas-metricsSaaS metrics
Platform-level SaaS metrics: MRR, ARR, churn rate, LTV, CAC, expansion revenue, and cohort analysis. Essential for investor reporting and growth tracking.

Parameters

NameTypeDescription
periodoptionalstringmonthly, quarterly, yearly
const response = await fetch( "https://api.cloudfran.com/v1/admin/saas-metrics?period=monthly", { headers: { "Authorization": "Bearer sk_admin_your_key" } } ); const { mrr, arr, churnRate, ltv } = await response.json();
curl -G https://api.cloudfran.com/v1/admin/saas-metrics \ -H "Authorization: Bearer sk_admin_your_key" \ -d period=monthly
200Response
{ "mrr": 52400.00, "arr": 628800.00, "churnRate": 0.032, "ltv": 8750.00, "cac": 420.00, "ltvCacRatio": 20.8, "expansionMRR": 3200.00, "newMRR": 4800.00, "totalCustomers": 247, "trialConversion": 0.42 }
POST/api/admin/tenants/{id}/adjustAdjust tenant
Modify a tenant's plan, quota, or status. Used for upgrades, downgrades, custom deals, and administrative actions.

Parameters

NameTypeDescription
tenantIdrequiredstringTenant ID
planoptionalstringNew plan
customQuotasoptionalobjectOverride default quotas
statusoptionalstringactive, suspended
curl -X POST https://api.cloudfran.com/v1/admin/tenants/t-001/adjust \ -H "Authorization: Bearer sk_admin_your_key" \ -d '{"plan":"enterprise","customQuotas":{"apiCalls":100000}}'

Audio & Text-to-Speech

Generate high-quality voice audio for courses, agent responses, IVR prompts, and customer communications using Google Cloud TTS and OpenAI TTS.

POST/api/audio/generateGenerate audio
Generate speech audio from text. Supports multiple voices, languages, and output formats. Audio files are stored in Azure Blob Storage and returned as streaming URLs.

Parameters

NameTypeDescription
textrequiredstringText to convert to speech
provideroptionalstringgoogle_tts, openai_tts (default: google_tts)
voiceoptionalstringVoice ID (provider-specific)
formatoptionalstringmp3, wav, ogg (default: mp3)
speedoptionaldecimalSpeed: 0.5-2.0 (default: 1.0)
const response = await fetch("https://api.cloudfran.com/v1/audio/generate", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ text: "Thank you for calling Happy Pet Grooming. For appointments, press 1.", provider: "openai_tts", voice: "nova", format: "mp3" }) }); const { audioUrl, durationSeconds } = await response.json();
response = requests.post( "https://api.cloudfran.com/v1/audio/generate", headers=headers, json={"text": "Thank you for calling...", "provider": "openai_tts", "voice": "nova"} ) audio_url = response.json()["audioUrl"]
curl -X POST https://api.cloudfran.com/v1/audio/generate \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"text":"Thank you for calling...","provider":"openai_tts","voice":"nova"}'
200Response
{ "success": true, "audioUrl": "https://cdn.cloudfran.com/audio/gen-2026-02-17-001.mp3", "durationSeconds": 4.2, "provider": "openai_tts", "voice": "nova", "characterCount": 72, "cost": 0.003 }

📞 Voice AI Receptionist

Inbound call handling with AI-powered voice receptionist. Google Neural2 voices, GPT-4 conversation intelligence, 22 industries, SMS confirmations, live dashboard, call recording, and multilingual auto-detection.

POST/api/voice-receptionist/inbound

Main Twilio webhook — answers incoming calls with Neural2 voice greeting and speech gathering.

Form Parameters (from Twilio)

ParameterTypeDescription
CallSidstringTwilio unique call identifier
FromstringCaller phone (E.164)
TostringCalled number (resolves tenant)

Response: TwiML (application/xml)

TwiML Response
<Response>
  <Pause length="1"/>
  <Gather input="speech dtmf" action="/api/voice-receptionist/respond?callSid=..."
         speechTimeout="auto" language="en-US" speechModel="experimental_conversations">
    <Say voice="Google.en-US-Neural2-F">Thank you for calling BigBurger! How may I help you?</Say>
  </Gather>
  <Redirect>/api/voice-receptionist/no-input?callSid=...</Redirect>
</Response>
curl Example
curl -X POST https://yourdomain.com/api/voice-receptionist/inbound \
  -d "CallSid=test-001&From=+15551234567&To=+15559876543" \
  -H "Content-Type: application/x-www-form-urlencoded"
POST/api/voice-receptionist/respond?callSid={id}

Processes caller speech/DTMF during conversation. Detects intent (reservation, order, question, message, transfer, goodbye), manages conversation state, auto-switches language if non-English detected.

Query Parameters

ParameterTypeDescription
callSidstringCall identifier from inbound

Form Parameters

ParameterTypeDescription
SpeechResultstringTranscribed speech
ConfidencedecimalRecognition confidence (0-1)
DigitsstringDTMF digits (alternative)
POST/api/voice-receptionist/status

Call completion callback. Saves transcript to VoiceCallSessions, broadcasts CallEnded via SignalR.

Form Parameters

ParameterTypeDescription
CallSidstringCall identifier
CallStatusstringcompleted, failed, no-answer, busy
CallDurationstringDuration in seconds
POST/api/voice-receptionist/recording-status

Recording completion callback. Stores MP3 recording URL in VoiceCallSessions for call log playback.

Form Parameters

ParameterTypeDescription
RecordingSidstringTwilio recording ID
RecordingUrlstringURL to MP3 file
RecordingStatusstringcompleted, failed
GET/api/voice-receptionist/active-calls?tenantId={id}

Returns active calls for live dashboard. REST fallback when SignalR unavailable.

Response (JSON)

200 OK
[{
  "callSid": "CA1234567890abcdef",
  "callerPhone": "+15551234567",
  "intent": "MakeReservation",
  "turnCount": 3,
  "durationSeconds": 45,
  "lastMessage": "Could you provide the name for the reservation?",
  "language": "en"
}]
SignalR/voicecallhub

Real-time WebSocket hub for live call monitoring. Tenant-scoped groups.

Server → Client Events

EventDataTrigger
CallStartedcallSid, callerPhone, intent, turns, startedAtNew call answered
CallUpdatedcallSid, intent, turns, durationSeconds, lastMessageEach turn
CallEndedcallSid, outcome, durationSeconds, turnsCall completed

Client → Server Methods

MethodParametersPurpose
JoinTenantGrouptenantId (string)Subscribe to call events
LeaveTenantGrouptenantId (string)Unsubscribe

Voice Receptionist Webhook Events

voice.receptionist.call_started voice.receptionist.booking_confirmed voice.receptionist.order_confirmed voice.receptionist.message_captured voice.receptionist.transfer_requested voice.receptionist.call_ended voice.receptionist.language_switched

HR & Payroll

Complete human resources management: employee directory, payroll processing, timeclock, benefits enrollment, FMLA/COBRA/Workers Comp tracking, I-9/W-4 compliance, staff scheduling, HR billing, and role-based access control (RBAC) with 108 granular permissions.

GET/api/hr/employeesList employees
Retrieve all employees for a tenant with filtering by status, department, location, and employment type. Returns comprehensive profile data including pay rate, hire date, benefits eligibility, and compliance document status.

Parameters

NameTypeDescription
statusoptionalstringactive, inactive, terminated, onleave
departmentoptionalstringFilter by department name
locationoptionalstringFilter by franchise location
typeoptionalstringfulltime, parttime, contractor, seasonal
const response = await fetch( "https://api.cloudfran.com/v1/hr/employees?status=active&department=Kitchen", { headers } ); const { employees, total } = await response.json(); employees.forEach(e => console.log(`${e.name} - ${e.position} ($${e.payRate}/hr)`));
curl -G https://api.cloudfran.com/v1/hr/employees \ -H "Authorization: Bearer sk_live_your_key" \ -d status=active -d department=Kitchen
200Response
{ "total": 15, "employees": [ { "id": "EMP-001", "name": "Maria Rodriguez", "position": "Line Cook", "department": "Kitchen", "employmentType": "fulltime", "status": "active", "hireDate": "2024-03-15", "payRate": 18.50, "payType": "hourly", "location": "Downtown Location", "email": "maria.r@example.com", "phone": "+15551234567", "benefitsEligible": true, "i9Status": "verified", "w4Status": "current", "hoursThisWeek": 38.5 } ] }
POST/api/hr/employeesAdd employee
Create a new employee record with personal info, pay configuration, department assignment, and benefits eligibility. Automatically creates onboarding tasks and triggers the onboarding workflow.

Body Parameters

NameTypeDescription
firstNamerequiredstringEmployee first name
lastNamerequiredstringEmployee last name
emailrequiredstringEmployee email address
positionrequiredstringJob title
departmentrequiredstringDepartment name
payRaterequireddecimalPay rate (hourly or annual)
payTyperequiredstringhourly, salary
employmentTypeoptionalstringfulltime, parttime, contractor, seasonal
locationoptionalstringFranchise location assignment
startDateoptionalstringStart date (ISO 8601, default: today)
const response = await fetch("https://api.cloudfran.com/v1/hr/employees", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ firstName: "Carlos", lastName: "Mendez", email: "carlos.m@example.com", position: "Shift Manager", department: "Operations", payRate: 22.00, payType: "hourly", employmentType: "fulltime", location: "Westside Location", startDate: "2026-03-01" }) }); const { employee, onboardingTasks } = await response.json();
curl -X POST https://api.cloudfran.com/v1/hr/employees \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{"firstName":"Carlos","lastName":"Mendez","email":"carlos.m@example.com","position":"Shift Manager","department":"Operations","payRate":22.00,"payType":"hourly"}'
201Response
{ "employee": { "id": "EMP-016", "name": "Carlos Mendez", "position": "Shift Manager", "department": "Operations", "status": "onboarding", "hireDate": "2026-03-01", "payRate": 22.00, "payType": "hourly" }, "onboardingTasks": [ {"task": "Complete I-9 Verification", "dueDate": "2026-03-04", "status": "pending"}, {"task": "Submit W-4 Form", "dueDate": "2026-03-04", "status": "pending"}, {"task": "Benefits Enrollment", "dueDate": "2026-03-31", "status": "pending"}, {"task": "Direct Deposit Setup", "dueDate": "2026-03-08", "status": "pending"}, {"task": "Complete Safety Training", "dueDate": "2026-03-15", "status": "pending"} ] }
GET/api/hr/payroll/runsList payroll runs
Retrieve payroll run history with status, totals, and per-employee breakdowns. Each run includes gross pay, deductions (federal tax, state tax, FICA, benefits), garnishments, and net pay calculations using real 50-state tax rates.

Parameters

NameTypeDescription
statusoptionalstringdraft, processing, completed, voided
periodoptionalstringweekly, biweekly, semimonthly, monthly
afteroptionalstringRuns after date (ISO 8601)
const response = await fetch( "https://api.cloudfran.com/v1/hr/payroll/runs?status=completed&period=biweekly", { headers } ); const { runs } = await response.json(); console.log(`Latest run: $${runs[0].totalGross} gross, $${runs[0].totalNet} net`);
curl -G https://api.cloudfran.com/v1/hr/payroll/runs \ -H "Authorization: Bearer sk_live_your_key" \ -d status=completed
200Response
{ "runs": [ { "id": "PR-2026-004", "payDate": "2026-02-14", "periodStart": "2026-01-27", "periodEnd": "2026-02-09", "frequency": "biweekly", "status": "completed", "employeeCount": 15, "totalGross": 28450.00, "totalFederalTax": 4267.50, "totalStateTax": 1422.50, "totalFica": 2176.42, "totalBenefits": 1875.00, "totalGarnishments": 350.00, "totalNet": 18358.58, "processedAt": "2026-02-13T16:00:00Z" } ] }
POST/api/hr/payroll/runsRun payroll
Create and process a new payroll run. Automatically pulls timeclock hours, calculates federal and state taxes for all 50 states, applies benefit deductions, processes garnishments, and generates pay stubs.

Body Parameters

NameTypeDescription
payDaterequiredstringPay date (ISO 8601)
periodStartrequiredstringPeriod start date
periodEndrequiredstringPeriod end date
includeEmployeesoptionalarrayEmployee IDs (default: all active)
autoProcessoptionalboolAuto-process (default: false = draft)
const response = await fetch("https://api.cloudfran.com/v1/hr/payroll/runs", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ payDate: "2026-02-28", periodStart: "2026-02-10", periodEnd: "2026-02-23", autoProcess: false }) }); const { run, entries } = await response.json();
curl -X POST https://api.cloudfran.com/v1/hr/payroll/runs \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{"payDate":"2026-02-28","periodStart":"2026-02-10","periodEnd":"2026-02-23","autoProcess":false}'
201Response
{ "run": { "id": "PR-2026-005", "status": "draft", "payDate": "2026-02-28", "employeeCount": 15, "totalGross": 29100.00, "totalNet": 18780.25 }, "entries": [ { "employeeId": "EMP-001", "employeeName": "Maria Rodriguez", "hoursRegular": 80.0, "hoursOvertime": 4.5, "grossPay": 1605.75, "federalTax": 240.86, "stateTax": 80.29, "fica": 122.84, "benefitDeductions": 125.00, "garnishments": 0.00, "netPay": 1036.76, "state": "GA" } ] }
POST/api/hr/timeclockClock in/out
Record employee clock-in/out events. Supports regular shifts, breaks, and overtime. Auto-calculates hours, detects overtime based on weekly totals and state rules, flags scheduling conflicts.

Body Parameters

NameTypeDescription
employeeIdrequiredstringEmployee ID
actionrequiredstringclock_in, clock_out, break_start, break_end
locationoptionalstringFranchise location
timestampoptionalstringOverride time (ISO 8601, default: now)
noteoptionalstringManager note or reason
const response = await fetch("https://api.cloudfran.com/v1/hr/timeclock", { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ employeeId: "EMP-001", action: "clock_in", location: "Downtown Location" }) }); const { entry, weeklyHours, overtimeAlert } = await response.json();
curl -X POST https://api.cloudfran.com/v1/hr/timeclock \ -H "Authorization: Bearer sk_live_your_key" \ -d '{"employeeId":"EMP-001","action":"clock_in","location":"Downtown Location"}'
200Response
{ "entry": { "id": "TC-20260225-001", "employeeId": "EMP-001", "action": "clock_in", "timestamp": "2026-02-25T08:02:15Z", "location": "Downtown Location" }, "weeklyHours": {"regular": 24.0, "overtime": 0.0, "total": 24.0, "remaining": 16.0}, "overtimeAlert": false, "scheduledShift": {"start": "08:00", "end": "16:00", "lateMinutes": 2} }
GET/api/hr/schedulesGet schedules
Staff schedules for a date range with shift assignments, coverage gaps, overtime projections, and scheduling conflicts. Supports week/day views with location filtering.

Parameters

NameTypeDescription
weekOfoptionalstringWeek start date (default: current)
locationoptionalstringFilter by location
departmentoptionalstringFilter by department
const response = await fetch( "https://api.cloudfran.com/v1/hr/schedules?weekOf=2026-02-23&location=Downtown", { headers } ); const { shifts, coverageGaps, overtimeRisk } = await response.json();
curl -G https://api.cloudfran.com/v1/hr/schedules \ -H "Authorization: Bearer sk_live_your_key" \ -d weekOf=2026-02-23
200Response
{ "weekOf": "2026-02-23", "shifts": [ {"employeeId": "EMP-001", "employeeName": "Maria Rodriguez", "day": "Monday", "startTime": "08:00", "endTime": "16:00", "hours": 8.0, "position": "Line Cook", "status": "confirmed"} ], "coverageGaps": [ {"day": "Saturday", "timeSlot": "14:00-18:00", "department": "Front Counter", "needed": 2, "assigned": 1} ], "overtimeRisk": [ {"employeeId": "EMP-003", "name": "Jake Thompson", "projectedHours": 44.5, "overtimeHours": 4.5} ], "totalScheduledHours": 480, "laborCostEstimate": 8640.00 }
GET/api/hr/benefitsBenefits overview
Benefits enrollment status: medical, dental, vision, life insurance, 401(k), HSA. Includes open enrollment periods, COBRA eligibility, and FMLA leave tracking.

Parameters

NameTypeDescription
typeoptionalstringmedical, dental, vision, life, retirement, hsa
statusoptionalstringactive, pending, waived, cobra
const response = await fetch("https://api.cloudfran.com/v1/hr/benefits?type=medical", { headers }); const { enrollments, summary, openEnrollment } = await response.json();
curl -G https://api.cloudfran.com/v1/hr/benefits \ -H "Authorization: Bearer sk_live_your_key" \ -d type=medical
200Response
{ "enrollments": [ {"employeeId": "EMP-001", "employeeName": "Maria Rodriguez", "benefitType": "medical", "planName": "PPO Gold", "coverage": "employee_family", "employeeCost": 125.00, "employerCost": 375.00, "status": "active"} ], "summary": {"totalEnrolled": 12, "totalWaived": 3, "monthlyEmployerCost": 4500.00, "monthlyEmployeeCost": 1500.00}, "openEnrollment": {"status": "closed", "nextWindowStart": "2026-11-01", "nextWindowEnd": "2026-11-30"}, "cobraEligible": 2, "fmlaActive": 1 }
GET/api/hr/complianceCompliance status
HR compliance dashboard: I-9 verification, W-4 withholding, FMLA leave tracking, COBRA continuation, workers comp claims, garnishment processing, and document expiration alerts sorted by urgency.

Parameters

NameTypeDescription
categoryoptionalstringi9, w4, fmla, cobra, workers_comp, garnishments
urgencyoptionalstringcritical, warning, info
const response = await fetch("https://api.cloudfran.com/v1/hr/compliance?urgency=critical", { headers }); const { alerts, complianceScore } = await response.json();
curl -G https://api.cloudfran.com/v1/hr/compliance \ -H "Authorization: Bearer sk_live_your_key" \ -d urgency=critical
200Response
{ "complianceScore": 87, "alerts": [ {"category": "i9", "urgency": "critical", "message": "I-9 expires in 7 days for EMP-005", "dueDate": "2026-03-04"}, {"category": "cobra", "urgency": "warning", "message": "COBRA election deadline in 14 days for EMP-012", "dueDate": "2026-03-11"}, {"category": "fmla", "urgency": "info", "message": "EMP-008 has 4 weeks FMLA remaining", "weeksRemaining": 4} ], "summary": { "i9": {"verified": 13, "expiringSoon": 1, "pending": 1}, "w4": {"current": 14, "needsUpdate": 1}, "fmla": {"activeLeaves": 1}, "cobra": {"activeParticipants": 2, "pendingElection": 1}, "workersComp": {"openClaims": 1}, "garnishments": {"active": 3, "totalMonthlyAmount": 850.00} } }
GET/api/hr/billingHR billing summary
HR module billing: $29/mo base + $4.50 PEPM + event charges (payroll runs, new hires, terminations, compliance checks). Includes Stripe invoice history and projected costs.

Parameters

NameTypeDescription
periodoptionalstringcurrent, last_month, ytd
includeInvoicesoptionalboolInclude Stripe invoices (default: false)
const response = await fetch("https://api.cloudfran.com/v1/hr/billing?period=current&includeInvoices=true", { headers }); const { currentCharges, projectedMonthly } = await response.json();
curl -G https://api.cloudfran.com/v1/hr/billing \ -H "Authorization: Bearer sk_live_your_key" \ -d period=current
200Response
{ "currentCharges": { "basePlatformFee": 29.00, "pepmCharges": {"employeeCount": 15, "ratePerEmployee": 4.50, "total": 67.50}, "eventCharges": [ {"event": "payroll_run", "count": 2, "rate": 5.00, "total": 10.00}, {"event": "new_hire_onboarding", "count": 1, "rate": 15.00, "total": 15.00}, {"event": "compliance_check", "count": 3, "rate": 2.00, "total": 6.00} ], "totalThisMonth": 127.50 }, "projectedMonthly": 155.75, "projectedAnnual": 1869.00 }
GET/api/hr/permissionsRBAC permissions
Role-based access control with 108 permissions across 12 modules. Roles: SuperAdmin, Admin, HR Manager, Payroll Admin, Manager, Employee, custom. Cached with 10-minute TTL.

Parameters

NameTypeDescription
userIdoptionalstringPermissions for specific user
roleoptionalstringPermissions for a role
const response = await fetch("https://api.cloudfran.com/v1/hr/permissions?role=hr_manager", { headers }); const { role, permissions, modules } = await response.json();
curl -G https://api.cloudfran.com/v1/hr/permissions \ -H "Authorization: Bearer sk_live_your_key" \ -d role=hr_manager
200Response
{ "role": "hr_manager", "displayName": "HR Manager", "tier": "manager", "totalPermissions": 72, "modules": { "employees": ["view", "create", "edit", "terminate", "view_salary"], "payroll": ["view", "create_draft", "approve"], "timeclock": ["view", "edit", "approve_corrections"], "benefits": ["view", "enroll", "modify"], "compliance": ["view", "upload_documents", "run_audits"], "scheduling": ["view", "create", "edit", "publish"], "reports": ["view", "export"], "billing": ["view"] }, "restrictions": ["cannot_delete_employees", "cannot_void_payroll", "cannot_modify_tax_rates"] }
GET/api/buildara/partnersList partners
Retrieve all Buildara partners. Supports filtering by status and tier. Admin-only endpoint.

Parameters

NameTypeDescription
statusoptionalstringFilter: active, pending, suspended
tieroptionalstringFilter: starter, growth, enterprise
const response = await fetch("https://api.cloudfran.com/v1/buildara/partners?tier=growth", { headers }); const { partners, total } = await response.json();
curl -G https://api.cloudfran.com/v1/buildara/partners -H "Authorization: Bearer sk_live_your_key" -d tier=growth
200Response
{ "partners": [{ "id": "BP-A1B2C3D4", "fullName": "Marcus Johnson", "tier": "growth", "status": "active", "revenueSharePercent": 30, "totalRevenue": 48500.00, "totalCustomers": 12 }], "total": 1 }
POST/api/buildara/applySubmit partner application
Submit a new Buildara partner application. Reviewed within 48 hours. Financing requires credit consent and SSN last 4.

Body Parameters

NameTypeDescription
fullNamerequiredstringApplicant full name
emailrequiredstringContact email
requestedTierrequiredstringTier: starter, growth, enterprise
financingRequestedoptionalbooleanRequest financing for setup fee
const response = await fetch("https://api.cloudfran.com/v1/buildara/apply", { method: "POST", headers, body: JSON.stringify({ fullName: "Jane Smith", email: "jane@acme.com", requestedTier: "growth" }) });
curl -X POST https://api.cloudfran.com/v1/buildara/apply -H "Authorization: Bearer sk_live_your_key" -H "Content-Type: application/json" -d '{"fullName":"Jane Smith","email":"jane@acme.com","requestedTier":"growth"}'
200Response
{ "applicationId": "BA-APP-X7K2M9P1", "status": "submitted", "message": "Application received. Review within 48 hours." }
GET/api/buildara/dashboard/{partnerId}Partner dashboard stats
Retrieve dashboard statistics for a partner including revenue, customers, financing status, and monthly breakdown.

Parameters

NameTypeDescription
partnerIdrequiredstringPartner ID (e.g., BP-A1B2C3D4)
const response = await fetch("https://api.cloudfran.com/v1/buildara/dashboard/BP-DEMO-001", { headers }); const { totalRevenue, totalRevenueShare, customers } = await response.json();
curl https://api.cloudfran.com/v1/buildara/dashboard/BP-DEMO-001 -H "Authorization: Bearer sk_live_your_key"
200Response
{ "partnerId": "BP-DEMO-001", "tier": "growth", "totalRevenue": 48500.00, "totalRevenueShare": 14550.00, "totalCustomers": 12, "monthlyFee": 249.00, "financing": { "balance": 8568.24, "monthlyPayment": 1428.04, "paymentsMade": 5 } }
GET/api/buildara/revenue/{partnerId}Revenue breakdown
Detailed revenue breakdown showing gross revenue, partner share, CloudFran share, and sales force share per customer and period.

Parameters

NameTypeDescription
partnerIdrequiredstringPartner ID
periodoptionalstringFilter by period (YYYY-MM)
const response = await fetch("https://api.cloudfran.com/v1/buildara/revenue/BP-DEMO-001?period=2026-03", { headers }); const { entries, totalGross, totalPartnerShare } = await response.json();
curl -G https://api.cloudfran.com/v1/buildara/revenue/BP-DEMO-001 -H "Authorization: Bearer sk_live_your_key" -d period=2026-03
200Response
{ "entries": [{ "customerName": "Sunrise Cafe", "serviceType": "FoodPulse Pro", "grossRevenue": 499.00, "partnerShare": 149.70, "cloudFranShare": 349.30 }], "totalGross": 4850.00, "totalPartnerShare": 1455.00 }

Webhook Event Catalog

Subscribe to any of these events in your Webhook Management settings. Events are delivered as POST requests with JSON payloads and signature headers.

Agent Events

appointment.booked appointment.cancelled appointment.reminder sms.delivered sms.failed sms.opt_out voice.completed voice.failed fraud.alert superagent.query_complete

CRM Events

lead.created lead.qualified lead.converted customer.updated deal.stage_changed deal.won deal.lost campaign.completed

Loyalty Events

loyalty.points_earned loyalty.reward_redeemed loyalty.tier_changed loyalty.checkin loyalty.referral_complete wallet.funds_loaded wallet.transfer

Inventory Events

inventory.low_stock inventory.out_of_stock transfer.requested transfer.completed transfer.rejected

Exchange Events

project.posted proposal.submitted proposal.accepted milestone.completed dispute.filed payment.released

LMS Events

course.enrolled course.completed quiz.passed quiz.failed certificate.issued

HR & Payroll Events

hr.employee.hired hr.employee.terminated hr.employee.status_changed hr.payroll.run_completed hr.payroll.run_voided hr.timeclock.clock_in hr.timeclock.clock_out hr.timeclock.overtime_alert hr.benefits.enrolled hr.benefits.open_enrollment_start hr.fmla.leave_started hr.fmla.leave_ended hr.cobra.election_deadline hr.compliance.i9_expiring hr.compliance.document_due hr.workers_comp.claim_filed hr.scheduling.shift_published hr.scheduling.coverage_gap hr.billing.invoice_created hr.onboarding.task_overdue

HR & Payroll Events

hr.employee.hired hr.employee.terminated hr.employee.status_changed hr.payroll.run_completed hr.payroll.run_voided hr.timeclock.clock_in hr.timeclock.clock_out hr.timeclock.overtime_alert hr.benefits.enrolled hr.benefits.open_enrollment_start hr.fmla.leave_started hr.fmla.leave_ended hr.cobra.election_deadline hr.compliance.i9_expiring hr.compliance.document_due hr.workers_comp.claim_filed hr.scheduling.shift_published hr.scheduling.coverage_gap hr.billing.invoice_created hr.onboarding.task_overdue

Buildara Partner Events

buildara.application.submitted buildara.application.approved buildara.partner.activated buildara.revenue.recorded buildara.payout.completed buildara.financing.payment_due buildara.customer.onboarded

Billing Events

subscription.created subscription.renewed subscription.cancelled invoice.paid quota.warning quota.exceeded