> ## Documentation Index
> Fetch the complete documentation index at: https://developers.upmarket.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Initialize

> This endpoint is used when you initialize your application's front end

### Header

<ParamField header="x-upmarket-key" required default="xxxxxxxxxxxxxxxxxxx">
  This is the **API Key** you generated from **Upmarket**.
</ParamField>

### Body

<ParamField body="client_customer_id" type="string" required>
  **client\_customer\_id** is the unique identifier for a customer in the source system. Some examples of good client\_customer\_ids are user uids, an account ids, or customer ids.
</ParamField>

<ParamField body="journey_id" type="string" required>
  **journey\_id** of the Upmarket journey the customer is associated with.
</ParamField>

<ParamField body="customer_type" type="string" required>
  **customer\_type** the type of customer, either **'account'** or **'contact'**
</ParamField>

<ParamField body="customer_name" type="string" required>
  **customer\_name** the name of the customer
</ParamField>

### Response

<ResponseField name="customer_id" type="string">
  A successful request will return a customer\_id
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --location --request POST 'https://api.upmarket.ai/customers/initialize' \
  --header 'Content-Type: application/json' \
  --header 'x-upmarket-key: xxxxxxxxxxxxxxxxxxx' \
  --data-raw '{
      "client_customer_id": "",
      "journey_id": "",
      "customer_type": "",
      "customer_name": ""
  }'
  ```

  ```js Node theme={null}
  const axios = require('axios');

  const response = await axios.post(
      'https://api.upmarket.ai/customers/initialize',
      {
          'client_customer_id': '',
          'journey_id': '',
          'customer_type': '',
          'customer_name': ''
      },
      {
          headers: {
              'Content-Type': 'application/json',
              'x-upmarket-key': 'xxxxxxxxxxxxxxxxxxx'
          }
      }
  );
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'Content-Type': 'application/json',
      'x-upmarket-key': 'xxxxxxxxxxxxxxxxxxx',
  }

  json_data = {
      'client_customer_id': '',
      'journey_id': '',
      'customer_type': '',
      'customer_name': ''
  }

  response = requests.post('https://api.upmarket.ai/customers/initialize', headers=headers, json=json_data)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  data: "customer_id"
  ```
</ResponseExample>
