# User

You can use the API to get or set user information.

The Model

| Key           | Type    | Description                                                    |
| ------------- | ------- | -------------------------------------------------------------- |
| id            | String  | The unique identifier for the user which is given by Tiledesk. |
| email         | String  | The user email.                                                |
| password      | String  | The user password.                                             |
| firstname     | String  | The user firstname.                                            |
| lastname      | String  | The user lastname.                                             |
| emailverified | Boolean | Determine if the user has a email validated.                   |
| status        | Number  | User status. Permitted values: 100 active, 0 disabled          |
| createdAt     | String  | The time (ISO-8601 date string) when the user was created.     |
| updatedAt     | String  | The time (ISO-8601 date string) when the user was updated.     |
| createdBy     | String  | The unique identifier of the row creator                       |
| id\_project   | String  | The unique identifier of the project                           |

## Get the current authenticated user

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/users`

#### Headers

| Name          | Type   | Description                            |
| ------------- | ------ | -------------------------------------- |
| Authorization | string | authorization token. Basic Auth or JWT |

{% tabs %}
{% tab title="200 " %}

```
...
```

{% endtab %}
{% endtabs %}

## Update the current authenticated user

<mark style="color:orange;">`PUT`</mark> `https://api.tiledesk.com/v3/users/`

#### Headers

| Name          | Type   | Description                            |
| ------------- | ------ | -------------------------------------- |
| Authorization | string | authorization token. Basic Auth or JWT |
| Content-Type  | string | use "application/json" value           |

#### Request Body

| Name       | Type   | Description                |
| ---------- | ------ | -------------------------- |
| firstname  | string | The user firstname         |
| lastname   | string | The user lastname          |
| attributes | object | The user custom attributes |

{% tabs %}
{% tab title="200 " %}

```
...
```

{% endtab %}
{% endtabs %}


---

# 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://developer.tiledesk.com/apis/rest-api/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.
