Skip to main content
POST
/
customers
/
bulk
/
csv
cURL
curl --request POST \
  --url https://api.lightspark.com/grid/2025-10-13/customers/bulk/csv \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
import fs from 'fs';
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const response = await client.customers.bulk.uploadCsv({
file: fs.createReadStream('path/to/file'),
});

console.log(response.jobId);
package com.lightspark.grid.example

import com.lightspark.grid.client.LightsparkGridClient
import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient
import com.lightspark.grid.models.customers.bulk.BulkUploadCsvParams
import com.lightspark.grid.models.customers.bulk.BulkUploadCsvResponse
import java.io.ByteArrayInputStream

fun main() {
val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()

val params: BulkUploadCsvParams = BulkUploadCsvParams.builder()
.file("Example data".byteInputStream())
.build()
val response: BulkUploadCsvResponse = client.customers().bulk().uploadCsv(params)
}
{
  "jobId": "Job:019542f5-b3e7-1d02-0000-000000000006"
}
{
"status": 401,
"message": "<string>",
"details": {}
}
{
"status": 500,
"message": "<string>",
"details": {}
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Body

multipart/form-data
file
file
required

CSV file containing customer information

Response

CSV upload accepted for processing

jobId
string
required

Unique identifier for the bulk import job

Example:

"Job:019542f5-b3e7-1d02-0000-000000000006"

status
enum<string>
required
Available options:
PENDING,
PROCESSING