> For the complete documentation index, see [llms.txt](https://icure.gitbook.io/icure/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icure.gitbook.io/icure/icure-data-stack/icure-data-model/user.md).

# User

This entity is a root level object. It represents an user that can log in to the iCure platform. It is serialized in JSON and saved in the underlying icure-base CouchDB database.

## Properties

| Property                 | Type                                                                                                                                | Description                                                                                                                                                   |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id *`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | the Id of the user. We encourage using either a v4 UUID or a HL7 Id.                                                                                          |
| `rev`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | the revision of the user in the database, used for conflict management / optimistic locking.                                                                  |
| `deletionDate`           | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Long/README.md)               | hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called. format: int64.                                     |
| `created`                | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Long/README.md)               | format: int64.                                                                                                                                                |
| `name`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Last name of the user. This is the official last name that should be used for official administrative purposes.                                               |
| `properties *`           | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/PropertyStub/README.md)       | Extra properties for the user. Those properties are typed (see class Property)                                                                                |
| `permissions *`          | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Permission/README.md)         | If permission to modify patient data is granted or revoked                                                                                                    |
| `roles *`                | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)             | Roles specified for the user                                                                                                                                  |
| `type`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Authorization source for user. 'Database', 'ldap' or 'token' Values: database, ldap, token                                                                    |
| `status`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | State of user's activeness: 'Active', 'Disabled' or 'Registering' Values: ACTIVE, DISABLED, REGISTERING                                                       |
| `login`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Username for this user. We encourage using an email address                                                                                                   |
| `passwordHash`           | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Hashed version of the password (BCrypt is used for hashing)                                                                                                   |
| `secret`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Secret token used to verify 2fa                                                                                                                               |
| `use2fa`                 | [Boolean](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Boolean/README.md)         | Whether the user has activated two factors authentication                                                                                                     |
| `groupId`                | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | id of the group (practice/hospital) the user is member of                                                                                                     |
| `healthcarePartyId`      | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Id of the healthcare party if the user is a healthcare party.                                                                                                 |
| `patientId`              | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Id of the patient if the user is a patient                                                                                                                    |
| `autoDelegations *`      | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/List/README.md)                | Delegations that are automatically generated client side when a new database object is created by this user                                                   |
| `createdDate`            | [Date](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Date/README.md)               | the timestamp (unix epoch in ms) of creation of the user, will be filled automatically if missing. Not enforced by the application server. format: date-time. |
| `termsOfUseDate`         | [Date](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Date/README.md)               | the timestamp (unix epoch in ms) of the latest validation of the terms of use of the application format: date-time.                                           |
| `email`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | email address of the user.                                                                                                                                    |
| `applicationTokens *`    | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)              | Long lived authentication tokens used for inter-applications authentication.                                                                                  |
| `authenticationTokens *` | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/AuthenticationToken/README.md) | Encrypted and time-limited Authentication tokens used for inter-applications authentication                                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://icure.gitbook.io/icure/icure-data-stack/icure-data-model/user.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
