# Identify HTTP API

This API can be used in tandem with [Track HTTP API](https://docs.browsee.io/integration/api-calls/track-event-http-api), to send extra information about a user like its tags, location etc.

Similar, to the Track API, you will need your project API key. This key is available on your Project's [settings page](https://browsee.io/app/settings). To learn more about how to get this KEY [see](https://docs.browsee.io/integration/track-event-http-api#api-key).<br>

## Identify API

## identify

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

An API to send custom information about a user

#### Request Body

| Name        | Type   | Description                                                                                                                                                                                                                      |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| apiKey      | string | Your Project's API Key                                                                                                                                                                                                           |
| userId      | string | A unique identifier of the user in your database. At least one of userId or anonymousId is required.                                                                                                                             |
| traits      | object | JSON Dictionary Object of the traits to assign users like name, email and others. See below for special keys and examples.                                                                                                       |
| anonymousId | string | This is an identifier that can be sent to tie a series of events and the information sent in this identify call to a certain user and a session. In case you are sending userId, this is not required, otherwise, it is required |
| timestamp   | string | Timestamp of the event in ISO-8601 format date string "2021-12-02T00:30:08.276Z". If not provided we assume the time of receipt.                                                                                                 |

{% 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 identify API

You can send any information in the `traits` object like

```
{
 name: 'Jon Snow',
 email: 'knowsnothing@gmail.com',
 location: 'Castle Black'
}
```

* Some keys like `name`, `email`, `phone` and `$tags` are special keys. When you send them in an identify call, you can see them on the right hand side of a session panel and search for the session using these keys from session search.

![Easily search for sessions with name, email and tags](https://1223726150-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LacsB-5FtW6vWPn9FQY%2F-MUDwMaFBHAvJIFIJR1W%2F-MUEB5NLTujP35uJM7lI%2Fsearch.png?alt=media\&token=d4c6d6b2-5d7f-4ca6-aa3c-82372ae751dd)

* `$tags`.can be used to assign free from text labels to sessions. These can then be searched back in session search.

```
{'$tags': ["Logged In", "Cohort 78435"]}
```
