# User

A MinChat user is a person who uses your app or website. they are represented as a JSON object.

Minchat is designed to prioritize the idea that user data belongs to the user, and we only keep it in order to provide an efficient chat service. This means that: MinChat only collects the data necessary for its functionality, and nothing more.&#x20;

```javascript
{
        username: "mercy" ,
        name: "Mercy Wells" ,
        avatar: "urltoavatar.com/mercyavatar.jpg"
}
```

<table><thead><tr><th width="167">Field</th><th width="169">Type</th><th width="96">state</th><th>Description</th></tr></thead><tbody><tr><td><code>username</code></td><td><code>string</code></td><td><em>required</em></td><td>Unique username of the user in your database.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td><em>required</em></td><td>Name of the user.<br>Example: <code>"Joshua"</code> </td></tr><tr><td><code>avatar</code></td><td><code>string | File</code></td><td><em>optional</em></td><td>the avatar of the user. A Jpeg, png or webp file, with maximum size of 25mb or a url to an image file</td></tr><tr><td><code>metadata</code></td><td><code>json object</code></td><td><em>optional</em></td><td>an optional key value pair for any additional user information such as email, age, or <code>JSON</code> formatted string. accepts string,number and boolean values</td></tr><tr><td><code>lastActive</code></td><td><code>Date</code></td><td>-</td><td>shows the date and time when the user was last </td></tr></tbody></table>


---

# 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://docs.minchat.io/reference/user.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.
