M4 Connect API Documentation

Comprehensive testing and integration guides for all M4 Connect APIs. Each endpoint includes interactive forms, live request/response examples, and detailed field documentation.

Notion API

POST /api/notion/[locationId]/[requestType]

Integrate Notion data with GHL through the Notion M4 Connect API. Sync property records, create multiple contacts from Notion fields, and establish associations between contacts and properties. Supports property-sync request type with comprehensive field mapping.

Features:

  • Property synchronization
  • Multi-contact creation from paired fields
  • Automatic contact and property association
  • Custom field support (Case Number, List Type)
  • Date and currency field handling
View Documentation →

SwipeHome API

POST /api/swipehome/[locationId]

Test and explore the SwipeHome API for creating title requests. Submit contact information and property details to create opportunities in GHL. Supports case-insensitive request types with comprehensive form-based testing interface.

Features:

  • Title request submission
  • Contact management
  • Opportunity creation with pipeline configuration
  • Automatic contact/opportunity error recovery with partial success support
View Documentation →

Widget API

POST /api/widget/[locationId]

Embed customizable forms and widgets on your website. Capture leads directly into GHL with configurable fields, automatic contact creation, and optional opportunity generation.

Features:

  • Embeddable form widgets
  • Lead capture from web forms
  • Automatic contact creation
  • Optional opportunity generation
  • Custom field mapping
View Documentation →

GHL Direct API

POST /api/ghl/[locationId]

Direct API access to GHL resources for advanced use cases. Create and manage contacts, opportunities, custom objects, and associations with full GHL functionality and comprehensive error handling.

Features:

  • Contact management
  • Opportunity creation and management
  • Custom object records
  • Association management
  • Full GHL integration
View Documentation →

SweepAndGo Webhook

POST /api/sweepandgo/[uuid]

Receive webhook events from SweepAndGo with CORS support. Route events through a Notion page configuration to process and transform SweepAndGo data for downstream systems.

Features:

  • Webhook event handling
  • CORS-enabled for browser-based requests
  • Notion page-based configuration
  • Event processing and transformation
  • Comprehensive error handling
View Documentation →

HubSpot Webhook

POST /api/hubspot-webhook/[uuid]

Receive webhook events from HubSpot CRM. Integrate HubSpot contact and deal events with your M4 Connect workflows through Notion-based configuration.

Features:

  • HubSpot contact event handling
  • Deal and lifecycle event processing
  • Notion page-based configuration
  • Event validation and processing
  • Error recovery and logging
View Documentation →

Buyer Blast API

POST /api/v1/[locationId]/buyers/blast

Send bulk SMS and email messages to buyer contacts through GHL. Automate buyer blast campaigns with automatic message processing, address masking, and comprehensive job tracking.

Features:

  • SMS buyer blast to primary contacts
  • Email buyer blast campaigns
  • SMS to secondary buyer contacts
  • Automatic message processing (newline unescaping)
  • Address masking for privacy
  • Real-time job status tracking
  • Configurator-based API key validation
View Documentation →

Getting Started

Authentication

All API requests require the m4-connect-key header with your API token set to the M4_CONNECT_API_SHARED_TOKEN environment variable.

Location ID

Each API request requires a valid GHL Location ID in the URL path. This identifies which location the request should be processed for.

Request Format

All APIs accept JSON request bodies with field-specific data. Refer to each API's documentation page for detailed field requirements and examples.