---
updatedAt: 2025-06-11T01:22:31.000Z
agentTools:
  projectIndex: https://composabledocs.simondata.com/llms.txt
---

# Event Ingestion API

# Overview

# Event Ingestion API environments

There are three different API endpoints you can send events to. *The event references below use the dev environment.*

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Environment
      </th>

      <th>
        Endpoint
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Production
      </td>

      <td>
        [https://simonsignal.com/http/v1/collect](https://simonsignal.com/http/v1/collect)
      </td>
    </tr>

    <tr>
      <td>
        Staging
      </td>

      <td>
        [https://staging.simonsignal.com/http/v1/collect](https://staging.simonsignal.com/http/v1/collect)
      </td>
    </tr>

    <tr>
      <td>
        Dev
      </td>

      <td>
        [https://dev.simonsignal.com/http/v1/collect](https://dev.simonsignal.com/http/v1/collect)
      </td>
    </tr>
  </tbody>
</Table>

Use these different endpoints to integrate with Simon based on the environments you deploy to.

All request payloads sent to Simon's Event Ingestion API will have the following:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Required
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `partnerId`
      </td>

      <td>
        Yes
      </td>

      <td>
        The internal partnerId Simon uses to identify the customer's site.
      </td>
    </tr>

    <tr>
      <td>
        `context`
      </td>

      <td>
        Yes
      </td>

      <td>
        A dictionary containing optional fields about the context of the event.
      </td>
    </tr>

    <tr>
      <td>
        `clientId`
      </td>

      <td>
        Yes
      </td>

      <td>
        A unique identifier for the device. If no unique identifier for the device can be maintained this may be a unique identifier for the current session (max length: 45 characters).
      </td>
    </tr>

    <tr>
      <td>
        `partnerSecret`
      </td>

      <td>
        Yes
      </td>

      <td>
        The shared secret used for authentication.
      </td>
    </tr>

    <tr>
      <td>
        `ipAddress`
      </td>

      <td>
        No
      </td>

      <td>
        The public IP address of the users device if available.
      </td>
    </tr>

    <tr>
      <td>
        `sentAt`
      </td>

      <td>
        Yes
      </td>

      <td>
        Epoch time in milliseconds of when the request was sent. Epoch time is the number of milliseconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
      </td>
    </tr>

    <tr>
      <td>
        `timezone`
      </td>

      <td>
        No
      </td>

      <td>
        The time difference between UTC time and local time, in minutes. See [https://www.w3schools.com/jsref/jsref\_gettimezoneoffset.asp](https://www.w3schools.com/jsref/jsref_gettimezoneoffset.asp) for an example.
      </td>
    </tr>

    <tr>
      <td>
        `type`
      </td>

      <td>
        Yes
      </td>

      <td>
        The high level type of request being sent in can be either `track` or `identify`.
      </td>
    </tr>
  </tbody>
</Table>

If you do not know your `partner ID`, contact your account manager.

The optional `context` attributes:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `debug`
      </td>

      <td>
        A setting for development, when if True, will tell the HTTP API to send validation errors as HTTP 412 errors. Boolean field, defaults to False.
      </td>
    </tr>

    <tr>
      <td>
        `name`
      </td>

      <td>
        Unique name for your client library. For example, our Simon JavaScript SDK sets this to `simon.js`.
      </td>
    </tr>

    <tr>
      <td>
        `version`
      </td>

      <td>
        Version identifier for your client library.
      </td>
    </tr>

    <tr>
      <td>
        `userAgent`
      </td>

      <td>
        The user agent of the device sending the event, if available.
      </td>
    </tr>

    <tr>
      <td>
        `page`
      </td>

      <td>
        A dictionary representing parameters relevant to the page's context.
      </td>
    </tr>

    <tr>
      <td>
        `url`
      </td>

      <td>
        The page url of the event which the event was triggered from, if available.
      </td>
    </tr>

    <tr>
      <td>
        `device`
      </td>

      <td>
        A dictionary representing parameters relevant to the device's context.
      </td>
    </tr>

    <tr>
      <td>
        `type`
      </td>

      <td>
        String identifying the type of client device (e.g. android).
      </td>
    </tr>
  </tbody>
</Table>

# Sending clickstream data to Simon Data

> 🚧 Exceptions and debug mode
>
> If you're unsure about whether your event is correctly formatted, you can use the debug mode. Exceptions will be silent unless the debug mode is active. Check out the details [below](#section-debugging).

## The *identify* command

> This is an example of an `identify` call:

```javascript HTTP
{
    "partnerId": "804f98b48491143c2e4f2ffea854eb372a41bbfd",
    "clientId": "92adbc3c-c22b-49bf-a9ae-11d9e8b3e6b4",
    "context": {
        "version": "1.0.0",
        "name": "simon.js",
        "debug": true,
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36",
        "page": {
            "url": "http://localhost:9000/index.html"
        }
    },
    "partnerSecret": "1294b7e58f37568396b31ce481cf8edc1e6cfcb5",
    "sentAt": 1524776691259,
    "ipAddress": "127.0.0.1",
    "timezone": 240,
    "type": "identify",
    "userId": "97980cfea0067",
    "traits": {
        "name": "test",
        "email": "joe@smith.com",
        "firstName": "Joe",
        "lastName": "Smith",
        "userId": "97980cfea0067",
        "username": "joesmith",
        "properties": {
            "campaignId": "12345"
        }
    }
}
```

A call to `identify` establishes the identity associated with a `userId`. The variable `userId` is a user identifier that you specify. `identify` can be called to pass information when a source of identity is recognized, such as an authenticated login, an click from an email with an identity URL parameter, and signup for newsletter subscription. Different types of identifiers can be passed on.

Calling `identify` does not automatically establish identity for all subsequent `track` events. Include `traits` within the `track` calls to accomplish this.

When a user registers with you for the first time, you should call `identify` and also make a separate call to `registration`.

Valid values for the `traits` dictionary are as follows.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Value
      </th>

      <th>
        Type
      </th>

      <th>
        Required
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        email
      </td>

      <td>
        String
      </td>

      <td>
        Yes
      </td>

      <td>
        The email address of the user (e.g. [joe@smith.com](mailto:joe@smith.com)).
      </td>
    </tr>

    <tr>
      <td>
        firstName
      </td>

      <td>
        String
      </td>

      <td>
        No
      </td>

      <td>
        The first name of the user (e.g. Joe).
      </td>
    </tr>

    <tr>
      <td>
        lastName
      </td>

      <td>
        String
      </td>

      <td>
        No
      </td>

      <td>
        The last name of the user (e.g. Smith).
      </td>
    </tr>

    <tr>
      <td>
        name
      </td>

      <td>
        String
      </td>

      <td>
        No
      </td>

      <td>
        The full name of the user. (e.g. Joe Smith).
      </td>
    </tr>

    <tr>
      <td>
        userId
      </td>

      <td>
        String
      </td>

      <td>
        No
      </td>

      <td>
        The user id. (e.g. 97980cfea0067).
      </td>
    </tr>

    <tr>
      <td>
        userName
      </td>

      <td>
        String
      </td>

      <td>
        No
      </td>

      <td>
        The username (e.g. joesmith).
      </td>
    </tr>

    <tr>
      <td>
        ARN
      </td>

      <td>
        String
      </td>

      <td>
        No
      </td>

      <td>
        The ARN of the user. Used to sync Simon with Amazon SNS.
      </td>
    </tr>

    <tr>
      <td>
        properties
      </td>

      <td>
        Object
      </td>

      <td>
        No
      </td>

      <td>
        An object of extra arguments (e.g. \{ campaignId: '12345' }).
      </td>
    </tr>
  </tbody>
</Table>

> 📘 Next-Gen Identity
>
> If your organization is on Next-Gen Identity, you can use any native identifier present in your organization's account.  Email address is no longer required.
>
> Next-Gen Identity is currently in a Limited Beta. Most accounts are currently on Legacy Identity unless told otherwise. Contact your account manager for more detail.

A note about `identify` and AWS SNS.  The following fields should be set in your `identify` call for Simon to properly keep track of SNS identities:

* `userId`:  Set this to the internal user id for the user
* `context.device.type`: Set this to the device type of the device to be synced with SNS.  The value can be `ios`,`android`,`kindle`, or `windows`
* `traits.ARN`: Set this to the AWS SNS ARN of the user's device

## The *track* command

A `track` command may be invoked to pass user-interaction data to Simon Data. These user-interactions are captured by specific events that are documented in this API and are explained in more detail below.  Each event has an Event Type specifying the name of the event and an associated Event Object which contains additional metadata about the event.

An example `track` command for a `page_view` event:

```http
{
    "partnerId": "804f98b48491143c2e4f2ffea854eb372a41bbfd",
    "clientId": "92adbc3c-c22b-49bf-a9ae-11d9e8b3e6b4",
    "context": {
        "version": "1.0.0",
        "name": "simon.js",
        "debug": true,
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36",
        "page": {
            "url": "http://localhost:9000/index.html"
        }
    },
    "partnerSecret": "1294b7e58f37568396b31ce481cf8edc1e6cfcb5",
    "sentAt": 1524776691259,
    "ipAddress": "timezone": 240,
    "type": "track",
    "properties": {
        "title": "SimonJS Test Page",
        "language": "en-US"
    },
    "event": "page_view"
}
```

Note that this looks much like the `identify` call above with the exceptions that the `type` is `track`, instead of `traits` we have `properties`, and we have an extra parameter called `event`.

> 📘 Establishing identity within a 'track' call
>
> Use `traits` containing `userId` and `email` parameters in the payload as a method to establish the identity associated with the `track` event, as in the below example.

```http
{
    "partnerId": "804f98b48491143c2e4f2ffea854eb372a41bbfd",
    "clientId": "92adbc3c-c22b-49bf-a9ae-11d9e8b3e6b4",
    "context": {
        "version": "1.0.0",
        "name": "simon.js",
        "debug": true,
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36",
        "page": {
            "url": "http://localhost:9000/index.html"
        }
    },
    "partnerSecret": "1294b7e58f37568396b31ce481cf8edc1e6cfcb5",
    "sentAt": 1524776691259,
    "ipAddress": "127.0.0.1",
    "timezone": 240,
    "type": "track",
    "properties": {
        "title": "SimonJS Test Page",
        "language": "en-US"
    },
    "event": "page_view",
    "userId": "97980cfea0067",
    "traits": {
        "name": "test",
        "email": "joe@smith.com",
        "firstName": "Joe",
        "lastName": "Smith",
        "userId": "97980cfea0067",
        "username": "joesmith",
        "properties": {
            "campaignId": "12345"
        }
    }
}
```

### Parameters

The properties that can be specified within the `properties` object literal vary depending on the event type.

> 🚧 Using custom properties
>
> The event schema is enforced and events that are missing required properties or include unrecognized properties will be rejected during processing. Using the [debug](#section-debugging) mode during your integration set-up will let you know that this is happening. However, all event types support custom properties within the `properties.properties` part of the payload (see an example for [product view](#section-product-view) events). The API also supports [custom events](#section-custom) if there is not a pre-existing matching event type, but make sure to adhere to the schema for those events, too.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Event type
      </th>

      <th>
        Event object
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [page\_view](#section-page-view)
      </td>

      <td>
        none
      </td>
    </tr>

    <tr>
      <td>
        [product\_view](#section-product-view)
      </td>

      <td>
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties\
        cartItems
      </td>
    </tr>

    <tr>
      <td>
        [add\_to\_cart](#section-add-to-cart)
      </td>

      <td>
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties\
        cartItems
      </td>
    </tr>

    <tr>
      <td>
        [cart](#section-cart)
      </td>

      <td>
        cartItems\
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties
      </td>
    </tr>

    <tr>
      <td>
        [update\_cart](#section-update-cart)
      </td>

      <td>
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        previousQuantity\
        price\
        properties\
        cartItems
      </td>
    </tr>

    <tr>
      <td>
        [remove\_from\_cart](#section-remove-from-cart)
      </td>

      <td>
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties\
        cartItems
      </td>
    </tr>

    <tr>
      <td>
        [complete\_transaction](#section-complete-transaction)
      </td>

      <td>
        transactionId\
        revenue\
        cartItems\
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties\
        shipping\
        tax\
        promotion\
        properties
      </td>
    </tr>

    <tr>
      <td>
        [registration](#section-registration)
      </td>

      <td>
        email\
        username\
        userId\
        optIn\
        firstName\
        lastName\
        properties
      </td>
    </tr>

    <tr>
      <td>
        [favorite](#section-favorite)
      </td>

      <td>
        productId\
        variant\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties
      </td>
    </tr>

    <tr>
      <td>
        [waitlist](#section-waitlist)
      </td>

      <td>
        productId\
        variant\
        quantity\
        productImageUrl\
        productUrl\
        brand\
        category\
        color\
        productName\
        size\
        style\
        price\
        properties
      </td>
    </tr>

    <tr>
      <td>
        [authentication](#section-authentication)
      </td>

      <td>
        userId\
        isLoggedIn\
        ARN\
        email\
        properties
      </td>
    </tr>

    <tr>
      <td>
        [custom](#section-custom)
      </td>

      <td>
        eventName\
        requiresIdentity\
        properties
      </td>
    </tr>
  </tbody>
</Table>