Step 2 10 min

Provision a Customer

Create a customer org under your partner account.

The Partner-Customer Relationship

Partner (You)

prt_ token

Customer

cust_ token

Each customer gets their own isolated org, their own cust_ token, and their own policies. You manage their lifecycle and can set default policies that apply to all your customers.

Create a Customer

Create Customertypescript
const customer = await client.customers.create({
  name: 'Acme Corp',
  contact_email: 'admin@acme.com',
  tier: 'startup',
});
console.log(customer.id);
console.log(customer.token); // cust_...
Response200 OK
{
  "id": "d0ddcd43-...",
  "name": "Acme Corp",
  "tier": "startup",
  "token": "cust_...",
  "status": "active"
}

Customer Lifecycle Management

Lifecycle Operationstypescript
// Promote from trial to paid
await client.customers.promote(customer.id, {
  tier: 'platform',
});

// Suspend (e.g., non-payment)
await client.customers.suspend(customer.id);

// Reactivate
await client.customers.reactivate(customer.id);

// Check promotion readiness
const ready = await client.customers.promotionReadiness(customer.id);

// Get MGI score
const mgi = await client.customers.mgi(customer.id);