CREATING A NEW CUSTOMER ACCOUNT
Welcome to the EyeLevel Partner APIs! In this tutorial, we’ll walk you through the process of creating a new EyeLevel customer account.

Getting Started

What you need to get started:

Step 1: Generate the Request body

The optional parameters that can be used when creating a new customer account are described in greater detail here. In this example, we will limit the request to the required parameters.
The body of your requests need to be sent in JSON format. Here is an example request body:

Example Request Body

1
{
2
"customer": {
3
"email": "[email protected]",
4
"first": "Test",
5
"last: "User"
6
}
7
}
Copied!
To create a new EyeLevel customer account, you must include a first and last name and email with the request. The email must be unique in the EyeLevel system (not used in an existing EyeLevel customer account).

Step 2: Submit the Request

As described in greater detail here, you must include your Partner API key in the header of your requests. You must also define the content type for your request.
Here is an example request, using the cURL command line tool:
1
curl \
2
-H 'X-API-KEY: YOUR_API_KEY' \
3
-H 'Content-Type: application/json' \
4
-X POST \
5
-d '{"customer":{"email":"[email protected]","first":"Test","last":"User"}}' \
6
'https://api.eyelevel.ai/v1/partner/customer'
Copied!
If the request is successful, you will receive a 200 status code and an EyeLevel customer API key in the response.

200 Response

1
{
2
"apiKey": "EYELEVEL CUSTOMER API KEY"
3
}
Copied!

Step 3: Save the Customer API Key

You will want to store the customer API key somewhere in your system. While you can query for the customer API key again using one of the CUSTOMER queries described in greater detail here, the customer API key is used for every subsequent request related to their account including starting subscriptions and creating new chat flows.