# 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 %}
