data_sources

Create data source upload URL

The agent's way to upload a CSV, since a file cannot ride JSON: this mints a signed single-use URL and parks the import fields; then PUT the raw file bytes to it as the body (a plain HTTP request, Content-Type text/csv, no bearer), which creates the draft source exactly as upload-csv does and answers it with the header preview; then import_data_source on the draft sid confirms the mapping. Nothing exists until the PUT lands; the link dies in 15 minutes.

Contract:

  • MCP tool create_data_source_upload_url, registry package mcp.playtables/data_sources, mount playtables.sources.
  • Operation action, response envelope action.
  • Flags: none.
post/api/data-sources/upload-url

Request

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

Request body

playtable_sidstring required

Target table (pt_tb_…) the draft feeds; checked at the mint, a missing or foreign one is 422 relation_not_found before any bytes travel.

object_type'people' | 'company'

What the rows become: people (default) | company; import_data_source may still override it.

mode'create' | 'update'

What the import does with them: create (default) | update; import_data_source may still override it.

namestring

The draft's name; default: the file name the PUT declares in Content-Disposition, else upload.csv.

tag_sidsstring[]

Tags every promoted row gets (cr_tg_…, must exist in the team; checked at the mint).

on_duplicate'skip' | 'move'

skip (default) | move: what a person already in another table does.

add_tags_to_duplicateboolean

Merge tag_sids onto a matched duplicate; default false.

Response

action success envelope.

successtrue required
operation'action' required
actionstring required

kebab-case verb; matches the route segment.

itemunknown required

Changes

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