Skip to main content

Import CSV (optimized)

Upload CSV to the optimized import endpoint. Always queues a durable import with status polling and manifest-backed verification/rollback.

POST/api/tables/{table_id}/import-optimized
HTTP referenceScope tables:writeUpdated September 27, 2026

This page documents the canonical HTTP contract for this endpoint.

The response confirms admission only; counts are initially null. Poll import status with task_id, or poll operation status with operation_run_id (jobs:read). These are different IDs. The endpoint always queues a durable Runtime v2 import; it has no synchronous mode.

field_mappings is a JSON object keyed by CSV header. Values may be a destination field string (for example {"Email":"email"}), {"type":"standard","field":"email"}, {"type":"custom","name":"source_email"}, or {"type":"skip"}. Standard targets must be writable manual/source columns or supported canonical import fields; reserved/calculated/system fields cannot be written. Whether custom targets can create a new manual column depends on the table's existing writable columns. The import validates mappings before the worker writes rows. If the optional ingest_policy is invalid, the server ignores it and uses the table's ingest defaults.

Recommended safe flow

  1. Validate CSV parse/shape with Validate CSV import.
  2. Import via this endpoint; admission is asynchronous.
  3. Poll Get CSV import status until terminal.
  4. Run Verify CSV import by task.
  5. If needed, use Rollback CSV import by task.

Blacklist controls

  • check_company_blacklist defaults to true.
  • check_email_blacklist defaults to false.
  • Rows skipped by blacklist checks are reported in blacklist_summary.
  • Add/manage entries with Create blacklist entry and related blacklist endpoints.
  • Recommended workflow only: before separate billable enrichment operations (llm_enrichment, email finder, phone finder), use a blacklist filter gate. This is not an additional admission requirement enforced by the CSV import endpoint.

Long fields like post_content are supported when multiline values are properly CSV-quoted. Rollback deletes manifest-tracked rows created by this import; it does not restore rows updated by upsert or rows skipped by blacklist/identity handling.

Path parameters

  • table_idrequired

    string

    Target table ID.

Body parameters

  • null_policy · optional

    string: common | preserve

    Default common maps blank values and recognized null tokens to empty strings; preserve retains nonblank null-token text. Blank values still normalize to empty.

  • ingest_policy · optional

    string (JSON)

    Optional IngestPolicy JSON object controlling identity handling. Invalid JSON or policy values are ignored and table defaults apply.

  • command_center_context · optional

    string (JSON)

    Optional existing Command Center operation context. Standalone API integrations can omit it; do not invent thread identifiers.

  • filerequired

    multipart file

    CSV file upload.

  • field_mappings · optional

    string (JSON)

    Optional JSON object serialized as a multipart field. Map each CSV header to a destination field name, such as {"Email":"email"}; standard/custom/skip mapping objects are also accepted.

  • check_company_blacklist · optional

    boolean

    Defaults to true.

  • check_email_blacklist · optional

    boolean

    Defaults to false.

  • origin · optional

    string

    Origin tag for created columns/rows. Default: csv.

Definitions

IngestPolicy

Serialize this object as the ingest_policy multipart field. Omit it to use the table ingest defaults.

Fields

  • mode · optional

    string

    allow (default), skip, or upsert.

  • rule_id · optional

    string

    ID of an existing identity rule on the table.

  • column_key · optional

    string

    Explicit identity column, used with match_strategy when rule_id is absent.

  • match_strategy · optional

    string

    domain, email, linkedin_url, external_id, or exact_text.

  • merge_mode · optional

    string

    fill_empty (default) or overwrite_mapped.

Errors

StatusMeaning
400Invalid CSV or multipart payload.
401Invalid API key or missing auth.
403Missing tables:write scope or table access denied.
409For scheduled imports, the uploaded artifact does not match the admitted artifact.
422Missing required multipart file or invalid null_policy value.
503CSV upload storage or admission receipt could not be completed.

Docs