# UpdateUser

## Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as *mandatory*.

### Headers

```
PUT /api/ss/user/:id HTTP/1.1
Host: localhost:3000
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close
```

### Query

**id (*****string*****)**

Id of the user.

Example:

```
PUT /api/ss/user/5e5cbecee365f1003f3b20b8 HTTP/1.1
```

**first\_name (*****string*****) (*****optional*****)**

First name of the user.

Example:

```
{   
    "first_name": "..."
}
```

**last\_name (*****string*****) (*****optional*****)**

Last name of the user.

Example:

```
{   
    "last_name": "..."
}
```

**email\_address (*****string*****) (*****optional*****)**

Email address of the user.

Example:

```
{   
    "email_address": "..."
}
```

**username (*****string*****) (*****optional*****)**

Username of the user.

Example:

```
{   
    "username": "..."
}
```

**is\_deleted (*****boolean*****) (*****optional*****)**

Whether user is deleted or not.

Example:

```
{   
    "is_deleted": true
}
```

## Example

The following example is a cURL request to update a users' name and email address.

### Request

Include API Token instead of stars in 'X-SSAPI-KEY: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*' parameter.

```
curl -X PUT 'https://localhost:3000/api/ss/user/5e5cbecee365f1003f3b20b8' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "first_name": "Bruce",
  "last_name": "Wayne",
  "email_address": "bruce.wayne@attackforge.com",
  "username": "bruce.wayne@attackforge.com"
}'
```

### Response

Response contains the updated users' details.

```
{
  "user": {
    "status": "...",
    "role": "...",
    "first_name": "...",
    "last_name": "...",
    "email_address": "...",
    "username": "...",
    "mfa_enabled": "...",
    "last_logged_in": "...",
    "created": "...",
    "id": "..."
  }
}
```
