# Track HTTP API

While Browsee's web SDK automatically most events like page views, clicks users can use Browsee's [logEvent](/integration/api-calls/log-event-call.md) 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](/files/-MUDdHYfrFqiqvidNgCG)

## 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](/integration/api-calls/identify-call.md) or [Identify HTTP API](/integration/api-calls/identify-http-api.md).
* 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;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.browsee.io/integration/api-calls/track-event-http-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
