HighLevel migration core

The migration envelope groups existing reviewed CSV import jobs by GoodQA organization and HighLevel location. It maps each object kind and source ID to the committed target, source fingerprint and import job. It uses the existing highlevel_csv importer for planning and committing contacts, companies and opportunities; it does not implement another importer.

Declare the source row counts when creating an envelope. Attach completed jobs from that same organization, location and kind. Reconciliation reports source, imported, skipped, conflicts and pending decisions separately for each declared kind. Missing IDs require a documented decision. Reattaching a job preserves CRM edits and identifies conflicts. Decisions accept the current target snapshot; a later target edit invalidates that acceptance. Cutover requires exact counts and no unresolved decisions, then increments the writer epoch. Later migration writers must call assertWriterEpoch inside their write transaction. Closed envelopes refuse writes.

Cutover changes only GoodQA's envelope and writer epoch. It changes nothing in GHL, does not disable any GHL writer, and makes no request to GHL. Coordinating external writers remains an operational responsibility.

The checked-in synthetic export kit has three locations across two organizations, colliding IDs across object kinds, duplicate emails, missing IDs, and a renamed pipeline stage. It is based on documented API field shapes and adapted to the existing CSV import contract; it is not a claim that every account's native exports use identical column labels.

Where it runs (registered 2026-10-23)

The CRM import wizard's Move from GoHighLevel panel calls these routes on the production API. Every route authenticates first, refuses runner keys, and rechecks live org membership plus crm:create; API keys need the crm family. Reconcile is read-only although it is a POST.

RoutePurpose
POST /v1/orgs/{orgId}/migrations/ghlCreate an envelope with declared source counts
GET /v1/orgs/{orgId}/migrations/ghl/{id}Read the envelope and source identity items
POST /v1/orgs/{orgId}/migrations/ghl/{id}/jobsAttach a completed import job
POST /v1/orgs/{orgId}/migrations/ghl/{id}/reconcilePer-kind reconciliation, writes nothing
POST /v1/orgs/{orgId}/migrations/ghl/{id}/decisionsResolve a conflict or pending item with a note
POST /v1/orgs/{orgId}/migrations/ghl/{id}/cutoverAdvance the GoodQA writer epoch
GET /v1/orgs/{orgId}/migrations/ghl/{id}/rebuildRebuild checklist (workflows, forms, funnels, snapshots, phone use)
POST /v1/orgs/{orgId}/migrations/ghl/{id}/rebuild/inventoryRecord the immutable rebuild inventory
POST /v1/orgs/{orgId}/migrations/ghl/{id}/rebuild/decisionKept, dropped or undecided, with the owner's verbatim quote
POST /v1/orgs/{orgId}/migrations/ghl/{id}/rebuild/draftAn inactive draft for a kept item, or a named needs_build gap
POST /v1/orgs/{orgId}/migrations/ghl/blueprint/translateTranslate a configuration export into a blueprint draft; signed-in owner/admin only, every API key refused

MCP (group remote-ghl-migration, org API keys with CRM open to keys and crm.v2.records, never a runner key): ghl_migration_read, ghl_migration_reconcile, ghl_migration_cutover, ghl_rebuild_read, ghl_rebuild_inventory, ghl_rebuild_decide, ghl_rebuild_draft and ghl_blueprint_translate (the last is refused for API keys by its route).

The offline export preflight is a CLI, not a route: (cd apps/api && node --import tsx scripts/ghl-export-preflight.ts --in DIR --out report.json --md report.md).

HighLevel API reader (registered disabled)

/v1/orgs/:orgId/ghl-reader/:locationId/:object (POST one page, GET status, GET /export) is registered with GHL_READER_ENABLED=false by default: it answers 404 after authentication and never reads HighLevel or the checkpoint store. Person sessions only (every API and user token refused); live owner/admin membership; owner consent. Turning it on needs the HighLevel account owner's consent, an owner decision and GHL_READER_CHECKPOINT_DIR, an absolute application-private durable directory on one host; the API refuses to boot with the reader enabled when that is unset or volatile. There is no scheduler: each POST reads one page. MCP ghl_reader_status (group remote-ghl-reader) exists only while the reader is enabled.

API reference (tag ghl-migration), MCP tools, import jobs.

  • Runbook: Import operations; the export preflight CLI above runs before any import.

The slice proposals that this registration applies are kept for history: core, rebuild, blueprint, reader.

MANUAL-PENDING: the migrating account owner supplies the real contact, business and opportunity exports for each location, confirms source ownership and the authoritative source inventory, and identifies who stops or coordinates external writers. Validate real column mapping, relationships, duplicate policy and pipeline/stage rename history against those exports before any customer migration. Later slices add their object kinds and writers to this envelope. No real accounts or customer data were used here.

We use essential cookies to keep you signed in. See our Privacy Policy for details.