Skip to content

Upload a CSV file

Request

Upload a CSV file to be imported as contacts or companies. Returns a file-import record with a UUID. Pass that UUID to import-leads or import-companies to actually create the records.

Note: the only validated type value at the time of writing is csv_leads. Companies CSV may require a different mechanism — check with support.

Security
bearerAuth
Bodymultipart/form-datarequired
filestring, (binary)required

CSV file with header row.

typestringrequired

Source type. Currently only csv_leads is accepted.

Value:"csv_leads"
Example:"csv_leads"
POST
/leads/api/file-imports/upload-csv
curl -i -X POST \
  https://leadgen.grinfi.io/leads/api/file-imports/upload-csv \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F type=csv_leads

Responses

File import record created.

Bodyapplication/json
uuidstring, (uuid)
team_idinteger
typestring
payloadobject

Includes file path, delimiter, enclosure, and config.

statusstring
Response
{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "team_id": 0, "type": "string", "payload": {}, "status": "string" }