Also in docs/dev/quickstarts.md

Ingest a CSV

Load a spreadsheet export into a dataset you can query and map. About 3 minutes.

You need:

  • An API key in PYROSYNC_API_KEY and the deployment URL in PYROSYNC_URL (for example https://app.example.com). The key needs the ingest:write scope.
  • A CSV file, for example contacts.csv with a header row.

1. Register an upload source

POST /api/ingest/sources

SOURCE_ID=$(curl -sS -X POST "$PYROSYNC_URL/api/ingest/sources" \
  -H "X-API-Key: $PYROSYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Contacts CSV",
  "type": "upload",
  "targetDataset": "contacts"
}' | jq -r '.data.id')
echo "$SOURCE_ID"

2. Send the file

POST /api/ingest

curl -sS -X POST "$PYROSYNC_URL/api/ingest?sourceId=$SOURCE_ID" \
  -H "X-API-Key: $PYROSYNC_API_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @contacts.csv

JSON, NDJSON and raw bytes work the same way; set Content-Type to match. Large files: use POST /api/ingest/batch.

3. Check the source

GET /api/ingest/sources/{id}

curl -sS -X GET "$PYROSYNC_URL/api/ingest/sources/$SOURCE_ID" \
  -H "X-API-Key: $PYROSYNC_API_KEY"

Result: The rows land in the contacts dataset, one record per CSV row.