# Track

Track let's you build up a picture of your users. Data points on your users are called **Traits**. These are attributes you can derive insight from to drive decision making. `/track` provides the mechanism to record these attributes.

## Track attributes

<mark style="color:orange;">`POST`</mark> `/track/:userId`

Updates an existing user's traits.

Much like identifiers, traits use an **append & merge** approach. Properties will **override** an existing value if that key already, and any new properties will be added.

You do not need to send existing properties when updating, these will continue to be persisted (or overwritten per the above section). To remove a value, send the key and a `null` value. For example to remove `lastPurchaseDate`:

```json
{
    ...
    "lastPurchaseDate": null
}
```

**Headers**

| Name                                            | Value              |
| ----------------------------------------------- | ------------------ |
| Content-Type<mark style="color:red;">\*</mark>  | `application/json` |
| Authorization<mark style="color:red;">\*</mark> | `Bearer <token>`   |

**Query**

| Name                                        | Type   | Description                           |
| ------------------------------------------- | ------ | ------------------------------------- |
| `:userId`<mark style="color:red;">\*</mark> | string | ID of the user. `usr_[A-Za-z0-9]{16}` |

**Body**

| Name   | Type   | Description                                             |
| ------ | ------ | ------------------------------------------------------- |
| traits | object | An object containing identifying properties on the user |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "id": "usr_XXX",
  "workspaceId": "ws_XXX",
  "identifiers": {},
  "traits": {},
  "createdAt": "2025-04-05T00:10:41.840Z",
  "updatedAt": "2025-04-09T10:06:06.813Z"
}
```

{% endtab %}
{% endtabs %}

> **Important:** Fields with a `*` must be included in your request!


---

# 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://tristans-organization-4.gitbook.io/attuitive/api-reference/track.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.
