ONE people:import
← Receivers

people:import

people family

mcp

Import a contacts export (GoHighLevel first) into a group's People list, and turn every Do-Not-Disturb flag in it into a STOP. Each row becomes a contact (role contact, tags carried, source ghl-import), matched on email then phone so a re-import updates the same person and never makes a twin. DND / DND SMS / DND WhatsApp write the SMS STOP (both text and WhatsApp, as a texted STOP does), DND Email the email unsubscribe, DND Calls the call decline. It writes declines ONLY: no channel is ever opted in, so an import can never lift a STOP on record, and GHL's consent is not inherited. Owners, admins, team members and removed contacts are never written onto, but the STOP on their address still lands. At most 20 rows a call (capped says when more were sent); dryRun writes nothing. Conversation history is not imported

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_actors
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/people:import \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "rows": [ { "First Name": "Anna", "Last Name": "Byrne", "Email": "anna@byrnedental.ie", "Phone": "+353 1 555 0101", "Tags": "dental, vip", "DND SMS": "true" } ], "dryRun": true }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • rows object[] required Raw export rows, header → value, exactly as the CSV says them; at most 200 rows, a header at most 200 characters and a value at most 2,000. Headers are matched case- and punctuation-blind: First Name · Last Name · Name · Email · Phone · Tags (comma-separated) · Date Created · Source · Business Name · Contact Id · DND · DND SMS · DND Email · DND Calls · DND WhatsApp (true/yes/1). A column whose header matches a custom field the group declared (people:fields), by name or label, fills that field; any other column is dropped and never stored (droppedColumns names them). Only the first 20 are processed
  • workspace string optional Bare slug of the group to import into; default the caller's own. It NAMES a group and never authorizes one: the caller must control it (a client group they own), else workspace_not_yours
  • dryRun boolean optional true: classify every row and count what would be created, updated, skipped and stopped, writing nothing
  • countryCode string optional Country calling code for numbers written without one, e.g. "1" for (555) 010-2030. Without it such a number is unreadable, and a STOP on it is reported in stopsUnwritten
  • from ghl | csv optional Where the export came from; sets the source on each contact (ghl-import · csv-import). Default ghl
  • kind contacts | opportunities optional contacts (default): a contacts export. opportunities: a GoHighLevel opportunities export becomes deals on contacts already in the group (matched on email or phone, never created); recognised columns, matched case- and punctuation-blind and ASSUMED from GoHighLevel's documented export, not yet walked against a real file: Opportunity Name, email, phone, stage, Lead Value (decimals, in the major unit), status (open · won · lost · abandoned), lost reason name, Opportunity ID, source, currency. Won and lost rows arrive as history: no booking, no workflow. At most 20 rows a call; dryRun writes nothing. The answer carries skipped rows by reason, never contact counters
  • offset number optional Row number of rows[0] in the whole file, so skipped and stopsUnwritten name file rows across batches

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • dryRun boolean
  • source string
  • received number Rows sent
  • processed number Rows read: at most 20
  • capped boolean true when more rows were sent than one call reads; send the rest in the next call
  • created number
  • updated number
  • skipped object[] Rows not written as a contact. Their STOPs were still written
  • stops object STOPs written (or, on a dry run, that would be)
  • stopsUnwritten object[] A DND flag whose address could not be read: that STOP is NOT on record. Fix the number (or pass countryCode) and import the row again
  • arrivedWithoutConsent number Contacts with an address and no STOP: none of them carries consent from this import
  • tagsDropped number System tags refused from the Tags column: consent:*, list:*, any word with a colon, top
  • invalidEmails number
  • unreadablePhones number
  • fieldValues number Custom-field values written (on a dry run, that would be)
  • badFieldValues object[] Cells that do not fit their declared field: not stored, the rest of the row still is
  • droppedColumns string[] First-row headers that matched no built-in column and no declared field, so they were dropped
  • note string
  • error string workspace_not_yours · rows_required · no_db

Traffic

Every call to people:import, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names people:import, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 3
  • one.ie/web/src/lib/crm/people-import.ts:193
  • one.ie/web/src/lib/receiver-index.generated.ts:379
  • one.ie/web/src/lib/sms/sms.ts:132
CLI 4
  • packages/cli/src/deals.ts:166
  • packages/cli/src/lib/receivers-index.generated.ts:392
  • packages/cli/src/lib/receivers.generated.ts:392
  • packages/cli/src/people.ts:69
→

Answered by

people:import one.ie/web/src/lib/resolvers/groups.ts:568 Dispatched through POST /api/ask/people:import, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "rows": {
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "maxLength": 200
        },
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Raw export rows, header → value, exactly as the CSV says them; at most 200 rows, a header at most 200 characters and a value at most 2,000. Headers are matched case- and punctuation-blind: First Name · Last Name · Name · Email · Phone · Tags (comma-separated) · Date Created · Source · Business Name · Contact Id · DND · DND SMS · DND Email · DND Calls · DND WhatsApp (true/yes/1). A column whose header matches a custom field the group declared (people:fields), by name or label, fills that field; any other column is dropped and never stored (droppedColumns names them). Only the first 20 are processed"
    },
    "workspace": {
      "description": "Bare slug of the group to import into; default the caller's own. It NAMES a group and never authorizes one: the caller must control it (a client group they own), else workspace_not_yours",
      "type": "string"
    },
    "dryRun": {
      "description": "true: classify every row and count what would be created, updated, skipped and stopped, writing nothing",
      "type": "boolean"
    },
    "countryCode": {
      "description": "Country calling code for numbers written without one, e.g. \"1\" for (555) 010-2030. Without it such a number is unreadable, and a STOP on it is reported in stopsUnwritten",
      "type": "string"
    },
    "from": {
      "description": "Where the export came from; sets the source on each contact (ghl-import · csv-import). Default ghl",
      "type": "string",
      "enum": [
        "ghl",
        "csv"
      ]
    },
    "kind": {
      "description": "contacts (default): a contacts export. opportunities: a GoHighLevel opportunities export becomes deals on contacts already in the group (matched on email or phone, never created); recognised columns, matched case- and punctuation-blind and ASSUMED from GoHighLevel's documented export, not yet walked against a real file: Opportunity Name, email, phone, stage, Lead Value (decimals, in the major unit), status (open · won · lost · abandoned), lost reason name, Opportunity ID, source, currency. Won and lost rows arrive as history: no booking, no workflow. At most 20 rows a call; dryRun writes nothing. The answer carries skipped rows by reason, never contact counters",
      "type": "string",
      "enum": [
        "contacts",
        "opportunities"
      ]
    },
    "offset": {
      "description": "Row number of rows[0] in the whole file, so skipped and stopsUnwritten name file rows across batches",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "rows"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "dryRun": {
      "type": "boolean"
    },
    "source": {
      "type": "string"
    },
    "received": {
      "description": "Rows sent",
      "type": "number"
    },
    "processed": {
      "description": "Rows read: at most 20",
      "type": "number"
    },
    "capped": {
      "description": "true when more rows were sent than one call reads; send the rest in the next call",
      "type": "boolean"
    },
    "created": {
      "type": "number"
    },
    "updated": {
      "type": "number"
    },
    "skipped": {
      "description": "Rows not written as a contact. Their STOPs were still written",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "description": "no_email_or_phone · not_a_contact (an owner, admin or team member holds the address) · removed_contact (deleted or merged on the People page) · held_elsewhere · write_failed"
          }
        },
        "required": [
          "row",
          "reason"
        ]
      }
    },
    "stops": {
      "description": "STOPs written (or, on a dry run, that would be)",
      "type": "object",
      "properties": {
        "sms": {
          "type": "number"
        },
        "email": {
          "type": "number"
        },
        "call": {
          "type": "number"
        },
        "already": {
          "type": "number",
          "description": "Declines already on record, left as they were"
        }
      },
      "required": [
        "sms",
        "email",
        "call",
        "already"
      ]
    },
    "stopsUnwritten": {
      "description": "A DND flag whose address could not be read: that STOP is NOT on record. Fix the number (or pass countryCode) and import the row again",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "enum": [
              "phone_unreadable",
              "email_unreadable"
            ]
          }
        },
        "required": [
          "row",
          "reason"
        ]
      }
    },
    "arrivedWithoutConsent": {
      "description": "Contacts with an address and no STOP: none of them carries consent from this import",
      "type": "number"
    },
    "tagsDropped": {
      "description": "System tags refused from the Tags column: consent:*, list:*, any word with a colon, top",
      "type": "number"
    },
    "invalidEmails": {
      "type": "number"
    },
    "unreadablePhones": {
      "type": "number"
    },
    "fieldValues": {
      "description": "Custom-field values written (on a dry run, that would be)",
      "type": "number"
    },
    "badFieldValues": {
      "description": "Cells that do not fit their declared field: not stored, the rest of the row still is",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number"
          },
          "field": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "description": "not_a_number · not_a_date · not_an_option · not_a_checkbox · too_long · not_text"
          }
        },
        "required": [
          "row",
          "field",
          "reason"
        ]
      }
    },
    "droppedColumns": {
      "description": "First-row headers that matched no built-in column and no declared field, so they were dropped",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "note": {
      "type": "string"
    },
    "error": {
      "description": "workspace_not_yours · rows_required · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}