data_sources

Import data source

Confirm the column mapping and start parsing a csv source: the only draft to active transition, the agent's entry point after the UI's upload-csv hands over a draft sid. It is the last word on what the rows become (object_type) and on what the import does with them (mode): a draft holds nothing yet, so both override what the upload said.

The mapping is a column preset, not an ingestion filter: it decides which grid columns the import materializes and nothing else, so it may cover no identity column or be [] entirely; every row is staged whole and the dedup ladder uses whatever identity the record carries. mode=update needs match (the existing-row lookup key and the CSV column carrying it); a row that matches nothing fails match_not_found, update never creates.

Async: the parser streams the file in 1k-row batches, each row becoming a pending data_source_items row promoted on its own. The async ref rides result.pending (expected_completion_seconds, webhook_events, polling_hint), not a top-level pending[]: poll get_data_source with include data_source_items_counts until status is completed or failed, then report the funnel. Not idempotent: a repeat on the now-active source is 409 invalid_transition, a non-csv source 422 on sid; an exhausted contact or credit allowance is 402 payment_required. When NOT: the search and webhook kinds (born active at create); re-running failed rows (an import playtable run).

Contract:

  • MCP tool import_data_source, registry package mcp.playtables/data_sources, mount playtables.sources.
  • Operation action, response envelope action.
  • Flags: none.
post/api/data-sources/{sid}/import

Request

  • Base URL
    https://beta.getsales.io/playtables/v1
  • Auth
    HTTP bearer and API key in header Team-SID

Path parameters

sidstring required

The draft source (ds_sc_…) - must be status=draft, type=csv; anything else → 409 invalid_transition or 422.

Request body

object_type'people' | 'company'

Override what the rows become: people | company. Absent = what the upload said.

mode'create' | 'update'

Override what the import does: create (new objects) | update (resolve an existing object by match and apply the mapped attributes). Absent = what the upload said.

on_duplicate'skip' | 'move'

Override before start; default = the draft's stored policy.

add_tags_to_duplicateboolean

Override before start: merge tag_sids onto matched duplicates; default = the draft's stored policy.

Response

action success envelope.

successtrue required
operation'action' required
actionstring required

kebab-case verb; matches the route segment.

Changes

No recorded changes to this operation across all 1 revision of this API.