> ## Documentation Index
> Fetch the complete documentation index at: https://docs.castled.io/llms.txt
> Use this file to discover all available pages before exploring further.

# User Attributes

> [!NOTE]
>
> **Prerequisites**
>
> * [Castled JS SDK is installed and initialised](https://docs.castled.io/developer-resources/sdk-integration/js/getting-started.md)

Use the `identify` method in the Castled JS SDK to create/update users with their unique traits. It also lets you record the traits about them such as their name, email address, etc. in your data warehouse.

A sample `identify()` call is shown below:

```javascript
castledanalytics.identify(
  "user-12345", // unique user-id
  {
    // user traits
    fname: "hello",
    lname: "user",
    age: 34,
    email: "name@domain.com",
  },
  () => {
    console.log("in identify call")
  }
)
```

* **user-id** is a unique id used within your organisation to identify a user. Preferable to not use any PII such as email, phone no, etc as user-id.
* **traits** is a flat-map of user attributes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.