Skip to main content
POST
/
api
/
v1
/
customers
/
import
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const response = await client.v1.customers.import({
  customers: [
    {
      id: 'id',
      email: '[email protected]',
      name: 'name',
    },
  ],
});

console.log(response.data);
{
  "data": {
    "newCustomers": [
      "customer-6e24b4",
      "customer-8f35c7"
    ]
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

Server API Key

Body

application/json

Bulk import up to 1000 customers. Existing customers are updated, new ones are created.

customers
object[]
required

List of customer objects to import

Required array length: 1 - 1000 elements

Response

OK

Response object

data
ImportCustomersResult · object
required

List of newly created customer IDs from the import operation.