Skip to main content
POST
/
batch-import
/
import
/
entities
Import entities (CSV)
curl --request POST \
  --url http://api.gu1.ai/batch-import/import/entities \
  --header 'Authorization: Bearer <token>'

Endpoint

POST https://api.gu1.ai/batch-import/import/entities

Overview

Content-Type: multipart/form-data. Enqueues the same bulk job as the dashboard Bulk imports hub. Requires entities:bulk_import and org bulk automatic entity import enabled. 202 response includes jobId and effective importMode.

Authentication

Authorization: Bearer YOUR_API_KEY

Import Modes (entityImportMode)

ModeWhenBehavior
manualDefault when the field is omittedMinimal entity from taxId + suggested_name (required). No country basic-data pipeline (Nosis/CPF). Optional selected enrichments via form autoExecuteIntegrations and/or per-row CSV columns. No shareholder depth. Country: any valid platform ISO2 (country_code per row takes priority).
automaticSend entityImportMode=automaticBasic data by tax ID (AR, BR, or CL) + enrichments (defaults to all active when autoExecuteIntegrations omitted) + optional depth / shareholders.
Legacy values manual_no_enrichment and automatic_enriched are still accepted on input and normalized to manual / automatic. Responses use the canonical names.

Default When Sending Only the CSV

curl -X POST 'https://api.gu1.ai/batch-import/import/entities' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@bulk-entities-template.csv'
β†’ importMode: manual β€” minimal entity, no enrichments unless you add them explicitly.

Manual with Selected Enrichments

Same semantics as the dashboard Manual mode:
curl -X POST 'https://api.gu1.ai/batch-import/import/entities' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@bulk-entities-template.csv' \
  -F 'entityImportMode=manual' \
  -F 'autoExecuteIntegrations={"executeAllActiveEnrichments":false,"enrichments":["nosis_enrichment"]}' \
  -F 'riskMatrixCompanyId=YOUR_MATRIX_UUID'
Optional monitoring JSON (main entity only in manual mode).

Automatic Mode (Explicit)

curl -X POST 'https://api.gu1.ai/batch-import/import/entities' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@bulk-entities-template.csv' \
  -F 'entityImportMode=automatic'
Omitting autoExecuteIntegrations in automatic mode β†’ all active enrichments for the org. With depth > 0, send autoExecuteIntegrationsShareholders (JSON) for shareholders.

Manual without Post-Create Rules

  -F 'entityImportMode=manual' \
  -F 'skipRulesExecution=true'
(You can omit entityImportMode β€” manual is already the default.)

Platform CSV (no mappingId)

Minimum headers: tax_id, type. Recommended: suggested_name (required in manual mode). See Country (ISO2) below for country_code.

Country (ISO2) β€” Always Required

Every entity row needs a country to create the record (manual and automatic). Provide it in one or both places:
SourceWhen to use
Batch form field countryStep 2 in the hub, or multipart field in the API. Required for simple CSV (only tax_id + type). Required for any row that omits country_code.
CSV column country_code (alias country)Per row. Overrides batch country when present.
Priority: country_code on the row β†’ batch country. If neither is set for a row, the import fails with missing country before the job runs.
ModeAllowed countries
Automatic (automatic)AR, BR, CL (basic-data pipeline)
Manual (manual)Any valid platform ISO2
Examples:
  • Simple CSV, all rows Argentina β†’ headers tax_id,type + form country=AR.
  • Advanced CSV, mixed countries β†’ include country_code on each row (form country optional fallback).
  • Advanced CSV, single country β†’ either all rows with country_code=AR or form country=AR without the column.
Reference templates β€” download (fixed demo tax IDs; replace before production import) or generate fresh IDs from the dashboard hub (Entities β†’ bulk import): Canonical source (keep in sync when columns change): apps/web/src/lib/bulk-automatic-entity-import-parse.ts. Automatic example (truncated):
tax_id,type,country_code,suggested_name,...,execute_all_active_enrichments,...,depth,status,segment_tag
20123456789,company,AR,Acme Argentina SA,...,true,...,0,under_review,retail
12345678000190,company,BR,Loja Brasil Ltda,...,true,...,1,under_review,wholesale
Manual example (truncated):
tax_id,type,country_code,suggested_name,...,status,segment_tag
20123456789,company,AR,Empresa Manual AR SA,...,under_review,retail
XAXX010101000,company,MX,Empresa MΓ©xico Demo SA,...,active,latam
Legacy single-file name bulk-entities-template.csv is no longer used by the hub; pick the template matching your entityImportMode.

Column Reference (Platform CSV)

Header names are case-insensitive; spaces become _ (e.g. country code β†’ country_code). Aliases in parentheses.
CSV columnAliasesAPI / entity fieldNotes
tax_idtaxIdtaxIdRequired. Normalized per country (e.g. CUIT formatting for AR).
typetipotypeRequired. person / company (also persona, empresa, pf, pj).
country_codecountrycountryISO2 per row. Overrides batch form country. Column is optional in the CSV when batch country is sent (simple CSV) or when every row includes country_code. Country is always required β€” row column and/or batch field.
suggested_namename, nombresuggestedNameDisplay name. Required in manual mode on every row. Recommended in automatic.
genderβ€”genderPassed to entity creation (customData). Enum: M, F, male, female, other, unknown. Use other for non-binary. See Create entity β€” Person.
external_idexternalIdexternalIdExternal reference on the entity.
emailβ€”emailContact email on the entity.
phoneβ€”phoneContact phone on the entity.
registration_dateβ€”registrationDateRegistration date (ISO string).
risk_matrix_idβ€”riskMatrixIdUUID of a risk matrix for this row, or empty / null to clear. Invalid values are skipped. Overrides batch riskMatrixPersonId / riskMatrixCompanyId when set.
execute_all_active_enrichmentsβ€”autoExecuteIntegrations.executeAllActiveEnrichmentstrue / false / 1 / 0. Row-level enrichments apply when this column, enrichments, or enrichment_group_refs is present.
enrichmentsβ€”autoExecuteIntegrations.enrichmentsComma- or semicolon-separated marketplace provider codes. Merged with batch form autoExecuteIntegrations when the row sets enrichment columns.
enrichment_group_refsβ€”autoExecuteIntegrations.enrichmentGroupRefsComma-separated enrichment group slugs from the marketplace.
omit_enrichmentsexclude_enrichmentsautoExecuteIntegrations.excludeEnrichmentsProvider codes to omit from the final resolved set. Works with execute_all_active_enrichments=true (all active minus these). When this is the only enrichment column on the row, it merges onto the batch config instead of replacing it.
create_relationshipsβ€”createRelationshipstrue / false. Automatic mode only (ignored in manual).
depthβ€”depthInteger 0–5. Shareholder/relationship expansion. Automatic mode only (stripped in manual). Batch form depth applies when the row omits this column.
statusβ€”statusOne of: active, inactive, blocked, under_review, suspended, pending_verification, expired, deleted, rejected.
attributes.<path>β€”attributesNested business data (same dot notation as native transaction CSV). E.g. attributes.segment_tag, attributes.tags.tier.
entityData.<path>β€”entityData.{person|company}KYC/KYB profile fields. Without person/company in the header, the row type selects the bucket (person β†’ entityData.person.*, company β†’ entityData.company.*). E.g. entityData.income, entityData.tradeName.
entityData.person.<path>β€”entityData.personExplicit person path.
entityData.company.<path>β€”entityData.companyExplicit company path.
metadata.<path>β€”attributes (legacy)Deprecated; merged into attributes. Prefer attributes.*.
Unprefixed columnβ€”attributesBackward compatible: segment_tag β†’ attributes.segment_tag.
Removed (2026-06-04): CSV columns execute_all_active_checks and checks are no longer part of the import contract. Use enrichments, enrichment_group_refs, and execute_all_active_enrichments instead. See Changelog.
Dot notation: same as native transaction CSV β€” dotted headers build nested objects. Enrichments may overwrite entityData; CSV values are re-applied at the end (CSV wins on conflicts). What goes to attributes: attributes.*, legacy metadata.*, or unprefixed columns. Batch-level form field attributes (JSON) is merged with per-row attributes (row wins on key collision). Simple CSV (only tax_id + type): send batch form field country (ISO2) β€” required. No country_code column needed. Custom CSV (non-platform headers): use a saved mappingId β€” column mapping is defined in the dashboard, not by this table.
  • Per-row enrichment columns apply in both modes when set on the row; depth / shareholders only in automatic.
Optional β€” automatic mode only. Prefix relationship_ (plural alias relationships_).
ColumnDescription
relationship_execute_all_active_enrichmentstrue = all active enrichments on shareholders/related entities; false = basic data only. Replaces the batch policy (childEnrichmentPolicy) for that row.
relationship_enrichments_companyProvider codes for company-type children (comma or semicolon separated)
relationship_enrichments_personProvider codes for person-type children
relationship_enrichment_group_refsMarketplace groups (optional)
relationship_omit_enrichmentsAlias of relationship_exclude_enrichments. Codes to omit from the final set (also with execute_all_active=true). When this is the only relationship_* column on the row, it merges onto the batch policy instead of replacing it.
relationship_exclude_enrichmentsSame as relationship_omit_enrichments (legacy name).
Custom batch policies (e.g. Paytime): omit relationship_execute_all_active_enrichments from the CSV if you want step-2 form policy to apply. Use relationship_omit_enrichments per row for one-off exceptions only. Example: batch all-active on shareholders except global sanctions on children:
tax_id,type,country_code,depth,relationship_omit_enrichments
67250861000107,company,BR,1,global_gueno_sanctions_enrichment

Custom CSV

Non-platform column layout β†’ mappingId required (entity_person / entity_company / entity_mixed mapping).

Form Fields

FieldRequiredDescription
fileYesCSV file
mappingIdConditionalCustom columns. Optional for platform format.
entityImportModeNomanual (default) or automatic
countryConditional (required in practice)Batch ISO2. Required when CSV has no country_code on a row (typical simple CSV). Optional fallback when every row includes country_code.
riskMatrixPersonIdNoUUID β€” both modes
riskMatrixCompanyIdNoUUID β€” both modes
skipRulesExecutionNotrue / false (default false)
stopOnFirstErrorNotrue / false
autoExecuteIntegrationsNoJSON β€” manual: optional selected enrichments; automatic: defaults to all active when omitted
autoExecuteIntegrationsShareholdersNoJSON at batch level β€” automatic mode only + depth > 0. Per row: relationship_* CSV columns or field in JSON bulk.
childEnrichmentPolicyNoall_active (default), by_root_type, or basic_only β€” automatic + depth > 0. See Child enrichments & monitoring.
monitoringApplyToRelationshipsNotrue / false β€” when false, monitoring applies to main entities only (no monitoring.relationships). Default true when depth > 0 if omitted.
depthNo0–5 β€” automatic mode only
isClientNotrue / false
statusNoEntity status literal (batch)
attributesNoJSON (batch)
nationalityNoISO2
monitoringNoJSON β€” both modes (relationships key: automatic + depth > 0 only)
reportRecipientEmailsNoJSON array
emailLocaleNoen / es / pt

Success Response

{
  "success": true,
  "jobId": "bulk-entity-…",
  "importMode": "manual",
  "totalItems": 42,
  "message": "Bulk import queued"
}

Child Enrichments & Monitoring

Automatic mode with depth > 0 creates shareholders (company roots) or related entities (person roots). Two batch fields control how enrichments and watchlist monitoring apply to those children:
childEnrichmentPolicyMain entityCompany root β†’ shareholdersPerson root β†’ related entities
all_active (default)As configuredAll active enrichments for each child type (same as before)Same
by_root_typeAs configuredAll active enrichments except global_gueno_sanctions_enrichment (check-only / no watchlist on children)Basic data only from the root provider snapshot (no child enrichment pipeline)
basic_onlyAs configuredBasic data onlyBasic data only
monitoringApplyToRelationships: when false, the monitoring JSON applies to main entities only (monitoring.main); related entities are not added to watchlists even if enrichments run on them. Recommended false with by_root_type when the main entity should enter sanctions monitoring but children should not. Example (mixed company + person CSV, depth 1, main watchlist only, differentiated children):
-F 'entityImportMode=automatic' \
-F 'depth=1' \
-F 'childEnrichmentPolicy=by_root_type' \
-F 'monitoringApplyToRelationships=false' \
-F 'monitoring={"main":{"global_gueno_sanctions_enrichment":{"watchlist":true}}}'
Per-row autoExecuteIntegrationsShareholders in JSON bulk (POST /entities/bulk/automatic) or relationship_* CSV columns still override the batch policy for that item.

Manual vs. Automatic (Same Job Queue)

ManualAutomatic
Basic data by tax ID (Nosis/CPF)NoYes
suggested_nameRequired every rowRecommended
Country (ISO2)Required β€” batch country and/or CSV country_code (row wins)Same (automatic: AR, BR, CL only)
EnrichmentsOptional (autoExecuteIntegrations / CSV row)Default all active; optional pick list
Risk matricesYesYes
Shareholder depthNoYes (0–5)
CountriesAny valid ISO2AR, BR, CL

Limits

Value
Files per request1 CSV (file field)
Max rows per importBy organization plan (same table as Bulk imports overview β€” Limits by plan): Freemium 4,000 β†’ Enterprise / Usage based 100,000
Server cap (optional)BULK_AUTOMATIC_ENTITY_MAX_ITEMS may lower the plan limit on this endpoint
Over limit400 TOO_MANY_ITEMS

Default When Mode Omitted

EndpointDefault
POST /batch-import/import/entities (this page)manual

Hub vs. API

FlowEndpointDefault mode
Entities tab (/bulk-imports?tab=entities)This endpoint (POST /batch-import/import/entities)User picks in UI (UI default: automatic β†’ send entityImportMode=automatic)
Multipart API (this page)POST /batch-import/import/entitiesManual if entityImportMode omitted
Custom (?tab=custom)POST /batch-import/import/entities + mappingIdUI selector (default: automatic)
See also: Bulk imports overview.