> For the complete documentation index, see [llms.txt](https://thred-1.gitbook.io/thred/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thred-1.gitbook.io/thred/basics/editor.md).

# Create a Customer

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

<pre class="language-typescript"><code class="lang-typescript">// 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",
    },
  });
} 

<strong>
</strong><strong>//RETURNS:
</strong><strong>
</strong><strong>//{
</strong>    //"message": "Customer created",
    //"customer": {
        //"id": "CUSTOMER ID",
        //"email": "EMAIL",
        //"name": "NAME"
    //}
<strong>//}
</strong></code></pre>
