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: 'dev@stainless.com',
name: 'name',
},
],
});
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.customers.import_(
customers=[{
"id": "id",
"email": "dev@stainless.com",
"name": "name",
}],
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.Customers.Import(context.TODO(), stigg.V1CustomerImportParams{
Customers: []stigg.V1CustomerImportParamsCustomer{{
ID: "id",
Email: stigg.String("dev@stainless.com"),
Name: stigg.String("name"),
}},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.CustomerImportParams;
import io.stigg.models.v1.customers.CustomerImportResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
CustomerImportParams params = CustomerImportParams.builder()
.addCustomer(CustomerImportParams.Customer.builder()
.id("id")
.email("dev@stainless.com")
.name("name")
.build())
.build();
CustomerImportResponse response = client.v1().customers().import_(params);
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.customers.import(customers: [{id: "id", email: "dev@stainless.com", name: "name"}])
puts(response)using System;
using System.Collections.Generic;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers;
StiggClient client = new();
CustomerImportParams parameters = new()
{
Customers =
[
new()
{
ID = "id",
Email = "dev@stainless.com",
Name = "name",
BillingID = "billingId",
Metadata = new Dictionary<string, string>() { { "foo", "string" } },
PaymentMethodID = "paymentMethodId",
SalesforceID = "salesforceId",
UpdatedAt = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
},
],
};
var response = await client.V1.Customers.Import(parameters);
Console.WriteLine(response);stigg v1:customers import \
--api-key 'My API Key' \
--customer '{id: id, email: dev@stainless.com, name: name}'curl --request POST \
--url https://api.stigg.io/api/v1/customers/import \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"customers": [
{
"name": "<string>",
"email": "jsmith@example.com",
"id": "<string>",
"metadata": {},
"updatedAt": "2023-11-07T05:31:56Z",
"billingId": "<string>",
"salesforceId": "<string>",
"paymentMethodId": "<string>"
}
],
"integrationId": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/customers/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customers' => [
[
'name' => '<string>',
'email' => 'jsmith@example.com',
'id' => '<string>',
'metadata' => [
],
'updatedAt' => '2023-11-07T05:31:56Z',
'billingId' => '<string>',
'salesforceId' => '<string>',
'paymentMethodId' => '<string>'
]
],
'integrationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"newCustomers": [
"customer-6e24b4",
"customer-8f35c7"
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Bulk Import
Bulk import customers
Imports multiple customers in bulk. Used for migrating customer data from external systems.
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: 'dev@stainless.com',
name: 'name',
},
],
});
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.customers.import_(
customers=[{
"id": "id",
"email": "dev@stainless.com",
"name": "name",
}],
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.Customers.Import(context.TODO(), stigg.V1CustomerImportParams{
Customers: []stigg.V1CustomerImportParamsCustomer{{
ID: "id",
Email: stigg.String("dev@stainless.com"),
Name: stigg.String("name"),
}},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.CustomerImportParams;
import io.stigg.models.v1.customers.CustomerImportResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
CustomerImportParams params = CustomerImportParams.builder()
.addCustomer(CustomerImportParams.Customer.builder()
.id("id")
.email("dev@stainless.com")
.name("name")
.build())
.build();
CustomerImportResponse response = client.v1().customers().import_(params);
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.customers.import(customers: [{id: "id", email: "dev@stainless.com", name: "name"}])
puts(response)using System;
using System.Collections.Generic;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers;
StiggClient client = new();
CustomerImportParams parameters = new()
{
Customers =
[
new()
{
ID = "id",
Email = "dev@stainless.com",
Name = "name",
BillingID = "billingId",
Metadata = new Dictionary<string, string>() { { "foo", "string" } },
PaymentMethodID = "paymentMethodId",
SalesforceID = "salesforceId",
UpdatedAt = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
},
],
};
var response = await client.V1.Customers.Import(parameters);
Console.WriteLine(response);stigg v1:customers import \
--api-key 'My API Key' \
--customer '{id: id, email: dev@stainless.com, name: name}'curl --request POST \
--url https://api.stigg.io/api/v1/customers/import \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"customers": [
{
"name": "<string>",
"email": "jsmith@example.com",
"id": "<string>",
"metadata": {},
"updatedAt": "2023-11-07T05:31:56Z",
"billingId": "<string>",
"salesforceId": "<string>",
"paymentMethodId": "<string>"
}
],
"integrationId": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/customers/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customers' => [
[
'name' => '<string>',
'email' => 'jsmith@example.com',
'id' => '<string>',
'metadata' => [
],
'updatedAt' => '2023-11-07T05:31:56Z',
'billingId' => '<string>',
'salesforceId' => '<string>',
'paymentMethodId' => '<string>'
]
],
'integrationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"newCustomers": [
"customer-6e24b4",
"customer-8f35c7"
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Body
application/json
Response
Import results with success and failure details.
Response object
List of newly created customer IDs from the import operation.
Show child attributes
Show child attributes
⌘I
