> ## 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.

# Create

> This endpoint streams events to Upmarket

Every **Event** streamed to Upmarket must include a **customer\_id**, and **journey\_id**.
<p>To get the `customer_id`, use the <a href="/api-reference/endpoints/customers/initialize">customers/initialize </a> endpoint.</p>

<p>**journey\_id**</p>
Get the journey\_id from Upmarket

### Header

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

### Body

<ParamField body="journey_id" type="string" required>
  Id of the Journey this event is associated with.
</ParamField>

<ParamField body="customer_id" type="string" required>
  The customer this event is associated with.
</ParamField>

<ParamField body="event_id" type="string" required>
  This is the **Event Id** that you're streaming to Upmarket. An example of an `event_id` is `sign_up`.
</ParamField>

<ParamField body="your_variables" type="string">
  Add custom variables to stream to Upmarket.
</ParamField>

### Response

<ResponseField name="success" type="string">
  Indicates that the event was saved successfully
</ResponseField>

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

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

  const response = await axios.post(
      'https://api.upmarket.ai/events/create',
      {
          'event_id': '',
          'journey_id': ''
      },
      {
          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 = {
      'event_id': '',
      'journey_id': '',
  }

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

<ResponseExample>
  ```json Response theme={null}
  {
    "success"
  }
  ```
</ResponseExample>
