# Track HTTP API

While Browsee's web SDK automatically most events like page views, clicks users can use Browsee's [logEvent](https://docs.browsee.io/integration/api-calls/log-event-call) call to send custom events. In addition, you may want to send custom User Data from your non-web applications like a mobile app, servers, etc. so you can unify a complete picture of a user across all platforms. Sending such data

* Allows you to create segments on these custom events
* Creating or generating reports for non-web users.

### API Key

To use the below API you will need your project API key. This key is available on your Project's [settings page](https://browsee.io/app/settings).

![Copy your API Key from Settings > Install > I use Google Tag Manager](https://1223726150-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LacsB-5FtW6vWPn9FQY%2F-MUDabVZVckTyMFikrQe%2F-MUDdHYfrFqiqvidNgCG%2Fsettings-install.png?alt=media\&token=45f91201-03d6-40aa-9eb0-f8a1306611da)

## Track API

## track

<mark style="color:green;">`POST`</mark> `https://api.browsee.io/api/v1/track`

An API to send custom events for some users

#### Request Body

| Name        | Type   | Description                                                                                                                                                                 |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| apiKey      | string | Your Project's API Key                                                                                                                                                      |
| event       | string | Name of the action that the user has performed like "CLICKED\_CHECKOUT"                                                                                                     |
| properties  | object | <p>A JSON dictionary of the properties of the event like: <br>{ <br>"price": 100,<br> "category": "Apparel" <br>}</p>                                                       |
| userId      | string | A unique identifier of the user in your database. At least one of userId or anonymousId is required.                                                                        |
| anonymousId | string | This is an identifier that can be sent to tie a series of events to a certain user and a session. In case you are using userId, we will use that, otherwise, this is needed |
| timestamp   | string | Timestamp of the event in ISO-8601 format date string. If not provided we assume the time of receipt like "2021-12-02T00:30:08.276Z".                                       |

{% tabs %}
{% tab title="200 When data is successfully received" %}

```
{
    "status": "success"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "status": "failure",
    "message": <Problem in request parameters>
}
```

{% endtab %}
{% endtabs %}

### Using the track event API

* This api is rate limited and should not be used to dump historical data.
* `userId` should be the same as you provide via Identify call, whether used via [Identify Call](https://docs.browsee.io/integration/api-calls/identify-call) or [Identify HTTP API](https://docs.browsee.io/integration/api-calls/identify-http-api).
* When a user is anonymous, you can send any token as `anonymousId`. This anonymousId helps us tie a series of events into a session. If you are using other tracking tools, you can also get their unique identifier and send that as a unique identifier as the`anonymousId.`
* `timestamp` is a standard [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) time formatted string.&#x20;
