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

{
    "customer": {
        "email": "test@company.co",
        "first": "Test",
        "last:   "User"
    }
}

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:

curl \
-H 'X-API-KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-X POST \
-d '{"customer":{"email":"test@company.co","first":"Test","last":"User"}}' \
'https://api.eyelevel.ai/v1/partner/customer'

If the request is successful, you will receive a 200 status code and an EyeLevel customer API key in the response.

200 Response

{
    "apiKey": "EYELEVEL CUSTOMER API KEY"
}

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.

Last updated