Skip to content
Import a CSV

Import a CSV

ImportCSV creates a project from a CSV upload and immediately seals it (an implicit Submit), so enrichment starts at once. Use it when you already have a full file; use Create a Project + Add Activities when you want to build the batch row by row.

Endpoint

POST https://api.dangofish.com/api.v1.Service/ImportCSV
Authorization: Bearer dk_org_...
Content-Type: application/json

Request

The csv field is protobuf bytes, so in JSON it must be a base64-encoded string, not raw CSV text. categoryMode is one of ademe (default), client, or referential.

{
  "name": "Q3 procurement",
  "csv": "ZGVzaWduYXRpb24sc3VwcGxpZXIK...",
  "categoryMode": "ademe"
}

Response

{ "projectId": "aB3xK9" }

Examples

CSV_B64=$(base64 -w0 activities.csv)
curl -X POST https://api.dangofish.com/api.v1.Service/ImportCSV \
  -H "Authorization: Bearer $DANGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"Q3 procurement\", \"csv\": \"$CSV_B64\", \"categoryMode\": \"ademe\"}"

Errors

  • Unauthenticated: missing or invalid API key.
  • InvalidArgument: malformed CSV or an oversized payload. Parsing is all-or-nothing: a single bad row rejects the whole import.