---
title: "The user object"
slug: "the-user-object"
abstract: "Describes the user object."
---
# The user object

The `user` object contains information about a logged-in user, like their internal ID, email address, postal address, and so on.

> [!important]
> The `user` object can be placed in the [context object](https://doc.sitecore.com/discover/en/developers/discover-developer-guide/integrate-using-discover-rest-apis/events-data-model/the-event-object-model/the-context-request-object.html "The context request object") or directly in the [value object](https://doc.sitecore.com/discover/en/developers/discover-developer-guide/integrate-using-discover-rest-apis/events-data-model/the-event-object-model/the-value-object.html "The value object"). We recommend that you place it in context, as the `value.user` object is deprecated.

The following are the attributes supported by the `user` object:

| Name | Type | Description | Value |
| --- | --- | --- | --- |
| id | string | Required.Any persistent ID you use to identify the user. Can be a primary key in a user database, or an ID in any system used to manage user info.Importantid is different from the uuid or user_id attributes, which are anonymous. | n/a |
| email | string | Optional.User's email address. | n/a |
| fbid | string | Optional.User's Facebook ID. | n/a |
| eid | string | Required when using email.User's opaque email ID as identified by your email service provider. | n/a |
| address | Address object | Optional.User's postal address information. This is usually also the billing address.NoteThis can be different from the shipping_address attribute, which is provided as part of the checkout object. | n/a |
| groups | array of strings | Optional.Custom groups or group segments that are assigned to the user. Strings are free-form. | n/a |
| gender | string | Optional.User's gender. | malefemaleother |
| addn_attributes | object | Optional.A map of customer-specific user attributes. | n/a |

The following is an example of the `user` object:

```JSON
"user": {
  "id": "user-1234",
  "email": "abc.def@email.com",
  "eid": "<email_identifier>",
  "address": {
    "address_line_1": "123 Main Street",
    "address_line_2": "apartment 123",
    "state": "CA",
    "zip": "90210",
    "country": "US"
  },
  "groups": ["group1", "group2"],
  "gender": "female",
  "addn_attributes": {
    "<attr_key1>": "<attr_value1>",
    "<attr_key2>": "<attr_value2>",
    ...
  }
}
```