Custom Integration

Test a location's own Custom System webhook/outbound endpoint. Unlike every other endpoint on this site, system and resource aren't fixed - they're admin-chosen names registered for this location under Manage Custom Systems.

Direction

Sends any JSON body; maps it to a GHL contact/opportunity via this resource's configured field mappings.

Pushes to GHL inline and reflects the result in the response (default).

API Config

Must match a Custom System name registered for this location.

Must match a resource registered under that system, configured to accept this direction.

Request

Endpoint:
POST /api/v1/test-location-123/custom/Zapier/inbound/lead
Headers:
{
  "Content-Type": "application/json",
  "m4-connect-key": "[your-api-key]"
}
Body (Editable):

API Reference

How this differs from every other endpoint here:

system and resource are not fixed, global names like "movoto" or "realtor" - they're admin-chosen, location-private names registered under Manage Custom Systems in the M4 Connect configurator. Two different locations can each register a system called "Zapier" that behave completely independently.

Inbound processing:

  • The resource's resourceType (contact or opportunity, set when the resource was registered) decides which sync pipeline handles it.
  • Field mapping is resolved the same way Movoto/Realtor do - via ConfigurationClient.getMappings - keyed by a composite "system:resource" string instead of a fixed sub-feature name.
  • For an opportunity resource, map a source field to the contact_id target so the created opportunity is linked to the right GHL contact.
  • Pushes to GHL inline, same as the Movoto/Realtor sync endpoints.

Outbound processing:

  • Fetches the GHL contact/opportunity by the id in the request body.
  • For an opportunity resource, also fetches its linked contact - both objects' fields are mappable sources.
  • Maps via the same mapping set's outbound-direction rows (GHL field → destination field name), applies the system's configured auth, and POSTs the result to its configured outbound URL.

Error codes:

  • SYSTEM_NOT_FOUND / RESOURCE_NOT_FOUND (404) - no active system/resource by that name for this location.
  • DIRECTION_NOT_SUPPORTED (400) - the resource isn't configured to accept this direction.
  • OUTBOUND_URL_NOT_CONFIGURED (400) - outbound only: the system has no target URL set yet.
  • GHL_SYNC_FAILED (502) - inbound only: the record was created but the GHL push failed.
  • OUTBOUND_CALL_FAILED (502) - outbound only: the record was mapped but the outbound HTTP call failed.

Full Documentation:

See docs/API_CUSTOM_INTEGRATION_INBOUND.md and docs/API_CUSTOM_INTEGRATION_OUTBOUND.md for full field references, response shapes, and cURL examples.