M4 Connect logo

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/v1/[locationId]/notion/[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. v1 endpoint validated via the M4 Connect configurator app; the legacy POST /api/notion/[locationId]/[requestType] route is deprecated.

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
  • Configurator-based API key/webhook signature validation
View Documentation →

SwipeHome API

POST /api/v1/[locationId]/webhook/swipehome

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. v1 endpoint validated via the M4 Connect configurator app; the legacy POST /api/swipehome/[locationId] route is deprecated.

Features:

  • Title request submission
  • Contact management
  • Opportunity creation with pipeline configuration
  • Automatic contact/opportunity error recovery with partial success support
  • Configurator-based API key validation
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/v1/[locationId]/webhook/sweepandgo

Receive webhook events from SweepAndGo and sync client/lead data to GHL. Resolves the GHL token and SweepAndGo access token from the M4 Connect configurator app, keyed by locationId. Replaces the deprecated Notion-page-keyed POST /api/sweepandgo/[uuid] route.

Features:

  • Webhook event handling
  • CORS-enabled for browser-based requests
  • Configurator-based settings (API key + optional webhook signature)
  • Event processing and transformation
  • Comprehensive error handling
View Documentation →

HubSpot Webhook

POST /api/v1/[locationId]/webhook/hubspot

Receive webhook events from HubSpot CRM. Integrate HubSpot contact and deal events with your M4 Connect workflows. Resolves the GHL token and HubSpot access token from the M4 Connect configurator app, keyed by locationId. Replaces the deprecated Notion-page-keyed POST /api/hubspot-webhook/[uuid] route.

Features:

  • HubSpot contact event handling
  • Deal and lifecycle event processing
  • Configurator-based settings (API key + optional webhook signature)
  • Event validation and processing
  • Error recovery and logging
View Documentation →

Movoto Leads Webhook

POST /api/v1/[locationId]/webhook/movoto/leads (sync) | POST /api/v1/[locationId]/webhook/movoto/async/leads (async)

Receive inbound lead webhooks from Movoto and map the lead to a GHL contact via configurable field mappings. The synchronous endpoint pushes to GHL inline; the async endpoint queues a pending contact sync record for delivery via the existing GHL contact sync workflow.

Features:

  • Webhook-based lead ingestion
  • Configurator-driven field mapping with built-in default fallback
  • Full name splitting into first/last name
  • Email-based external ID for contact sync
  • Synchronous (inline) or asynchronous (queued) GHL contact sync
  • Configurator-based API key validation
View Documentation →

Realtor.com Leads Webhook

POST /api/v1/[locationId]/webhook/realtor/leads (sync) | POST /api/v1/[locationId]/webhook/realtor/async/leads (async)

Receive inbound "Connections Plus" lead webhooks from Realtor.com and map the lead to a GHL contact via configurable field mappings. The synchronous endpoint pushes to GHL inline; the async endpoint queues a pending contact sync record for delivery via the existing GHL contact sync workflow. Follows the same sync/async pattern as the Movoto webhook.

Features:

  • Webhook-based lead ingestion (lead_info, contact, property_details, representation, consumer_insights)
  • Configurator-driven field mapping with built-in default fallback
  • Default external ID sourced from the Realtor.com lead_id, falling back to email
  • Synchronous (inline) or asynchronous (queued) GHL contact sync
  • Configurator-based API key validation
View Documentation →

Custom Integration API

POST /api/v1/[locationId]/custom/[system]/inbound/[resource] (sync) | POST .../inbound/[resource]/async (async) | POST /api/v1/[locationId]/custom/[system]/outbound/[resource]

Generic, location-private webhook + call-out endpoints for a location’s own Custom Systems (configured under Manage Custom Systems in the M4 Connect configurator). Unlike every other endpoint on this page, `system` and `resource` are not fixed - they’re admin-chosen names registered per location, each mapped via configurable field mappings to a GHL contact or opportunity.

Features:

  • Inbound webhook: any JSON payload → GHL contact or opportunity, via configurable field mappings
  • Outbound call-out: GHL contact/opportunity → a configured target URL, via the same mapping set’s outbound-direction rows
  • Opportunity resources expose both the opportunity’s and its linked contact’s fields as mappable sources
  • Per-resource direction control (inbound-only, outbound-only, or both)
  • Fully configurable outbound auth (Bearer, Basic, custom headers, or query params)
  • Configurator-based API key validation against the "CustomIntegration" sub-feature
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 →

Land Portal Property Search API

GET /api/internal/[locationId]/landportal/property | POST /api/internal/[locationId]/landportal/property/search

Search for properties using Land Portal API integration. Perform simple searches by parcel number or owner name, or use advanced filtering with complex spatial and temporal conditions. Includes support for FIPS codes, state filtering, and polygon-based geographic queries.

Features:

  • Simple property search (GET) - parcel number or owner
  • Advanced property search (POST) - complex filters and geometry
  • FIPS code and state-based filtering
  • Polygon and bounding box spatial queries
  • Date range and numeric range filtering
  • Duplicate and empty address filtering
  • Paginated result handling with metadata
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.