Import or update contacts in bulk
upsert_contactsCreate-or-update up to 500 contacts in one call — the way to import a customer list from a spreadsheet, an export or another CRM. Each contact is matched against the site's existing contacts on match_on (email by default, case-insensitively): a match is UPDATED, everything else is CREATED, so re-sending the same batch is safe. Any column the CRM has no field for goes in custom_fields as a flat key/value (keys must be identifier-shaped: letters, digits, underscore) and is auto-declared as a filterable field unless you pass create_missing_fields:false. Tags MERGE with the contact's existing tags by default — pass tags_mode:"replace" only if the user actually wants the old tags gone. ALWAYS run once with dry_run:true first and show the user the created/updated counts before writing. Two deliberate limits: status (pipeline stage) is applied to NEW contacts only — an import never moves an existing contact's stage — and custom_fields always merge key-by-key rather than replacing the object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| site_id | Yes | The site whose CRM to write to | |
| contacts | Yes | ||
| match_on | No | ||
| tags_mode | No | merge | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| contact_fields_mode | No | overwrite | |
| create_missing_fields | No | ||
| dispatch_audience_events | No |