PATCH a criteria based role

Hello,

I am attempting to add memebership criteria to a role (membership determined by Accoun attribute) by using the beta api endpoint - https://{$$.env.org}.api.identitynow.com/beta/roles/{id}.
When forming the request body, what should the “path” (json pointer) be set to?
Also, what should the “value” value be set to?
I am currently setting it as a string which is membership object (obtained from GET of same role), since I want to add lis of criterias in membership.
But receiving the error message in body with response code 404:

{
    "error": "No message available"
}
[
    {
        "op": "add",
        "path": "/membership",
        "value": {
            "type": "STANDARD",
            "criteria": {
                "operation": "OR",
                "key": null,
                "stringValue": "",
                "children": [
                    {
                        "operation": "AND",
                        "children": [
                            {
                                "operation": "CONTAINS",
                                "key": {
                                    "type": "ACCOUNT",
                                    "property": "attribute.MY_ID",
                                    "sourceId": "2cxxxxx2yyy222222222222"
                                },
                                "stringValue": "MY123"
                            }
                        ]
                    }
                ]
            },
            "identities": null
        }
    }
]

the add operation is for adding elements to a list. The membership property of a role is an object, not a list. Try using replace as your operation instead.