Data Models

Complete reference for all data structures and schemas used across the API

User Model

User account and profile information

_id ObjectId Unique user identifier
username String Required User's login username
email String Required User's email address
fullName String User's full name
role String User role: 'user', 'admin', 'super-admin'
stripeKeys Object Stripe API configuration for payments
stripeKeys.publishableKey String Stripe publishable key
stripeKeys.secretKey String Stripe secret key (encrypted)
stripeKeys.isConfigured Boolean Whether Stripe is configured
createdAt Date Account creation timestamp

Document Model

Document editor and signature request with payment support

_id ObjectId Unique document identifier
name String Required Document name/title
userId ObjectId Required Document owner reference
status String Status: 'draft', 'sent', 'completed', 'cancelled'
canvasData Object Document canvas configuration and elements
signingOrder Array Array of signer objects with order, email, name, status
paymentSettings Object Payment collection settings
paymentSettings.requirePayment Boolean Whether payment is required
paymentSettings.amount Number Payment amount
paymentSettings.currency String Currency code (e.g., 'USD', 'CAD')
paymentSettings.paymentProvider String Provider: 'stripe', 'paypal', etc.
paymentSettings.collectPaymentBefore String Timing: 'signing' or 'submission'
paymentTransactions Array Array of payment transaction records
createdAt Date Document creation timestamp

SignatureRequest Model

Individual signature request for document signers with payment tracking

_id ObjectId Unique signature request identifier
documentId ObjectId Required Reference to parent document
signer.email String Required Signer's email address
signer.name String Signer's full name
status String Status: 'pending', 'signed', 'declined', 'expired'
accessToken String Unique access token for signing
paymentTracking.required Boolean Whether payment is required
paymentTracking.status String Payment status: 'pending', 'completed', 'failed'
paymentTracking.paymentIntentId String Stripe payment intent ID
signedAt Date Signature completion timestamp

Listing Model

Virtual office and space listing information

name String Required Listing title/name
category String Required Category: 'virtual-office', 'office-space', 'meeting-room', 'coworking'
price Number Required Price per billing period
location.address String Street address
location.city String City name
amenities Array Array of amenity strings
availability String Availability status: 'available', 'booked', 'unavailable'

Booking Model

Booking and reservation information

listingId ObjectId Required Reference to listing
startDate Date Required Booking start date
endDate Date Required Booking end date
status String Status: 'pending', 'confirmed', 'cancelled', 'completed'
paymentStatus String Payment status: 'pending', 'paid', 'refunded'

Appointment Model

Appointment booking and scheduling information

title String Required Appointment title
startTime Date Required Appointment start time
endTime Date Required Appointment end time
status String Status: 'scheduled', 'confirmed', 'cancelled', 'completed'
attendees Array Array of attendee objects

Form Model

Dynamic form builder configuration

name String Required Form name/title
fields Array Required Array of form field configurations
fields[].type String Field type: 'text', 'email', 'textarea', 'select'
fields[].required Boolean Whether field is required
submissionSettings Object Form submission configuration

Authentication APIs

Secure user authentication and session management endpoints

POST /login
Stable

Authenticate user credentials and establish session

Parameters
email string required
password string required
Response

Redirects to dashboard on success or returns error message

POST /signup
Stable

Register new user account with validation

Parameters
username string required
email string required
password string required
firstName string optional
lastName string optional
Response

Creates new user account and sends welcome email

GET /logout
Stable

Terminate user session and clear authentication

Authentication

User session required

Response

Destroys session and redirects to login page

API Keys Management

Generate and manage API keys for programmatic access to your account

Quick Start: Generate an API key from your User Profile and use it in your requests with the X-API-Key header or Authorization: Bearer YOUR_KEY header.
POST /api/user/generate-api-key
New

Generate a new API key or regenerate existing one

Authentication

User session required

Response
{
  "success": true,
  "apiKey": "sk_1234567890abcdef...",
  "message": "API key generated successfully"
}

Save the API key securely - it will only be shown once!

GET /api/user/api-key
New

Check API key status and metadata

Authentication

User session required

Response
{
  "success": true,
  "apiEnabled": true,
  "hasApiKey": true,
  "apiKeyCreatedAt": "2024-01-15T10:30:00Z",
  "apiKeyLastUsed": "2024-01-20T15:45:00Z"
}
DELETE /api/user/api-key
New

Permanently revoke your API key

Authentication

User session required

Response
{
  "success": true,
  "message": "API key revoked successfully"
}

Variables Management API

Manage document variables programmatically using API key authentication

Authentication: All endpoints require API key authentication. Include your API key in the request header: X-API-Key: your_api_key
GET /api/v1/documents/:documentId/variables
New

Retrieve all variables for a specific document

Authentication

API key required (X-API-Key header)

URL Parameters
documentId string required - Document ID
Response
{
  "success": true,
  "variables": [
    {
      "id": "var_123",
      "name": "customerName",
      "type": "custom",
      "value": "John Doe",
      "description": "Customer full name",
      "editable": true,
      "createdAt": "2024-01-15T10:30:00Z",
      "recipientId": null
    }
  ],
  "count": 1
}
POST /api/v1/documents/:documentId/variables
New

Create a new variable in a document

Authentication

API key required (X-API-Key header)

URL Parameters
documentId string required - Document ID
Request Body
name string required - Variable name
value string optional - Variable value
description string optional - Description
type string optional - Type: 'system', 'role', 'custom' (default: 'custom')
recipientId string optional - Link to recipient/signer
Example Request
{
  "name": "contractAmount",
  "value": "$10,000",
  "description": "Total contract amount",
  "type": "custom"
}
Response
{
  "success": true,
  "variable": {
    "id": "var_456",
    "name": "contractAmount",
    "type": "custom",
    "value": "$10,000",
    "description": "Total contract amount",
    "editable": true,
    "createdAt": "2024-01-20T14:30:00Z",
    "recipientId": null
  },
  "message": "Variable created successfully"
}
PUT /api/v1/documents/:documentId/variables/:variableId
New

Update an existing variable

Authentication

API key required (X-API-Key header)

URL Parameters
documentId string required - Document ID
variableId string required - Variable ID
Request Body
name string optional - Updated variable name
value string optional - Updated value
description string optional - Updated description
Response
{
  "success": true,
  "variable": {
    "id": "var_456",
    "name": "contractAmount",
    "value": "$12,000",
    "description": "Updated contract amount"
  },
  "message": "Variable updated successfully"
}
DELETE /api/v1/documents/:documentId/variables/:variableId
New

Delete a variable from a document

Authentication

API key required (X-API-Key header)

URL Parameters
documentId string required - Document ID
variableId string required - Variable ID
Response
{
  "success": true,
  "message": "Variable deleted successfully"
}
Additional Document Endpoints

You can also access these document-related endpoints with your API key:

  • GET /api/v1/documents - List all your documents
  • GET /api/v1/documents/:documentId - Get document details

Listings APIs

Property listing management and search functionality

GET /listings
Stable

Retrieve all approved property listings with pagination

Authentication

None required - Public endpoint

Response

HTML page with paginated listing results

POST /create-listing
Stable

Submit new property listing for admin review

Authentication

User session required

Parameters
title string required
description text required
price number required
images file[] optional
Response

Creates listing with pending status for admin approval

GET /listings/details/:id
Stable

Get comprehensive details for a specific property listing

Authentication

None required - Public endpoint

Parameters
id string required Listing ID in URL path
Response

Detailed listing page with images, contact forms, and booking options

GET /listings/cities
Stable

Get all cities that have available property listings

Authentication

None required - Public endpoint

Response

HTML page displaying cities with listing counts

Messages APIs

Customer inquiry and communication management system

POST /api/listings/:listingId/messages
Stable

Send inquiry or viewing request for a property listing

Authentication

None required - Public endpoint for customer inquiries

Parameters
name string required
email email required
phone string optional
message text required
messageType enum required contact_inquiry | viewing_request
Response

Creates message for admin review and sends confirmation email

GET /admin/messages
Stable

Admin dashboard for managing all customer messages and inquiries

Authentication

Admin role required

Response

HTML page with message management interface, filtering, and response tools

PATCH /admin/messages/:messageId/read
Stable

Mark a customer message as read for tracking purposes

Authentication

Admin role required

Parameters
messageId string required Message ID in URL path
Response

Updates message read status and timestamp

POST /admin/messages/:messageId/reply
Stable

Send email response to customer inquiry with automated tracking

Authentication

Admin role required

Parameters
messageId string required Message ID in URL path
reply text required Admin response content
Response

Sends email reply to customer and logs response in system

Website Builder APIs

Complete website creation and management system with AI assistance

POST /website-builder/save
Stable

Save website content and configuration to database

Authentication

User session required

Parameters
content html required Complete website HTML
name string optional
isPublished boolean optional
Response

Saves website data with versioning and backup

POST /website-builder/publish
Stable

Toggle website publication status for public access

Authentication

User session required

Parameters
isPublished boolean required
Response

Updates publication status and generates public URL

GET /website-builder/export
Stable

Download complete website as exportable ZIP archive

Authentication

User session required

Response

ZIP file containing HTML, CSS, JS, and assets

POST /website-builder/domain-settings
Stable

Configure custom domain with DNS verification

Authentication

User session required

Parameters
domain string required Custom domain name
Response

Validates domain and provides DNS configuration instructions

Widget APIs

Comprehensive API endpoints for managing website widgets including form builders, appointment booking, product catalogs, and interactive components

GET /api/form-builder/test
Stable

Test endpoint to verify form builder API availability and list all available endpoints.

Response Example
{
  "success": true,
  "message": "Form Builder API is working",
  "endpoints": [
    "POST /api/form-builder/create",
    "GET /api/form-builder/list",
    "PUT /api/form-builder/:formId"
  ]
}
POST /api/form-builder/create
Stable

Create a new form builder widget with custom fields, SendGrid integration, and email templates.

Request Parameters
widgetId string required Unique identifier for the widget
title string required Form title displayed to users
description string optional Form description or instructions
fields array required Array of form field objects with type, label, required, placeholder
sendgridConfig object optional SendGrid API key configuration for email delivery
emailNotifications object optional Email notification settings and templates
Authentication

Requires user login session

GET /api/form-builder/list
Stable

Retrieve all form builder widgets for the authenticated user.

Authentication

Requires user login session

GET /api/form-builder/:formId
Stable

Get details of a specific form builder widget by form ID.

Path Parameters
formId string required Unique form identifier
Authentication

Requires user login session

PUT /api/form-builder/:formId
Stable

Update an existing form builder widget configuration, fields, and settings.

Path Parameters
formId string required Form ID to update
Authentication

Requires user login session

DELETE /api/form-builder/:formId
Stable

Delete a form builder widget and all associated data.

Path Parameters
formId string required Form ID to delete
Authentication

Requires user login session

POST /api/form-submissions
Stable

Submit form data to a published form widget. Supports file uploads and triggers email notifications.

Request Parameters
formId string required Target form ID for submission
formData object required Form field values matching form configuration
files multipart optional File uploads (max 10 files)
Rate Limiting

Limited by IP address and daily submission limits configured per form

GET /api/form-builder/:formId/submissions
Stable

Retrieve paginated list of form submissions with analytics data.

Query Parameters
page number optional Page number (default: 1)
limit number optional Results per page (default: 10)
Authentication

Requires user login session

POST /api/form-builder/test-sendgrid
Stable

Validate SendGrid API key before saving to form configuration.

Request Parameters
apiKey string required SendGrid API key to validate
Authentication

Requires user login session

GET /api/appointment-types
Stable

Get all available appointment types for booking widgets with pricing and duration information.

Response Example
{
  "success": true,
  "appointmentTypes": [
    {
      "id": "consultation",
      "name": "Business Consultation",
      "description": "One-on-one consultation for business development",
      "price": 150,
      "duration": 60,
      "icon": "fa-handshake-o"
    }
  ]
}
GET /api/appointment-slots/:date
Stable

Get available time slots for appointment booking on a specific date.

Path Parameters
date string required Date in YYYY-MM-DD format
Query Parameters
duration number optional Appointment duration in minutes (default: 60)
POST /api/create-appointment-payment-intent
Stable

Create Stripe payment intent for appointment booking with automatic slot validation.

Request Parameters
appointmentTypeId string required Type of appointment to book
date string required Appointment date
time string required Appointment time
duration number required Duration in minutes
Authentication

Requires user login session

GET /api/website/:websiteId/checkout-widget-info
Stable

Get checkout widget configuration and payment information for e-commerce widgets.

Path Parameters
websiteId string required Website identifier
POST /api/upload-image
Stable

Upload images for website widgets with automatic optimization and CDN delivery.

Request Parameters
image file required Image file (JPG, PNG, GIF, WebP - max 5MB)
File Constraints

Maximum file size: 5MB
Supported formats: JPG, PNG, GIF, WebP
Automatic optimization and resizing to 1200x800px

Authentication

Requires user login session

AI Services APIs

Artificial intelligence powered content generation and enhancement

POST /api/ai/improve-text
Stable

Enhance text content using advanced AI language models

Authentication

User session required

Parameters
currentText text required
prompt string required Improvement instruction
Response

Enhanced text with improved grammar, tone, and clarity

POST /api/ai/generate-html
Stable

Generate HTML content from natural language descriptions

Authentication

User session required

Parameters
prompt text required Description of desired HTML
Response

Generated HTML code with proper structure and styling

POST /api/ai-website-builder
Stable

Generate complete website using AI with images and content

Authentication

User session required

Parameters
businessName string required
businessType string required
description text required
Response

Complete website HTML with curated images from Unsplash

POST /api/ai/generate-products
Stable

Generate product listings with descriptions and pricing

Authentication

User session required

Parameters
productType string required
count number required
details object optional
Response

Array of generated products with names, descriptions, and prices

Bookings APIs

Property tour and boardroom reservation management system

POST /create-booking
Stable

Schedule property tour with automated email confirmations

Authentication

None required - Public booking endpoint

Parameters
name string required
email email required
phone string optional
date date required
time time required
message text optional
Response

Creates booking and sends confirmation email to customer and admin

POST /create-boardroom-booking
Stable

Reserve boardroom with time slot validation and conflict checking

Authentication

None required - Public booking endpoint

Parameters
name string required
email email required
date date required
startTime time required
endTime time required
Response

Creates boardroom reservation with availability validation

GET /api/user-boardroom-bookings
Stable

Retrieve user's boardroom bookings with status and details

Authentication

User session required

Response

JSON array of user's bookings with dates, times, and status

POST /update-booking-status/:id
Stable

Update booking status with automated customer notifications

Authentication

Admin role required

Parameters
id string required Booking ID in URL path
status enum required confirmed | cancelled | pending
Response

Updates booking status and sends notification email to customer

Appointments APIs

Professional appointment scheduling with calendar integration

GET /api/appointment-types
Stable

Retrieve available appointment types with pricing and duration

Authentication

None required - Public endpoint

Response

JSON array of appointment types with pricing and availability

GET /api/appointment-slots/:date
Stable

Get available time slots for specific date with real-time availability

Authentication

None required - Public endpoint

Parameters
date date required Date in URL path (YYYY-MM-DD)
Response

JSON array of available time slots with provider availability

POST /api/create-appointment-payment-intent
Stable

Create Stripe payment intent for appointment booking with secure payment

Authentication

User session required

Parameters
appointmentTypeId string required Appointment type to book
date date required Appointment date
time time required Appointment time
Response

Stripe payment intent with client secret for secure payment processing

GET /api/user-appointments
Stable

Retrieve user's appointments with status tracking and details

Authentication

User session required

Response

JSON array of user appointments with payment status and provider details

User Services APIs

User service management and provider operations platform

GET /api/services
Stable

Retrieve user's services with comprehensive details and statistics

Authentication

User session required

Response

JSON array of user's services with pricing, bookings, and status

POST /api/services
Stable

Create new service offering with full configuration

Authentication

User session required

Parameters
name string required Service name
description text required Service description
price number required Service price in cents
duration number required Duration in minutes
Response

Creates new service and makes it available for booking

PUT /api/services/:id
Stable

Update service details with validation and notification

Authentication

User session required - Service owner only

Parameters
id string required Service ID in URL path
name string optional Updated service name
description text optional Updated description
price number optional Updated price
duration number optional Updated duration
Response

Updates service details and notifies existing customers

PATCH /api/services/:id/toggle
Stable

Toggle service active status with booking impact handling

Authentication

User session required - Service owner only

Parameters
id string required Service ID in URL path
Response

Toggles service status and manages existing bookings accordingly

E-commerce APIs

Complete e-commerce solution with product management and payment processing

GET /api/websites/:websiteId/products
Stable

Retrieve products for specific website with inventory and pricing

Authentication

Website owner authentication required

Parameters
websiteId string required Website ID in URL path
category string optional Filter by category
inStock boolean optional Filter by stock status
Response

JSON array of products with images, pricing, and inventory data

POST /api/websites/:websiteId/products
Stable

Create new product with image upload and inventory management

Authentication

Website owner authentication required

Parameters
websiteId string required Website ID in URL path
name string required Product name
description text required Product description
price number required Price in cents
images file[] optional Product images
inventory number optional Stock quantity
Response

Creates product with image processing and inventory tracking

GET /api/websites/:websiteId/cart
Stable

Retrieve shopping cart with items and calculated totals

Authentication

None required - Session-based cart

Parameters
websiteId string required Website ID in URL path
Response

Cart items with quantities, pricing, and calculated totals

POST /api/websites/:websiteId/cart/add
Stable

Add product to cart with inventory validation

Authentication

None required - Session-based cart

Parameters
websiteId string required Website ID in URL path
productId string required Product to add to cart
quantity number required Quantity to add
Response

Updates cart with inventory validation and total calculation

POST /api/websites/:websiteId/orders
Stable

Create order from cart with payment processing and fulfillment

Authentication

None required - Guest checkout supported

Parameters
websiteId string required Website ID in URL path
customerInfo object required Customer details (name, email, address)
paymentMethod string required Stripe payment method ID
Response

Creates order, processes payment, and sends confirmation emails

Billing APIs

Subscription management and payment processing with Stripe integration

GET /api/subscription-plans
Stable

Retrieve available subscription plans with pricing and features

Authentication

User session required

Response

JSON array of subscription plans with pricing tiers and feature lists

GET /api/user-subscriptions
Stable

Get user's active subscriptions with status and billing details

Authentication

User session required

Response

JSON array of user subscriptions with billing cycles and payment status

POST /subscriptions/create
Stable

Create new subscription with automated billing setup

Authentication

User session required

Parameters
planId string required Subscription plan ID
paymentMethod string required Stripe payment method ID
billingCycle enum optional monthly | yearly
Response

Creates subscription and sets up recurring billing with confirmation

POST /api/user/stripe-settings
Stable

Configure Stripe API keys for payment processing

Authentication

User session required

Parameters
publishableKey string required Stripe publishable key
secretKey string required Stripe secret key (encrypted)
webhookSecret string optional Webhook endpoint secret
Response

Securely stores encrypted Stripe keys for payment processing

Admin APIs

Administrative operations for platform management and moderation

POST /admin/approve-listing/:id
Stable

Approve pending listing for public display with notifications

Authentication

Admin role required

Parameters
id string required Listing ID in URL path
Response

Approves listing and sends confirmation email to listing owner

POST /admin/reject-listing/:id
Stable

Reject listing with reason and automated user notification

Authentication

Admin role required

Parameters
id string required Listing ID in URL path
rejectionReason text required Reason for rejection
Response

Rejects listing and sends detailed feedback to listing owner

POST /admin/ai-scrape-url
Stable

AI-powered web scraping for automatic listing data extraction

Authentication

Super Admin role required

Parameters
url url required URL to scrape for listing data
dataType enum optional property | business | service
Response

Extracted and structured listing data with AI confidence scores

GET /admin/messages/unread-count
Stable

Get unread message count for admin dashboard notifications

Authentication

Admin role required

Response

Number of unread messages requiring admin attention

GET /api/admin/service-requests
Stable

Retrieve all service requests for admin review and management

Authentication

Admin role required

Parameters
status enum optional pending | approved | rejected
page number optional Page number for pagination
Response

JSON array of service requests with user details and status

Webhooks

Real-time event notifications and third-party integration endpoints

POST /webhook/stripe
Stable

Stripe webhook endpoint for payment event processing and subscription updates

Authentication

Stripe signature verification required

Parameters
stripe-signature header required Stripe webhook signature
event object required Stripe event data payload
Supported Events
payment_intent.succeeded Payment confirmation
invoice.payment_succeeded Subscription payment
customer.subscription.deleted Subscription cancellation
payment_intent.payment_failed Payment failure
Response

Processes payment events and updates user accounts, orders, and subscriptions

API Usage Guidelines

Best practices, rate limits, and integration guidelines for optimal API usage

Rate Limiting
  • Standard APIs: 100 requests per minute
  • Media Upload: 20 uploads per minute
  • AI Services: 10 requests per minute
  • Webhooks: No rate limit

Rate limits are per user session or API key.

Authentication
  • Session-based: Browser cookie authentication
  • API Keys: For webhook and third-party integrations
  • JWT Tokens: For mobile and SPA applications
  • Role-based Access: Admin, user, and guest permissions

Always use HTTPS for API communications.

Error Handling
  • 400: Bad Request - Invalid parameters
  • 401: Unauthorized - Authentication required
  • 403: Forbidden - Insufficient permissions
  • 429: Too Many Requests - Rate limit exceeded
  • 500: Internal Server Error - Contact support

All errors include detailed JSON error messages.

Best Practices
  • Pagination: Use limit and offset parameters
  • Caching: Respect cache headers for better performance
  • Idempotency: Use idempotency keys for critical operations
  • Validation: Client-side validation before API calls

Monitor API response times and adjust request frequency accordingly.

Data Formats
  • Request: JSON with UTF-8 encoding
  • Response: JSON with consistent field naming
  • Dates: ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ)
  • Files: Multipart form-data for uploads

All timestamps are in UTC timezone.

Support & SDKs
  • Documentation: Always up-to-date with examples
  • Status Page: Real-time API status monitoring
  • Developer Support: Email support for integration help
  • SDKs: JavaScript, Python, and PHP libraries available

Join our developer Discord for community support.