User fields
This document provides extended information about commonly used fields in User objects.
addresses
The User's physical addresses.
customFields field
In addition to the built in fields, you can add custom fields to the User document to fit your use cases.
See Custom fields for more information.
emails field
The emails field contains an array of email address objects. Each such object holds information about a single email address of the User.
The first address in the array is the primary email address of the User.
Note that unverified addresses may also be listed. You can check the verified status from the verified subfield.
Email addresses can be added with the /api/rest/v1/user/{userId}/change-contact/begin and /api/rest/v1/user/{userId}/change-contact/finish APIs.
Alternatively, the whole array can be replaced with the PUT /api/rest/v1/user/{userId} API.
id field
This field is autogenerated by the service. It is a globally unique identifier for the User. It is called the "User ID". The value is a 24 character lowercase hexadecimal string. The ID values are sortable by creation time.
In most APIs, when a user is referenced, this value is used.
In the User's ID Tokens, this value is used as the sub claim value.
locale and preferredLanguage fields
Both fields have the same value. This field controls which language is used in Trivore ID user interfaces. If this field value is specified, Trivore ID user interfaces and related communications (emails, SMS messages) should use the same language. If there is no value, the locale may be selected based on browser preference, group policy setting, or a default locale.
mobiles field
The mobiles field contains an array of mobile number objects. Each such object holds information about a single mobile number of the User.
The first number in the array is the primary mobile number of the User.
Note that unverified numbers may also be listed. You can check the verified status from the verified subfield.
Mobile numbers can be added with the /api/rest/v1/user/{userId}/change-contact/begin and /api/rest/v1/user/{userId}/change-contact/finish APIs.
Alternatively, the whole array can be replaced with the PUT /api/rest/v1/user/{userId} API.
memberOf field
The memberOf field is used to manage membership in Groups. It is an array of group IDs.
nsCode field
This field shows the current code of the user's Namespace. Note that the namespace code may change over time.
tags field
This list of tags can be used as another way to group certain users. Users can be searched with a filter like tags eq "influencer". Tags can be updated by replacing the whole list with the PUT /api/rest/v1/user/{userId} API.
username field
This is the username of the User. It is unique within the Namespace the User belongs to. The user can use it during sign in to identify themself.
Restrictions:
- Minimum length: 1 character
- Maximum length: 100 characters
The username format can be restricted in Namespace configuration.
The username may be automatically generated, based on Namespace configuration. When an User is created with the Create User API, and no username is provided, it is generated automatically if possible.
The username is changeable, so it should not be used as a permanent identifier for an User.