# 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": "..."
  }
}
```


---

# 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://support.attackforge.com/attackforge-enterprise/modules/self-service-restful-api/updateuser.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.
