How can I update an user field via JSON:API? How do I update user field via JSON API with D8?

EndPoint:https://domainname.com/jsonapi/user/user/

Method:PATCH


Request Header;

Accept:application/vnd.api+json
Content-Type:application/vnd.api+json
X-CSRF-Token:xxxxxxxxxx


Body:

"data": {
        "type": "user--user",
        "id": "xxxxxx-7798-45e5-a16c-xxxxxxxxxxxx",
        "attributes": {
            "field_test1": [
                "data1",
                "dara2"
            ]
        }
    }


But below error

        "title": "Method Not Allowed",
        "status": "405",
        "detail": "No route found for \"PATCH /jsonapi/user/user/\": Method 
        Not Allowed (Allow: POST, GET, HEAD)",
You need to also put UUID in your request URL, so it should look like
EndPoint:https://domainname.com/jsonapi/user/user/xxxxxx-7798-45e5-a16c-xxxxxxxxxxxx