> For the complete documentation index, see [llms.txt](https://rimplenet.gitbook.io/rimplenet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rimplenet.gitbook.io/rimplenet/api-reference/users/update-user.md).

# Update User

{% hint style="info" %}
**Must have the authorization to use this API**
{% endhint %}

## User details would be updated

<mark style="color:orange;">`PUT`</mark> `https://example.com/wp-json/rimplenet/v1 /users`

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| first\_name                                | String |             |
| last\_name                                 | String |             |
| user\_email                                | String |             |
| user\_old\_password                        | Any    |             |
| user\_new\_password                        | Any    |             |
| User\_id<mark style="color:red;">\*</mark> | int    |             |

{% tabs %}
{% tab title="200: OK User Updated" %}

```
{
    
   "status": true,
    "message": "User updated",
    "data": {
        "id": 15
    },
    "error": []

}
```

{% endtab %}

{% tab title="400: Bad Request Validation error" %}

```
{
    
    "status_code": 400,
    "status": "failed",
    "message": "Validation error",
    "data": [],
    "error": [
        {
            "user_id": "user_id is required"
        },
        {
            "user_id": "User not found"
        }
    ]

}
```

{% endtab %}

{% tab title="403: Forbidden Permission denied" %}

```
{
    "status_code": 403,
    "status": "failed",
    "message": "Permission denied",
    "data": [],
    "error": {
        "unauthorize": "caller_id is not authorized"
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To view request params, click on the arrow (>) at the right-hand side of the endpoint url to expand or collapse
{% endhint %}

**Sample response**

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

```
{
   "status": true,
    "message": "User updated",
    "data": {
        "id": 15
    },
    "error": []
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```
{
    "status_code": 400,
    "status": "failed",
    "message": "Validation error",
    "data": [],
    "error": [
        {
            "user_id": "user_id is required"
        },
        {
            "user_id": "User not found"
        }
    ]
}
```

{% endtab %}

{% tab title="403 Forbidden" %}

```
{
    "status_code": 403,
    "status": "failed",
    "message": "Permission denied",
    "data": [],
    "error": {
        "unauthorize": "caller_id is not authorized"
    }
}
```

{% endtab %}
{% endtabs %}
