> For the complete documentation index, see [llms.txt](https://docs.8select.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.8select.io/api-tracking/general/introduction.md).

# Introduction

## How to send events?

The analytics API is built using REST. To submit an event you send a POST request to `https://api.8select.io/analytics/v3/events`:

```bash
POST /analytics/v3/events
Host: https://api.8select.io
Content-Type: application/json
x-api-id: <Your API ID>

{
  "type": "view",
  "view": {
    "type": "customSet",
    "customSet": {
      "id": "1b3de0bd-95c6-435a-8bb9-f4cae0160388"
    }
  },
  "context": [
    {
      "type": "user",
      "user": {
        "id": "c57a43f7-eefc-462b-b5a8-0ef421e90f67"
      }
    }
  ]
}
```

Every event has to contain a `type` and a type-specific payload, as well as an optional `context` array.

### context

The context is used to provide additional contextual information about the origin of a given event. You can find out more in the [context](/api-tracking/general/context.md) section.

#### context\[type = "user"].user.id

The `id` sent in the user context within the context array must be consistent for all events concerning a single user. It should be anonymized, i.e. a generated id without any connection to personal data. You can read the section about [user identification](/api-tracking/general/user-identification.md) to learn more.

### type

There are currently three types of events (view, interact, order), each with a specific payload as defined in the respective sections under [events](/api-tracking/events.md).\
The property containing the type specific payload is always named after the type itself.
