api.customers.create
Create an end-user customer. Polymorphic on type: an "individual" body carries a KycProfile, a "business" body carries a KybProfile. Returns a tagged-union envelope with the new customer's UUID.
const = await ..({
: "individual",
: {
: {
: "Alice",
: "Liddell",
: "1990-04-12",
},
: {
: "alice@example.com",
},
: {
: {
: "123 Main St",
: "Brooklyn",
: "NY",
: "11201",
: "US",
},
},
},
});
// res.type is "individual"; res.id is the new customer's UUID.
const = .;
// res.kyc_link.url is the hosted KYC link: share it with the end-user.
const = ..;| Argument | Type | Notes |
|---|---|---|
req | CreateCustomerRequest | Discriminated on type. See POST /customers for the full body shape. |
req.idempotencyKey | string | Optional. Lifted onto the Idempotency-Key HTTP header — re-sending the same key returns the originally created customer instead of creating a duplicate. |
Returns: Promise<CreateCustomerResponse>, a tagged-union envelope: { type: "individual" \| "business", id: string, kyc_link: HostedKycLink }. kyc_link is the auto-minted Seismic-hosted HostedKycLink ({ token, url }). Share url with the end-user to drive them through verification.
Throws: ApiError with status: 400 (validation failure; the error body's missing array lists which fields).
REST endpoint: POST /customers.
