Thred
  • Welcome
  • Getting Started
    • Overview
  • Basics
    • Create a Customer
    • Create a Connector
    • Migrate a Customer
    • Customize Branding
    • Connectors
Powered by GitBook
On this page
  1. Basics

Create a Customer

In order to migrate customer data, your user first has to be added as a Customer in Thred.

// Create a customer

export async function createCustomer(
  data: {
    name: string;
    email: string;
  },
  apiKey: string
) {
  return axios.post(`https://dashboard.thred.ai/api/create-customer`, data, {
    headers: {
      Authorization: `Bearer ${apiKey}`,
      "Content-Type": "application/json",
    },
  });
} 


//RETURNS:

//{
    //"message": "Customer created",
    //"customer": {
        //"id": "CUSTOMER ID",
        //"email": "EMAIL",
        //"name": "NAME"
    //}
//}

PreviousOverviewNextCreate a Connector

Last updated 26 days ago