import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.customers.create({});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"email": "<string>",
"name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"customer_type": "paid",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"orders_count": 123,
"total_spend": 123,
"tags": "<array>"
}Creates a new customer record
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.customers.create({});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"email": "<string>",
"name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"customer_type": "paid",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"orders_count": 123,
"total_spend": 123,
"tags": "<array>"
}API key in the format: Bearer {api_token}
Customer created
paid, free, lead Was this page helpful?