# Update User

## Update a user info

<mark style="color:yellow;">`PUT`</mark> `/api/users/{userId}`

**Access Permissions**

<table data-header-hidden><thead><tr><th width="348">Role<select><option value="2rSBGCjaXeFt" label="COMPANY" color="blue"></option><option value="ozSCTBKJPNgy" label="HUB_MANAGER" color="blue"></option><option value="Mfl8c1CRYAaD" label="MASTER" color="blue"></option><option value="bviBPLZFY8t3" label="SHIPPER" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td><span data-option="Mfl8c1CRYAaD">MASTER</span></td><td>마스터</td></tr></tbody></table>

**PathVariables**

<table><thead><tr><th width="342">Name</th><th>Type</th></tr></thead><tbody><tr><td>userId</td><td><code>Long</code></td></tr></tbody></table>

**Headers**

<table><thead><tr><th width="342">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization</td><td><code>Bearer &#x3C;token></code></td></tr></tbody></table>

**Body**

<table><thead><tr><th width="192">Name</th><th width="331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code></td><td>String</td><td>Age of the user</td></tr><tr><td><code>userName</code></td><td>String</td><td>Name of the user</td></tr><tr><td><code>phoneNumber</code></td><td>String</td><td>Phone Number of the user</td></tr><tr><td><code>userRole</code></td><td>Enum<br>(SHIPPER, HUB_ADMIN, COMPANY, MASTER)</td><td>Role of the user</td></tr></tbody></table>

**Response**

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

```json
{
  "id": 1,
  "userId": "baedal123",
  "userName": "김배달",
  "phoneNumber": "010-1234-1234",
  "userRole": "Shipper"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
